From 2d059dcb8377b613a4fb00de3adc1c1e33d8f5c6 Mon Sep 17 00:00:00 2001 From: Nassim Tabchiche Date: Sat, 20 Apr 2024 20:19:12 +0200 Subject: [PATCH] Add arabic language item with placeholder flag --- frontend/messages/ar.json | 3 ++- frontend/messages/en.json | 1 + frontend/messages/fr.json | 1 + .../src/lib/components/SideBar/SideBarFooter.svelte | 3 ++- frontend/src/lib/utils/locales.ts | 13 +++++++++++-- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/frontend/messages/ar.json b/frontend/messages/ar.json index 01f925105..d74701b5e 100644 --- a/frontend/messages/ar.json +++ b/frontend/messages/ar.json @@ -1,4 +1,5 @@ { "$schema": "https://inlang.com/schema/inlang-message-format", "type": "نوع" -} \ No newline at end of file +} + diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 87b03ea6b..fac6b63d8 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -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", diff --git a/frontend/messages/fr.json b/frontend/messages/fr.json index cc9bf0d5c..023ab3e25 100644 --- a/frontend/messages/fr.json +++ b/frontend/messages/fr.json @@ -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", diff --git a/frontend/src/lib/components/SideBar/SideBarFooter.svelte b/frontend/src/lib/components/SideBar/SideBarFooter.svelte index 7e18d39ca..cd70b8174 100644 --- a/frontend/src/lib/components/SideBar/SideBarFooter.svelte +++ b/frontend/src/lib/components/SideBar/SideBarFooter.svelte @@ -10,7 +10,8 @@ const language: any = { french: m.french(), - english: m.english() + english: m.english(), + arabic: m.arabic() }; const modalStore = getModalStore(); diff --git a/frontend/src/lib/utils/locales.ts b/frontend/src/lib/utils/locales.ts index 9f31a74fc..6104893e3 100644 --- a/frontend/src/lib/utils/locales.ts +++ b/frontend/src/lib/utils/locales.ts @@ -8,6 +8,10 @@ export const LOCALE_MAP = { fr: { name: 'french', flag: '🇫🇷' + }, + ar: { + name: 'arabic', + flag: '🇸🇦' } }; @@ -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 }), @@ -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; }