Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethbruskiewicz committed Aug 23, 2024
1 parent ae05c53 commit 774612d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions lib/utils/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,13 @@ export const interface_translation = transformStructFirstSpec(
const withNamespace =
(namespace, addons = {}) =>
(obj) =>
consolidate(obj, (acc, [lang, translation]) => ({
...Object.assign(acc, {
[lang]: {
[namespace]: {
...translation,
...addons,
},
consolidate(obj, (acc, [lang, translation]) => Object.assign(acc, {
[lang]: {
[namespace]: {
...translation,
...addons,
},
}),
},
}));

const englishIsDefault = (translation_object) => {
Expand Down

0 comments on commit 774612d

Please sign in to comment.