Skip to content

Commit

Permalink
fix for arabic to work
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBresson committed Dec 4, 2023
1 parent 2220e6e commit 20708e0
Show file tree
Hide file tree
Showing 56 changed files with 310 additions and 227 deletions.
3 changes: 2 additions & 1 deletion App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const supportedLanguages: string[] = [
"ms",
"es",
"it",
"ar",
];
const defaultLanguage = "en";
const defaultLocale = "en-us";
Expand All @@ -56,7 +57,7 @@ const App: React.FC = () => {
enableScreens();

let lang = localeExpo.substring(0, 2);

if (!includes(lang, supportedLanguages)) {
lang = defaultLanguage;
}
Expand Down
3 changes: 2 additions & 1 deletion app/components/NoEmission/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
NO_EMISSION_COMPONENT_TITLE: string;
Expand All @@ -18,4 +19,4 @@ interface TranslationKeys {
NO_EMISSION_COMPONENT_ADD_FIRST_EMISSION: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/components/OpenFoodFacts/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
OPEN_FOOD_FACTS_COMPONENT_DATA_FROM: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/components/PermissionsRequest/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
PERMISSIONS_REQUEST_COMPONENT_OPEN_SETTINGS: string;
Expand All @@ -19,4 +20,4 @@ interface TranslationKeys {
PERMISSIONS_REQUEST_COMPONENT_NOTIFICATION_SUBTITLE: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/About/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
ABOUT_SCREEN_TITLE: string;
Expand All @@ -26,4 +27,4 @@ interface TranslationKeys {
ABOUT_SCREEN_GITHUB: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Act/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
ACT_SCREEN_TAB_NAME: string;
Expand All @@ -20,4 +21,4 @@ interface TranslationKeys {
ACT_SCREEN_TECHNOLOGY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/ActDetail/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
ACT_DETAIL_SCREEN_TITLE: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/AddEmission/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
ADD_EMISSION_SCREEN_TAB_NAME: string;
Expand All @@ -33,4 +34,4 @@ interface TranslationKeys {
ADD_EMISSION_SCREEN_NAME: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
1 change: 1 addition & 0 deletions app/screens/BarCodeScan/translations/ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 2 additions & 1 deletion app/screens/BarCodeScan/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
BAR_CODE_SCAN_SCREEN_TITLE: string;
Expand All @@ -23,4 +24,4 @@ interface TranslationKeys {
BAR_CODE_SCAN_SCREEN_NO_CARBON_DATA_MESSAGE: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Budget/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
BUDGET_SCREEN_TAB_NAME: string;
Expand All @@ -34,4 +35,4 @@ interface TranslationKeys {
BUDGET_SCREEN_NUMBER_OF_DAYS_VEGETARIAN_WITHOUT_MEAT: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
1 change: 1 addition & 0 deletions app/screens/CategorySelection/translations/ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 2 additions & 1 deletion app/screens/CategorySelection/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
CATEGORY_SELECTION_SCREEN_TITLE: string;
CATEGORY_SELECTION_SCREEN_SELECT_CATEGORY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/ComingSoon/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
COMING_SOON_SCREEN_TITLE: string;
COMING_SOON_SCREEN_UNDER_DEVELOPMENT: string;
COMING_SOON_SCREEN_START_FOLLOW_US: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/EmissionItem/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
EMISSION_ITEM_SCREEN_EMISSION: string;
Expand All @@ -28,4 +29,4 @@ interface TranslationKeys {
EMISSION_ITEM_SCREEN_TIME: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Emissions/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
EMISSIONS_SCREEN_TAB_NAME: string;
Expand All @@ -19,4 +20,4 @@ interface TranslationKeys {
EMISSIONS_SCREEN_RECURRING_EMISSIONS: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Faq/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
FAQ_SCREEN_TITLE: string;
Expand All @@ -31,4 +32,4 @@ interface TranslationKeys {
FAQ_SCREEN_GREEN_WASHING_ANSWER: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/InfoModal/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
INFO_MODAL_SCREEN_METHODOLOGY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Intro/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
INTRO_SCREEN_WELCOME: string;
Expand All @@ -18,4 +19,4 @@ interface TranslationKeys {
INTRO_SCREEN_I_AGREE: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Languages/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
LANGUAGES_SCREEN_TITLE: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/MonthlyBudget/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
MONTHLY_BUDGET_SCREEN_TITLE: string;
Expand All @@ -28,4 +29,4 @@ interface TranslationKeys {
MONTHLY_BUDGET_SCREEN_PARIS_AGREEMENT: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/MonthlyEmissions/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
MONTHLY_EMISSIONS_SCREEN_OF_BUDGET: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/MyData/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
MY_DATA_SCREEN_TITLE: string;
Expand All @@ -26,4 +27,4 @@ interface TranslationKeys {
MY_DATA_SCREEN_GENERIC_ERROR: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/MyLocation/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
MY_LOCATION_SCREEN_TITLE: string;
MY_LOCATION_SCREEN_INTRO: string;
MY_LOCATION_SCREEN_MY_CARBON_INTENSITY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Notifications/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
NOTIFICATIONS_SCREEN_TITLE: string;
Expand All @@ -19,4 +20,4 @@ interface TranslationKeys {
NOTIFICATIONS_SCREEN_NOTIFICATION_BODY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
1 change: 1 addition & 0 deletions app/screens/Periodicity/translations/ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 2 additions & 1 deletion app/screens/Periodicity/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
PERIODICITY_MODAL_SCREEN_TITLE: string;
Expand All @@ -22,4 +23,4 @@ interface TranslationKeys {
PERIODICITY_MODAL_SCREEN_CANCEL_NO_PERIODICITY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/RecurringEmissions/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
RECURRING_EMISSIONS_SCREEN_TITLE: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/Settings/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
SETTINGS_SCREEN_TAB_NAME: string;
Expand All @@ -30,4 +31,4 @@ interface TranslationKeys {
SETTINGS_SCREEN_LANGUAGES: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
1 change: 1 addition & 0 deletions app/screens/SubCategorySelection/translations/ar.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
3 changes: 2 additions & 1 deletion app/screens/SubCategorySelection/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
SUB_CATEGORY_SELECTION_SCREEN_TITLE: string;
SUB_CATEGORY_SELECTION_SCREEN_SELECT_SUB_CATEGORY: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
3 changes: 2 additions & 1 deletion app/screens/SupportUs/translations/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import pl from "./pl.json";
import zh from "./zh.json";
import ms from "./ms.json";
import it from "./it.json";
import ar from "./ar.json";

interface TranslationKeys {
SUPPORT_US_SCREEN_TITLE: string;
Expand All @@ -19,4 +20,4 @@ interface TranslationKeys {
SUPPORT_US_SCREEN_PLATFORM: string;
}

export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, TranslationKeys };
export { en, fr, de, sv, es, pt, da, ru, pl, zh, ms, it, ar, TranslationKeys };
Loading

0 comments on commit 20708e0

Please sign in to comment.