Skip to content

Commit

Permalink
Add arabic language item with placeholder flag
Browse files Browse the repository at this point in the history
  • Loading branch information
nas-tabchiche committed Apr 20, 2024
1 parent a64f600 commit 2d059dc
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion frontend/messages/ar.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://inlang.com/schema/inlang-message-format",
"type": "نوع"
}
}

1 change: 1 addition & 0 deletions frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://inlang.com/schema/inlang-message-format",
"french": "French",
"english": "English",
"arabic": "Arabic",
"addThreat": "Add threat",
"addReferenceControl": "Add reference control",
"addAppliedControl": "Add applied control",
Expand Down
1 change: 1 addition & 0 deletions frontend/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$schema": "https://inlang.com/schema/inlang-message-format",
"french": "Français",
"english": "Anglais",
"arabic": "Arabe",
"addThreat": "Ajouter une menace",
"addReferenceControl": "Ajouter une mesure de référence",
"addAppliedControl": "Ajouter une mesure appliquée",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lib/components/SideBar/SideBarFooter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
const language: any = {
french: m.french(),
english: m.english()
english: m.english(),
arabic: m.arabic()
};
const modalStore = getModalStore();
Expand Down
13 changes: 11 additions & 2 deletions frontend/src/lib/utils/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export const LOCALE_MAP = {
fr: {
name: 'french',
flag: '🇫🇷'
},
ar: {
name: 'arabic',
flag: '🇸🇦'
}
};

Expand All @@ -29,6 +33,7 @@ export function localItems(languageTag: string): LocalItems {
const LOCAL_ITEMS = {
french: m.french({ languageTag: languageTag }),
english: m.english({ languageTag: languageTag }),
arabic: m.arabic({ languageTag: languageTag }),
home: m.home({ languageTag: languageTag }),
edit: m.edit({ languageTag: languageTag }),
overview: m.overview({ languageTag: languageTag }),
Expand Down Expand Up @@ -314,8 +319,12 @@ export function localItems(languageTag: string): LocalItems {
libraryImportError: m.libraryImportError({ languageTag: languageTag }),
libraryAlreadyExistsError: m.libraryAlreadyImportedError({ languageTag: languageTag }),
invalidLibraryFileError: m.invalidLibraryFileError({ languageTag: languageTag }),
attemptToDeleteOnlyAdminAccountError: m.attemptToDeleteOnlyAdminAccountError({ languageTag: languageTag }),
attemptToRemoveOnlyAdminUserGroup: m.attemptToRemoveOnlyAdminUserGroup({ languageTag: languageTag })
attemptToDeleteOnlyAdminAccountError: m.attemptToDeleteOnlyAdminAccountError({
languageTag: languageTag
}),
attemptToRemoveOnlyAdminUserGroup: m.attemptToRemoveOnlyAdminUserGroup({
languageTag: languageTag
})
};
return LOCAL_ITEMS;
}

0 comments on commit 2d059dc

Please sign in to comment.