Skip to content

Commit

Permalink
(chore) Bump i18next, react-i18next and i18next-parser and support pl…
Browse files Browse the repository at this point in the history
…uralization (#1413)

* (feat) Bump i18next and related packages

* Restored ar and es translations

* Restored ar.json
  • Loading branch information
vasharma05 committed Oct 18, 2023
1 parent e7cbedc commit 5ba3187
Show file tree
Hide file tree
Showing 20 changed files with 149 additions and 100 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"eslint-plugin-playwright": "^0.16.0",
"eslint-plugin-prettier": "^5.0.0",
"husky": "^8.0.3",
"i18next": "^19.7.0",
"i18next-parser": "^5.4.0",
"i18next": "^21.10.0",
"i18next-parser": "^6.6.0",
"identity-obj-proxy": "^3.0.0",
"jest": "^29.7.0",
"jest-cli": "^29.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ const FlagsHighlightBar: React.FC<FlagsHighlightBarProps> = ({ patientUuid }) =>
<Tag type="high-contrast" onClick={handleClick} className={styles.flagsHighlightTag}>
<span className={styles.flagIcon}>&#128681;</span>
<span className={styles.flagText}>
{t('flagCount', '{count} risk flag{plural}', {
{t('flagCount', '{count} risk flags', {
count: riskFlags.length,
plural: riskFlags.length > 1 ? 's' : '',
})}
</span>
{!showHighlightBar && <ArrowRight className={styles.arrow} size={16} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,8 @@ const FlagsList: React.FC<DefaultWorkspaceProps> = ({ patientUuid, closeWorkspac
{searchResults.length > 0 ? (
<>
<span className={styles.resultsCount}>
{t('matchesForSearchTerm', '{count} flag{plural}', {
{t('matchesForSearchTerm', '{count} flags', {
count: searchResults.length,
plural: searchResults.length > 1 ? 's' : '',
})}
</span>
<Dropdown
Expand Down
8 changes: 4 additions & 4 deletions packages/esm-patient-flags-app/translations/am.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalseone": "{count} risk flag{plural}",
"flagCountfalseother": "{count} risk flag{plural}",
"flagCount_one": "{count} risk flag",
"flagCount_other": "{count} risk flags",
"flagDisabled": "Flag disabled",
"flagDisabledSuccessfully": "Flag successfully disabled",
"flagDisableError": "Error disabling the flag",
"flagEnabled": "flag enabled",
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalseone": "{count} flag{plural}",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"matchesForSearchTerm_one": "{count} flag",
"matchesForSearchTerm_other": "{count} flags",
"noFlagsFound": "Sorry, no flags found matching your search",
"retiredFirst": "Retired first",
"saveAndClose": "Save & close",
Expand Down
24 changes: 12 additions & 12 deletions packages/esm-patient-flags-app/translations/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
"editFlags": "تعديل العلامات",
"enabledFlag": "تم تفعيل العلامة",
"enablingFlag": "جارٍ تفعيل العلامة...",
"flagCountfalsefew": "{count} علامة خطر{plural}",
"flagCountfalsemany": "{count} علامة خطر{plural}",
"flagCountfalseone": "{count} علامة خطر{plural}",
"flagCountfalseother": "{count} علامة خطر{plural}",
"flagCountfalsetwo": "{count} علامة خطر{plural}",
"flagCountfalsezero": "{count} علامة خطر{plural}",
"flagCount_zero": "{count} علامة خطر",
"flagCount_one": "{count} علامة خطر",
"flagCount_two": "{count} علامة خطر",
"flagCount_few": "{count} علامة خطر",
"flagCount_many": "{count} علامة خطر",
"flagCount_other": "{count} علامة خطر",
"flagDisabled": "تم تعطيل العلامة",
"flagDisabledSuccessfully": "تم تعطيل العلامة بنجاح",
"flagDisableError": "خطأ في تعطيل العلامة",
"flagEnabled": "تم تفعيل العلامة",
"flagEnabledSuccessfully": "تم تفعيل العلامة بنجاح",
"flagEnableError": "خطأ في تفعيل العلامة",
"loading": "جار التحميل",
"matchesForSearchTermfalsefew": "{count} علامة{plural}",
"matchesForSearchTermfalsemany": "{count} علامة{plural}",
"matchesForSearchTermfalseone": "{count} علامة{plural}",
"matchesForSearchTermfalseother": "{count} علامة{plural}",
"matchesForSearchTermfalsetwo": "{count} علامة{plural}",
"matchesForSearchTermfalsezero": "{count} علامة{plural}",
"matchesForSearchTerm_zero": "{count} علامة",
"matchesForSearchTerm_one": "{count} علامة",
"matchesForSearchTerm_two": "{count} علامة",
"matchesForSearchTerm_few": "{count} علامة",
"matchesForSearchTerm_many": "{count} علامة",
"matchesForSearchTerm_other": "{count} علامة",
"noFlagsFound": "عذرًا، لم يتم العثور على علامات تطابق بحثك",
"retiredFirst": "الأولوية للمحذوف",
"saveAndClose": "حفظ وإغلاق",
Expand Down
8 changes: 4 additions & 4 deletions packages/esm-patient-flags-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalseone": "{count} risk flag{plural}",
"flagCountfalseother": "{count} risk flag{plural}",
"flagCount_one": "{count} risk flag",
"flagCount_other": "{count} risk flags",
"flagDisabled": "Flag disabled",
"flagDisabledSuccessfully": "Flag successfully disabled",
"flagDisableError": "Error disabling the flag",
"flagEnabled": "flag enabled",
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalseone": "{count} flag{plural}",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"matchesForSearchTerm_one": "{count} flag",
"matchesForSearchTerm_other": "{count} flags",
"noFlagsFound": "Sorry, no flags found matching your search",
"retiredFirst": "Retired first",
"saveAndClose": "Save & close",
Expand Down
12 changes: 6 additions & 6 deletions packages/esm-patient-flags-app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"editFlags": "Editar banderas",
"enabledFlag": "Bandera activada",
"enablingFlag": "Activando bandera...",
"flagCountfalsemany": "{count} risk flag{plural}",
"flagCountfalseone": "{count} bandera de riesgo",
"flagCountfalseother": "{count} banderas de riesgo",
"flagCount_one": "{count} bandera de riesgo",
"flagCount_many": "{count} banderas de riesgo",
"flagCount_other": "{count} banderas de riesgo",
"flagDisabled": "Bandera desactivada",
"flagDisabledSuccessfully": "Bandera desactivada con éxito",
"flagDisableError": "Error al desactivar la bandera",
"flagEnabled": "Bandera activada",
"flagEnabledSuccessfully": "Bandera activada con éxito",
"flagEnableError": "Error al activar la bandera",
"loading": "Cargando",
"matchesForSearchTermfalsemany": "{count} flag{plural}",
"matchesForSearchTermfalseone": "{count} bandera",
"matchesForSearchTermfalseother": "{count} banderas",
"matchesForSearchTerm_one": "{count} bandera",
"matchesForSearchTerm_many": "{count} banderas",
"matchesForSearchTerm_other": "{count} banderas",
"noFlagsFound": "Lo siento, no se encontraron banderas que coincidan con su búsqueda",
"retiredFirst": "Retirar primero",
"saveAndClose": "Guardar y cerrar",
Expand Down
12 changes: 6 additions & 6 deletions packages/esm-patient-flags-app/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalsemany": "{count} risk flag{plural}",
"flagCountfalseone": "{count} risk flag{plural}",
"flagCountfalseother": "{count} risk flag{plural}",
"flagCount_one": "{count} risk flag",
"flagCount_many": "{count} risk flags",
"flagCount_other": "{count} risk flags",
"flagDisabled": "Flag disabled",
"flagDisabledSuccessfully": "Flag successfully disabled",
"flagDisableError": "Error disabling the flag",
"flagEnabled": "flag enabled",
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalsemany": "{count} flag{plural}",
"matchesForSearchTermfalseone": "{count} flag{plural}",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"matchesForSearchTerm_one": "{count} flag",
"matchesForSearchTerm_many": "{count} flags",
"matchesForSearchTerm_other": "{count} flags",
"noFlagsFound": "Sorry, no flags found matching your search",
"retiredFirst": "Retired first",
"saveAndClose": "Save & close",
Expand Down
16 changes: 8 additions & 8 deletions packages/esm-patient-flags-app/translations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalsemany": "{count} risk flag{plural}",
"flagCountfalseone": "{count} risk flag{plural}",
"flagCountfalseother": "{count} risk flag{plural}",
"flagCountfalsetwo": "{count} risk flag{plural}",
"flagCount_one": "{count} risk flag",
"flagCount_two": "{count} risk flags",
"flagCount_many": "{count} risk flags",
"flagCount_other": "{count} risk flags",
"flagDisabled": "Flag disabled",
"flagDisabledSuccessfully": "Flag successfully disabled",
"flagDisableError": "Error disabling the flag",
"flagEnabled": "flag enabled",
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalsemany": "{count} flag{plural}",
"matchesForSearchTermfalseone": "{count} flag{plural}",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"matchesForSearchTermfalsetwo": "{count} flag{plural}",
"matchesForSearchTerm_one": "{count} flag",
"matchesForSearchTerm_two": "{count} flags",
"matchesForSearchTerm_many": "{count} flags",
"matchesForSearchTerm_other": "{count} flags",
"noFlagsFound": "Sorry, no flags found matching your search",
"retiredFirst": "Retired first",
"saveAndClose": "Save & close",
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-patient-flags-app/translations/km.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"editFlags": "Edit flags",
"enabledFlag": "Enabled flag",
"enablingFlag": "Enabling flag...",
"flagCountfalseother": "{count} risk flag{plural}",
"flagCount_other": "{count} risk flags",
"flagDisabled": "Flag disabled",
"flagDisabledSuccessfully": "Flag successfully disabled",
"flagDisableError": "Error disabling the flag",
"flagEnabled": "flag enabled",
"flagEnabledSuccessfully": "Flag successfully enabled",
"flagEnableError": "Error enabling flag",
"loading": "Loading",
"matchesForSearchTermfalseother": "{count} flag{plural}",
"matchesForSearchTerm_other": "{count} flags",
"noFlagsFound": "Sorry, no flags found matching your search",
"retiredFirst": "Retired first",
"saveAndClose": "Save & close",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,9 @@ function TestTypeSearchResults({ searchTerm, openOrderForm, focusAndClearSearchI
{searchTerm && (
<div className={styles.orderBasketSearchResultsHeader}>
<span className={styles.searchResultsCount}>
{t('searchResultsMatchesForTerm', '{count} result{plural} for "{searchTerm}"', {
{t('searchResultsMatchesForTerm', '{count} results for "{searchTerm}"', {
count: testTypes?.length,
searchTerm,
plural: testTypes?.length === 0 || testTypes?.length > 1 ? 's' : '',
})}
</span>
<Button kind="ghost" onClick={focusAndClearSearchInput} size={isTablet ? 'md' : 'sm'}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,9 @@ export default function OrderBasketSearchResults({
<div className={styles.container}>
<div className={styles.orderBasketSearchResultsHeader}>
<span className={styles.searchResultsCount}>
{t('searchResultsMatchesForTerm', '{count} result{plural} for "{searchTerm}"', {
{t('searchResultsMatchesForTerm', '{count} results for "{searchTerm}"', {
count: drugs?.length,
searchTerm,
plural: drugs?.length === 0 || drugs?.length > 1 ? 's' : '',
})}
</span>
<Button kind="ghost" onClick={focusAndClearSearchInput} size={isTablet ? 'md' : 'sm'}>
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-patient-medications-app/translations/am.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"saveOrder": "Save order",
"searchAgain": "search again",
"searchFieldPlaceholder": "Search for a drug or orderset (e.g. \"Aspirin\")",
"searchResultsMatchesForTermfalseone": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseother": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTerm_one": "{count} result for \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} results for \"{searchTerm}\"",
"startDate": "Start date",
"takeAsNeeded": "Take as needed",
"tryReopeningTheForm": "Please try launching the form again",
Expand Down
12 changes: 6 additions & 6 deletions packages/esm-patient-medications-app/translations/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
"saveOrder": "حفظ الطلب",
"searchAgain": "ابحث مرة أخرى",
"searchFieldPlaceholder": "ابحث عن دواء أو مجموعة طلبات (مثل \"أسبرين\")",
"searchResultsMatchesForTermfalsefew": "{count} نتيجة لـ \"{searchTerm}\"",
"searchResultsMatchesForTermfalsemany": "{count} نتائج لـ \"{searchTerm}\"",
"searchResultsMatchesForTermfalseone": "{count} نتيجة لـ \"{searchTerm}\"",
"searchResultsMatchesForTermfalseother": "{count} نتائج لـ \"{searchTerm}\"",
"searchResultsMatchesForTermfalsetwo": "{count} نتيجتين لـ \"{searchTerm}\"",
"searchResultsMatchesForTermfalsezero": "لا نتائج لـ \"{searchTerm}\"",
"searchResultsMatchesForTerm_zero": "لا نتائج لـ \"{searchTerm}\"",
"searchResultsMatchesForTerm_one": "{count} نتيجة لـ \"{searchTerm}\"",
"searchResultsMatchesForTerm_two": "{count} نتيجتين لـ \"{searchTerm}\"",
"searchResultsMatchesForTerm_few": "{count} نتيجة لـ \"{searchTerm}\"",
"searchResultsMatchesForTerm_many": "{count} نتائج لـ \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} نتائج لـ \"{searchTerm}\"",
"startDate": "تاريخ البداية",
"takeAsNeeded": "خذ حسب الحاجة",
"tryReopeningTheForm": "يرجى محاولة فتح النموذج مرة أخرى",
Expand Down
4 changes: 2 additions & 2 deletions packages/esm-patient-medications-app/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
"saveOrder": "Save order",
"searchAgain": "search again",
"searchFieldPlaceholder": "Search for a drug or orderset (e.g. \"Aspirin\")",
"searchResultsMatchesForTermfalseone": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseother": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTerm_one": "{count} result for \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} results for \"{searchTerm}\"",
"startDate": "Start date",
"takeAsNeeded": "Take as needed",
"tryReopeningTheForm": "Please try launching the form again",
Expand Down
6 changes: 3 additions & 3 deletions packages/esm-patient-medications-app/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
"saveOrder": "Guardar pedido",
"searchAgain": "buscar de nuevo",
"searchFieldPlaceholder": "Buscar un medicamento o un conjunto de órdenes (por ejemplo, \"Aspirina\")",
"searchResultsMatchesForTermfalsemany": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseone": "{count} resultado {plural} para \"{searchTerm}\"",
"searchResultsMatchesForTermfalseother": "{count} resultado {plural} para \"{searchTerm}\"",
"searchResultsMatchesForTerm_one": "{count} result for \"{searchTerm}\"",
"searchResultsMatchesForTerm_many": "{count} results for \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} results for \"{searchTerm}\"",
"startDate": "Fecha de inicio",
"takeAsNeeded": "Tomar según sea necesario",
"tryReopeningTheForm": "Intente abrir el formulario de nuevo",
Expand Down
6 changes: 3 additions & 3 deletions packages/esm-patient-medications-app/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@
"saveOrder": "Save order",
"searchAgain": "search again",
"searchFieldPlaceholder": "Search for a drug or orderset (e.g. \"Aspirin\")",
"searchResultsMatchesForTermfalsemany": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseone": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseother": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTerm_one": "{count} result for \"{searchTerm}\"",
"searchResultsMatchesForTerm_many": "{count} results for \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} results for \"{searchTerm}\"",
"startDate": "Start date",
"takeAsNeeded": "Take as needed",
"tryReopeningTheForm": "Please try launching the form again",
Expand Down
8 changes: 4 additions & 4 deletions packages/esm-patient-medications-app/translations/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@
"saveOrder": "שמירת הזמנה",
"searchAgain": "חיפוש מחדש",
"searchFieldPlaceholder": "חפש תרופה או סט הזמנות (לדוגמה: \"אספירין\")",
"searchResultsMatchesForTermfalsemany": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseone": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalseother": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTermfalsetwo": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTerm_one": "{count} result for \"{searchTerm}\"",
"searchResultsMatchesForTerm_two": "{count} results for \"{searchTerm}\"",
"searchResultsMatchesForTerm_many": "{count} results for \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} results for \"{searchTerm}\"",
"startDate": "תאריך התחלה",
"takeAsNeeded": "לקחת כפי הצורך",
"tryReopeningTheForm": "נסה לפתוח את הטופס שוב",
Expand Down
2 changes: 1 addition & 1 deletion packages/esm-patient-medications-app/translations/km.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"saveOrder": "រក្សាទុកវេជ្ជបញ្ជា",
"searchAgain": "search again",
"searchFieldPlaceholder": "ស្វែងរកវេជ្ជបញ្ជា (ឧ. \"Aspirin\")",
"searchResultsMatchesForTermfalseother": "{count} result{plural} for \"{searchTerm}\"",
"searchResultsMatchesForTerm_other": "{count} results for \"{searchTerm}\"",
"startDate": "ថ្ងៃចាប់ផ្តើម",
"takeAsNeeded": "យកតាមតម្រូវការ",
"tryReopeningTheForm": "Please try launching the form again",
Expand Down

0 comments on commit 5ba3187

Please sign in to comment.