Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n: enable i18next plurals #2743

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/renderer/common/components/ImportAnnotationsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ export const ImportAnnotationsDialog: React.FC<React.PropsWithChildren<{ winId:
<span>{originTitle ? __("dialog.annotations.origin", { title: originTitle, author: originCreator ? __("dialog.annotations.descAuthor", { author: originCreator }) : "" }) : ""}</span>
<span>{title ? `${__("dialog.annotations.descTitle")}'${title}'` : ""}</span>
<span>{annotationsList.length ? __("dialog.annotations.descList", {
nb: annotationsList.length,
count: annotationsList.length,
creator: creatorNameList.length ? `${__("dialog.annotations.descCreator")} '${creatorNameList.join(", ")}'` : "", // TODO i18n
title: publicationTitle,
author: authors[0] ? __("dialog.annotations.descAuthor", { author: authors[0] }) : "",
}) : <></>}</span>
<span>{annotationsConflictListNewer.length ? __("dialog.annotations.descNewer", { nb: annotationsConflictListNewer.length }) : <></>}</span>
<span>{annotationsConflictListOlder.length ? __("dialog.annotations.descOlder", { nb: annotationsConflictListOlder.length }) : <></>}</span>
<span>{annotationsConflictListNewer.length ? __("dialog.annotations.descNewer", { count: annotationsConflictListNewer.length }) : <></>}</span>
<span>{annotationsConflictListOlder.length ? __("dialog.annotations.descOlder", { count: annotationsConflictListOlder.length }) : <></>}</span>
</AlertDialog.Description>
<div className={stylesAlertModals.AlertDialogButtonContainer}>
<AlertDialog.Cancel asChild onClick={() => dispatch(annotationActions.importConfirmOrAbort.build("abort"))}>
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/reader/components/ReaderMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU
<AlertDialog.Content className={stylesAlertModals.AlertDialogContent}>
<AlertDialog.Title className={stylesAlertModals.AlertDialogTitle}>{__("dialog.deleteAnnotations")}</AlertDialog.Title>
<AlertDialog.Description className={stylesAlertModals.AlertDialogDescription}>
{__("dialog.deleteAnnotationsText", { annotationListLength: annotationListFiltered.length })}
{__("dialog.deleteAnnotationsText", { count: annotationListFiltered.length })}
</AlertDialog.Description>
<div className={stylesAlertModals.AlertDialogButtonContainer}>
<AlertDialog.Cancel asChild>
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/reader/components/ReaderMenuSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class ReaderMenuSearch extends React.Component<IProps, IState> {
const { __ } = this.props;

const label = this.props.foundArray?.length ?
__("reader.picker.search.founds", {nResults: this.props.foundArray.length}) :
__("reader.picker.search.founds", {count: this.props.foundArray.length}) :
__("reader.picker.search.notFound");

const memoJsx = renderSearchLinks(label, this.props.foundArray, this.state.nMatchPage, this.props.readingOrder, this.props.toc, this.props.dockedMode, this);
Expand Down Expand Up @@ -301,7 +301,7 @@ class ReaderMenuSearch extends React.Component<IProps, IState> {
margin: 0,
marginTop: "-16px",
marginBottom: "20px",
}}>{`[ ${begin === end ? `${end}` : `${begin} ... ${end}`} ] / ${__("reader.picker.search.founds", {nResults: this.props.foundArray.length})}`}</p>
}}>{`[ ${begin === end ? `${end}` : `${begin} ... ${end}`} ] / ${__("reader.picker.search.founds", {count: this.props.foundArray.length})}`}</p>
: <></>
}
</>);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/reader/components/picker/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class SearchPicker extends React.Component<IProps, IState> {

const found = foundNumber === 0 ?
__("reader.picker.search.notFound") :
__("reader.picker.search.founds", {nResults: foundNumber});
__("reader.picker.search.founds", {count: foundNumber});

this.loadSeq = this.props.isPdf ? 999 : (this.loadSeq || 0) + 1;

Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "تم العثور على {{- nResults}} تطابقات",
"founds": "تم العثور على {{- count}} تطابقات",
"input": "النص المطلوب مطابقته",
"next": "التالي",
"notFound": "لم يتم العثور على تطابقات",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} съвпадение(ия)",
"founds": "{{- count}} съвпадение(ия)",
"input": "текст за търсене",
"next": "Следващ",
"notFound": "няма съвпадения",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} trobat/s",
"founds": "{{- count}} trobat/s",
"input": "text de cerca",
"next": "Següent",
"notFound": "no hi ha coincidències",
Expand Down
10 changes: 5 additions & 5 deletions src/resources/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
"annotations": {
"descAuthor": "af {{- author}}",
"descCreator": "",
"descList": "{{- nb}} note(r) fra {{- creator}} vil blive associeret med {{- title}} {{- author}}",
"descNewer": "{{- nb}} nyere version af disse noter er allerede associeret med denne bog.",
"descOlder": "{{- nb}} ældre version af disse noter er allerede associeret med denne bog.",
"descList": "{{- count}} note(r) fra {{- creator}} vil blive associeret med {{- title}} {{- author}}",
"descNewer": "{{- count}} nyere version af disse noter er allerede associeret med denne bog.",
"descOlder": "{{- count}} ældre version af disse noter er allerede associeret med denne bog.",
"descTitle": "Navn på notesamling:",
"importAll": "Importér alle noter",
"importWithoutConflict": "Importér noter uden sammenfald",
Expand All @@ -134,7 +134,7 @@
},
"cancel": "Annullér",
"deleteAnnotations": "Slet alle noter?",
"deleteAnnotationsText": "Vil du slette {{- annotationListLength}} note(r)?",
"deleteAnnotationsText": "Vil du slette {{- count}} note(r)?",
"deleteFeed": "Bekræft at du vil slette dette katalog",
"deletePublication": "Bekræft at du vil slette bogen",
"import": "Bekræft at du vil importere disse filer:",
Expand Down Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} resultat(er)",
"founds": "{{- count}} resultat(er)",
"input": "søgetekst",
"next": "Næste",
"notFound": "ingen resultater",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} Fundstelle(n)",
"founds": "{{- count}} Fundstelle(n)",
"input": "Text suchen",
"next": "Nächste",
"notFound": "keine Treffer",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} αποτελέσματα",
"founds": "{{- count}} αποτελέσματα",
"input": "Κείμενο προς ανάκτηση",
"next": "Επόμενο",
"notFound": "Καμία αντιστοιχία",
Expand Down
15 changes: 10 additions & 5 deletions src/resources/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,12 @@
"annotations": {
"descAuthor": "by '{{- author}}'",
"descCreator": "created by",
"descList": "{{- nb}} note(s) {{- creator}} will be imported into '{{- title}}' {{- author}}",
"descNewer": "Conflict(s): {{- nb}} newer note(s)",
"descOlder": "Conflict(s): {{- nb}} older note(s)",
"descList_one": "{{- count}} note {{- creator}} will be imported into '{{- title}}' {{- author}}",
"descList_other": "{{- count}} notes {{- creator}} will be imported into '{{- title}}' {{- author}}",
"descNewer_one": "Conflict(s): {{- count}} newer note",
"descNewer_other": "Conflict(s): {{- count}} newer notes",
"descOlder_one": "Conflict(s): {{- count}} older note",
"descOlder_other": "Conflict(s): {{- count}} older notes",
"descTitle": "Annotations title: ",
"importAll": "Import all notes",
"importWithoutConflict": "Import only conflict-free notes",
Expand All @@ -134,7 +137,8 @@
},
"cancel": "Cancel",
"deleteAnnotations": "Delete annotations?",
"deleteAnnotationsText": "Are you sure you want to delete {{- annotationListLength}} note(s)?",
"deleteAnnotationsText_one": "Are you sure you want to delete {{- count}} note?",
"deleteAnnotationsText_other": "Are you sure you want to delete {{- count}} notes?",
"deleteFeed": "Delete catalog?",
"deletePublication": "Delete publication?",
"import": "Confirm import:",
Expand Down Expand Up @@ -432,7 +436,8 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} match(es)",
"founds_one": "{{- count}} match",
"founds_other": "{{- count}} matches",
"input": "text to match",
"next": "Next",
"notFound": "no matches",
Expand Down
10 changes: 5 additions & 5 deletions src/resources/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
"annotations": {
"descAuthor": "de {{- author}}",
"descCreator": "",
"descList": "{{- nb}} la nota o notas de {{- creator}} se asociarán a {{- title}} {{- author}}",
"descNewer": "{{- nb}} las versiones más recientes de estas notas ya están asociadas a la publicación.",
"descOlder": "{{- nb}} las versiones más antiguas de estas notas ya están asociadas a la publicación.",
"descList": "{{- count}} la nota o notas de {{- creator}} se asociarán a {{- title}} {{- author}}",
"descNewer": "{{- count}} las versiones más recientes de estas notas ya están asociadas a la publicación.",
"descOlder": "{{- count}} las versiones más antiguas de estas notas ya están asociadas a la publicación.",
"descTitle": "Establecer título de anotación",
"importAll": "Importar todas las notas",
"importWithoutConflict": "Importar notas sin conflictos",
Expand All @@ -134,7 +134,7 @@
},
"cancel": "Cancelar",
"deleteAnnotations": "¿Eliminar anotaciones?",
"deleteAnnotationsText": "¿Quieres eliminar {{- annotationListLength}} anotación/es?",
"deleteAnnotationsText": "¿Quieres eliminar {{- count}} anotación/es?",
"deleteFeed": "¿Seguro que quieres eliminar este catálogo?",
"deletePublication": "¿Seguro que quieres eliminar esta publicación?",
"import": "¿Seguro que quieres importar estos ficheros?",
Expand Down Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} encontrado/s",
"founds": "{{- count}} encontrado/s",
"input": "texto de búsqueda",
"next": "Siguiente",
"notFound": "no hay coincidencias",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} aurkitutako",
"founds": "{{- count}} aurkitutako",
"input": "bilaketa-testua",
"next": "Hurrengoa",
"notFound": "ez dago bat etortzerik",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} osuma(a)",
"founds": "{{- count}} osuma(a)",
"input": "etsittävä teksti",
"next": "Seuraava",
"notFound": "ei osumia",
Expand Down
10 changes: 5 additions & 5 deletions src/resources/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
"annotations": {
"descAuthor": "par {{- author}}",
"descCreator": "créées par",
"descList": "{{- nb}} note(s) {{- creator}} seront importées vers {{- title}} {{- author}}",
"descNewer": "{{- nb}} conflits: certaines notes associées à la publication sont plus récentes",
"descOlder": "{{- nb}} conflits: certaines notes associées à la publication sont plus anciennes",
"descList": "{{- count}} note(s) {{- creator}} seront importées vers {{- title}} {{- author}}",
"descNewer": "{{- count}} conflits: certaines notes associées à la publication sont plus récentes",
"descOlder": "{{- count}} conflits: certaines notes associées à la publication sont plus anciennes",
"descTitle": "Titre de la liste de notes : ",
"importAll": "Importer toutes les notes",
"importWithoutConflict": "Importer les notes sans conflits",
Expand All @@ -134,7 +134,7 @@
},
"cancel": "Annuler",
"deleteAnnotations": "Supprimer la note",
"deleteAnnotationsText": "Voulez-vous supprimer {{- annotationListLength}} note(s) ?",
"deleteAnnotationsText": "Voulez-vous supprimer {{- count}} note(s) ?",
"deleteFeed": "Supprimer ce catalogue ?",
"deletePublication": "Supprimer ce livre ?",
"import": "Confirmer l'ajout :",
Expand Down Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} correspondance(s)",
"founds": "{{- count}} correspondance(s)",
"input": "Texte à trouver",
"next": "Suivant",
"notFound": "Auncune correspondance",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} atopado/s",
"founds": "{{- count}} atopado/s",
"input": "texto de procura",
"next": "Seguinte",
"notFound": "non hai coincidencias",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} podudaranje(a)",
"founds": "{{- count}} podudaranje(a)",
"input": "tekst za pretragu",
"next": "Sljedeće",
"notFound": "bez podudaranja",
Expand Down
10 changes: 5 additions & 5 deletions src/resources/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@
"annotations": {
"descAuthor": "di {{- author}}",
"descCreator": "",
"descList": "{{- nb}} note di {{- creator}} saranno associate a {{- title}} {{- author}}",
"descNewer": "{{- nb}} nuove versioni di queste note sono già associate alla pubblicazione.",
"descOlder": "{{- nb}} versioni precedenti di queste note sono già associate alla pubblicazione.",
"descList": "{{- count}} note di {{- creator}} saranno associate a {{- title}} {{- author}}",
"descNewer": "{{- count}} nuove versioni di queste note sono già associate alla pubblicazione.",
"descOlder": "{{- count}} versioni precedenti di queste note sono già associate alla pubblicazione.",
"descTitle": "Titolo del set:",
"importAll": "Importa tutte le note",
"importWithoutConflict": "Importa le note senza conflitti",
Expand All @@ -134,7 +134,7 @@
},
"cancel": "Annulla",
"deleteAnnotations": "Eliminare la nota?",
"deleteAnnotationsText": "Si desidera eliminare {{- annotationListLength}} note?",
"deleteAnnotationsText": "Si desidera eliminare {{- count}} note?",
"deleteFeed": "Vuoi davvero eliminare questo catalogo ?",
"deletePublication": "Vuoi davvero eliminare questa pubblicazione ?",
"import": "Vuoi davvero importare questi files:",
Expand Down Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} risultato/i",
"founds": "{{- count}} risultato/i",
"input": "testo ta cercare",
"next": "Prossimo",
"notFound": "Nessun risultato",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "(一致した数:{{- nResults}})",
"founds": "(一致した数:{{- count}})",
"input": "検索したい語句",
"next": "次へ",
"notFound": "一致しませんでした",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/ka.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "ნაპოვნია {{- nResults}} დამთხვევა",
"founds": "ნაპოვნია {{- count}} დამთხვევა",
"input": "საძიებო ტექსტი",
"next": "მომდევნო",
"notFound": "არაფერია ნაპოვნი",
Expand Down
2 changes: 1 addition & 1 deletion src/resources/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} 일치",
"founds": "{{- count}} 일치",
"input": "텍스트 입력",
"next": "다음",
"notFound": "일치하는 내용이 없습니다.",
Expand Down
20 changes: 15 additions & 5 deletions src/resources/locales/lt.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,15 @@
"annotations": {
"descAuthor": "'{{- author}}'",
"descCreator": ", kurią(-ias) sukūrė",
"descList": "{{- nb}} pastaba(-os, -ų){{- creator}}, bus susietos su {{- author}} leidiniu '{{- title}}'",
"descNewer": "Konfliktas(-ai): {{- nb}} naujesnė(-s, -ių) pastaba(-os, -ų)",
"descOlder": "Konfliktas(-ai): {{- nb}} senesnė(-s, -ių) pastaba(-os, -ų)",
"descList_one": "{{- count}} pastaba{{- creator}}, bus susieta su {{- author}} leidiniu '{{- title}}'",
"descList_few": "{{- count}} pastabos{{- creator}}, bus susietos su {{- author}} leidiniu '{{- title}}'",
"descList_other": "{{- count}} pastabų{{- creator}}, bus susietos su {{- author}} leidiniu '{{- title}}'",
"descNewer_one": "Konfliktas(-ai): {{- count}} naujesnė pastaba",
"descNewer_few": "Konfliktas(-ai): {{- count}} naujesnės pastabos",
"descNewer_other": "Konfliktas(-ai): {{- count}} naujesnių pastabų",
"descOlder_one": "Konfliktas(-ai): {{- count}} senesnė pastaba",
"descOlder_few": "Konfliktas(-ai): {{- count}} senesnės pastabos",
"descOlder_other": "Konfliktas(-ai): {{- count}} senesnių pastabų",
"descTitle": "Pastabų pavadinimas: ",
"importAll": "Importuoti visas pastabas",
"importWithoutConflict": "Importuoti pastabas, neturinčias konfliktų",
Expand All @@ -134,7 +140,9 @@
},
"cancel": "Nutraukti",
"deleteAnnotations": "Šalinti pastabas?",
"deleteAnnotationsText": "Ar norite pašalinti {{- annotationListLength}} pastabą(-as, -ų)?",
"deleteAnnotationsText_one": "Ar norite pašalinti {{- count}} pastabą?",
"deleteAnnotationsText_few": "Ar norite pašalinti {{- count}} pastabas?",
"deleteAnnotationsText_other": "Ar norite pašalinti {{- count}} pastabų?",
"deleteFeed": "Pašalinti katalogą?",
"deletePublication": "Pašalinti leidinį?",
"import": "Patvirtinkite importą:",
Expand Down Expand Up @@ -432,7 +440,9 @@
},
"picker": {
"search": {
"founds": "{{- nResults}} atitikmuo(-ys, -ų)",
"founds_one": "{{- count}} atitikmuo",
"founds_few": "{{- count}} atitikmenys",
"founds_other": "{{- count}} atitikmenų",
"input": "ieškomas tekstas",
"next": "Kitas",
"notFound": "atitikmenų nėra",
Expand Down
Loading
Loading