Skip to content

Commit

Permalink
add translation files
Browse files Browse the repository at this point in the history
  • Loading branch information
AriaMoradi committed Feb 13, 2023
1 parent 1c7c3e5 commit ce83914
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
4 changes: 4 additions & 0 deletions src/i18n/resources/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"DefaultNavBar.navbarItems.Library": "Library",
"screens/Library/Library": "Library"
}
4 changes: 4 additions & 0 deletions src/i18n/resources/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"DefaultNavBar.navbarItems.Library": "fr(Library)",
"screens/Library/Library": "fr(Library)"
}
21 changes: 9 additions & 12 deletions src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

import en from 'i18n/resources/en.json';
import fr from 'i18n/resources/fr.json';

const translationHelper = (lng: any) => ({
translation: lng,
});

const resources = {
en: {
translation: {
'DefaultNavBar.navbarItems.Library': 'Library',
'screens/Library/Library': 'Library',
},
},
fr: {
translation: {
'DefaultNavBar.navbarItems.Library': 'fr(Library)',
'screens/Library/Library': 'fr(Library)',
},
},
en: translationHelper(en),
fr: translationHelper(fr),
};

export default resources;

0 comments on commit ce83914

Please sign in to comment.