From 9758b15c9e2fcdc09642369e4ef8eeb551a7c2c5 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Wed, 1 Jan 2025 12:21:02 +0200 Subject: [PATCH 1/3] i18n: add support for plurals Use the `count` placeholder name for strings which might have different translations depending on the number of results, which enables nicer messages, e.g. "1 match" instead of "1 match(es)". `count` is the reserved placeholder for plural forms used in i18next[1]. Translations can use different suffixes to provide the right messages for all the plural forms applicable to that language. To find out which suffixes should be used for a particular language, this JSFiddle[2] can be used. [1]: https://www.i18next.com/translation-function/plurals [2]: https://jsfiddle.net/6bpxsgd4 --- .../common/components/ImportAnnotationsDialog.tsx | 6 +++--- src/renderer/reader/components/ReaderMenu.tsx | 2 +- src/renderer/reader/components/ReaderMenuSearch.tsx | 4 ++-- src/renderer/reader/components/picker/Search.tsx | 2 +- src/resources/locales/ar.json | 2 +- src/resources/locales/bg.json | 2 +- src/resources/locales/ca.json | 2 +- src/resources/locales/da.json | 10 +++++----- src/resources/locales/de.json | 2 +- src/resources/locales/el.json | 2 +- src/resources/locales/en.json | 10 +++++----- src/resources/locales/es.json | 10 +++++----- src/resources/locales/eu.json | 2 +- src/resources/locales/fi.json | 2 +- src/resources/locales/fr.json | 10 +++++----- src/resources/locales/gl.json | 2 +- src/resources/locales/hr.json | 2 +- src/resources/locales/it.json | 10 +++++----- src/resources/locales/ja.json | 2 +- src/resources/locales/ka.json | 2 +- src/resources/locales/ko.json | 2 +- src/resources/locales/lt.json | 10 +++++----- src/resources/locales/nl.json | 2 +- src/resources/locales/pt-br.json | 2 +- src/resources/locales/pt-pt.json | 10 +++++----- src/resources/locales/ru.json | 2 +- src/resources/locales/sl.json | 2 +- src/resources/locales/sv.json | 10 +++++----- src/resources/locales/zh-cn.json | 2 +- src/resources/locales/zh-tw.json | 10 +++++----- 30 files changed, 69 insertions(+), 69 deletions(-) diff --git a/src/renderer/common/components/ImportAnnotationsDialog.tsx b/src/renderer/common/components/ImportAnnotationsDialog.tsx index 45b74cd8f..c03961d79 100644 --- a/src/renderer/common/components/ImportAnnotationsDialog.tsx +++ b/src/renderer/common/components/ImportAnnotationsDialog.tsx @@ -71,13 +71,13 @@ export const ImportAnnotationsDialog: React.FC{originTitle ? __("dialog.annotations.origin", { title: originTitle, author: originCreator ? __("dialog.annotations.descAuthor", { author: originCreator }) : "" }) : ""} {title ? `${__("dialog.annotations.descTitle")}'${title}'` : ""} {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] }) : "", }) : <>} - {annotationsConflictListNewer.length ? __("dialog.annotations.descNewer", { nb: annotationsConflictListNewer.length }) : <>} - {annotationsConflictListOlder.length ? __("dialog.annotations.descOlder", { nb: annotationsConflictListOlder.length }) : <>} + {annotationsConflictListNewer.length ? __("dialog.annotations.descNewer", { count: annotationsConflictListNewer.length }) : <>} + {annotationsConflictListOlder.length ? __("dialog.annotations.descOlder", { count: annotationsConflictListOlder.length }) : <>}
dispatch(annotationActions.importConfirmOrAbort.build("abort"))}> diff --git a/src/renderer/reader/components/ReaderMenu.tsx b/src/renderer/reader/components/ReaderMenu.tsx index 46f4996e1..c16559a8b 100644 --- a/src/renderer/reader/components/ReaderMenu.tsx +++ b/src/renderer/reader/components/ReaderMenu.tsx @@ -1203,7 +1203,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU {__("dialog.deleteAnnotations")} - {__("dialog.deleteAnnotationsText", { annotationListLength: annotationListFiltered.length })} + {__("dialog.deleteAnnotationsText", { count: annotationListFiltered.length })}
diff --git a/src/renderer/reader/components/ReaderMenuSearch.tsx b/src/renderer/reader/components/ReaderMenuSearch.tsx index 32ed15e8c..42cf3c8e2 100644 --- a/src/renderer/reader/components/ReaderMenuSearch.tsx +++ b/src/renderer/reader/components/ReaderMenuSearch.tsx @@ -219,7 +219,7 @@ class ReaderMenuSearch extends React.Component { 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); @@ -301,7 +301,7 @@ class ReaderMenuSearch extends React.Component { margin: 0, marginTop: "-16px", marginBottom: "20px", - }}>{`[ ${begin === end ? `${end}` : `${begin} ... ${end}`} ] / ${__("reader.picker.search.founds", {nResults: this.props.foundArray.length})}`}

+ }}>{`[ ${begin === end ? `${end}` : `${begin} ... ${end}`} ] / ${__("reader.picker.search.founds", {count: this.props.foundArray.length})}`}

: <> } ); diff --git a/src/renderer/reader/components/picker/Search.tsx b/src/renderer/reader/components/picker/Search.tsx index db874d3bf..f9cc84240 100644 --- a/src/renderer/reader/components/picker/Search.tsx +++ b/src/renderer/reader/components/picker/Search.tsx @@ -102,7 +102,7 @@ class SearchPicker extends React.Component { 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; diff --git a/src/resources/locales/ar.json b/src/resources/locales/ar.json index f9c77d475..2ae4cceff 100644 --- a/src/resources/locales/ar.json +++ b/src/resources/locales/ar.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "تم العثور على {{- nResults}} تطابقات", + "founds": "تم العثور على {{- count}} تطابقات", "input": "النص المطلوب مطابقته", "next": "التالي", "notFound": "لم يتم العثور على تطابقات", diff --git a/src/resources/locales/bg.json b/src/resources/locales/bg.json index 25b70d95b..4232d3128 100644 --- a/src/resources/locales/bg.json +++ b/src/resources/locales/bg.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} съвпадение(ия)", + "founds": "{{- count}} съвпадение(ия)", "input": "текст за търсене", "next": "Следващ", "notFound": "няма съвпадения", diff --git a/src/resources/locales/ca.json b/src/resources/locales/ca.json index d5b949fb8..e774c37cf 100644 --- a/src/resources/locales/ca.json +++ b/src/resources/locales/ca.json @@ -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", diff --git a/src/resources/locales/da.json b/src/resources/locales/da.json index 296b12c1a..3dc459f68 100644 --- a/src/resources/locales/da.json +++ b/src/resources/locales/da.json @@ -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", @@ -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:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} resultat(er)", + "founds": "{{- count}} resultat(er)", "input": "søgetekst", "next": "Næste", "notFound": "ingen resultater", diff --git a/src/resources/locales/de.json b/src/resources/locales/de.json index c51e13546..425df6e60 100644 --- a/src/resources/locales/de.json +++ b/src/resources/locales/de.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} Fundstelle(n)", + "founds": "{{- count}} Fundstelle(n)", "input": "Text suchen", "next": "Nächste", "notFound": "keine Treffer", diff --git a/src/resources/locales/el.json b/src/resources/locales/el.json index acdc25de1..a00825423 100644 --- a/src/resources/locales/el.json +++ b/src/resources/locales/el.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} αποτελέσματα", + "founds": "{{- count}} αποτελέσματα", "input": "Κείμενο προς ανάκτηση", "next": "Επόμενο", "notFound": "Καμία αντιστοιχία", diff --git a/src/resources/locales/en.json b/src/resources/locales/en.json index b66b76a57..d89b9405a 100644 --- a/src/resources/locales/en.json +++ b/src/resources/locales/en.json @@ -123,9 +123,9 @@ "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": "{{- count}} note(s) {{- creator}} will be imported into '{{- title}}' {{- author}}", + "descNewer": "Conflict(s): {{- count}} newer note(s)", + "descOlder": "Conflict(s): {{- count}} older note(s)", "descTitle": "Annotations title: ", "importAll": "Import all notes", "importWithoutConflict": "Import only conflict-free notes", @@ -134,7 +134,7 @@ }, "cancel": "Cancel", "deleteAnnotations": "Delete annotations?", - "deleteAnnotationsText": "Are you sure you want to delete {{- annotationListLength}} note(s)?", + "deleteAnnotationsText": "Are you sure you want to delete {{- count}} note(s)?", "deleteFeed": "Delete catalog?", "deletePublication": "Delete publication?", "import": "Confirm import:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} match(es)", + "founds": "{{- count}} match(es)", "input": "text to match", "next": "Next", "notFound": "no matches", diff --git a/src/resources/locales/es.json b/src/resources/locales/es.json index f0f78664e..718cdd5fc 100644 --- a/src/resources/locales/es.json +++ b/src/resources/locales/es.json @@ -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", @@ -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?", @@ -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", diff --git a/src/resources/locales/eu.json b/src/resources/locales/eu.json index ec9b1e93e..fc5d387cf 100644 --- a/src/resources/locales/eu.json +++ b/src/resources/locales/eu.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} aurkitutako", + "founds": "{{- count}} aurkitutako", "input": "bilaketa-testua", "next": "Hurrengoa", "notFound": "ez dago bat etortzerik", diff --git a/src/resources/locales/fi.json b/src/resources/locales/fi.json index 40ff78690..a24b9ee20 100644 --- a/src/resources/locales/fi.json +++ b/src/resources/locales/fi.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} osuma(a)", + "founds": "{{- count}} osuma(a)", "input": "etsittävä teksti", "next": "Seuraava", "notFound": "ei osumia", diff --git a/src/resources/locales/fr.json b/src/resources/locales/fr.json index 7daccbdc1..1544d3527 100644 --- a/src/resources/locales/fr.json +++ b/src/resources/locales/fr.json @@ -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", @@ -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 :", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} correspondance(s)", + "founds": "{{- count}} correspondance(s)", "input": "Texte à trouver", "next": "Suivant", "notFound": "Auncune correspondance", diff --git a/src/resources/locales/gl.json b/src/resources/locales/gl.json index 9265c21e4..0ec98b2d1 100644 --- a/src/resources/locales/gl.json +++ b/src/resources/locales/gl.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} atopado/s", + "founds": "{{- count}} atopado/s", "input": "texto de procura", "next": "Seguinte", "notFound": "non hai coincidencias", diff --git a/src/resources/locales/hr.json b/src/resources/locales/hr.json index 345a7476a..c70558b38 100644 --- a/src/resources/locales/hr.json +++ b/src/resources/locales/hr.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} podudaranje(a)", + "founds": "{{- count}} podudaranje(a)", "input": "tekst za pretragu", "next": "Sljedeće", "notFound": "bez podudaranja", diff --git a/src/resources/locales/it.json b/src/resources/locales/it.json index 14ac511c3..2b0c536bd 100644 --- a/src/resources/locales/it.json +++ b/src/resources/locales/it.json @@ -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", @@ -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:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} risultato/i", + "founds": "{{- count}} risultato/i", "input": "testo ta cercare", "next": "Prossimo", "notFound": "Nessun risultato", diff --git a/src/resources/locales/ja.json b/src/resources/locales/ja.json index 657dbed9f..6a7466d73 100644 --- a/src/resources/locales/ja.json +++ b/src/resources/locales/ja.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "(一致した数:{{- nResults}})", + "founds": "(一致した数:{{- count}})", "input": "検索したい語句", "next": "次へ", "notFound": "一致しませんでした", diff --git a/src/resources/locales/ka.json b/src/resources/locales/ka.json index b9e26cac1..9aa973453 100644 --- a/src/resources/locales/ka.json +++ b/src/resources/locales/ka.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "ნაპოვნია {{- nResults}} დამთხვევა", + "founds": "ნაპოვნია {{- count}} დამთხვევა", "input": "საძიებო ტექსტი", "next": "მომდევნო", "notFound": "არაფერია ნაპოვნი", diff --git a/src/resources/locales/ko.json b/src/resources/locales/ko.json index aa8be494c..3eb445c2d 100644 --- a/src/resources/locales/ko.json +++ b/src/resources/locales/ko.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} 일치", + "founds": "{{- count}} 일치", "input": "텍스트 입력", "next": "다음", "notFound": "일치하는 내용이 없습니다.", diff --git a/src/resources/locales/lt.json b/src/resources/locales/lt.json index 54270df57..13d611668 100644 --- a/src/resources/locales/lt.json +++ b/src/resources/locales/lt.json @@ -123,9 +123,9 @@ "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": "{{- count}} pastaba(-os, -ų){{- creator}}, bus susietos su {{- author}} leidiniu '{{- title}}'", + "descNewer": "Konfliktas(-ai): {{- count}} naujesnė(-s, -ių) pastaba(-os, -ų)", + "descOlder": "Konfliktas(-ai): {{- count}} senesnė(-s, -ių) pastaba(-os, -ų)", "descTitle": "Pastabų pavadinimas: ", "importAll": "Importuoti visas pastabas", "importWithoutConflict": "Importuoti pastabas, neturinčias konfliktų", @@ -134,7 +134,7 @@ }, "cancel": "Nutraukti", "deleteAnnotations": "Šalinti pastabas?", - "deleteAnnotationsText": "Ar norite pašalinti {{- annotationListLength}} pastabą(-as, -ų)?", + "deleteAnnotationsText": "Ar norite pašalinti {{- count}} pastabą(-as, -ų)?", "deleteFeed": "Pašalinti katalogą?", "deletePublication": "Pašalinti leidinį?", "import": "Patvirtinkite importą:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} atitikmuo(-ys, -ų)", + "founds": "{{- count}} atitikmuo(-ys, -ų)", "input": "ieškomas tekstas", "next": "Kitas", "notFound": "atitikmenų nėra", diff --git a/src/resources/locales/nl.json b/src/resources/locales/nl.json index f4304a151..3048aa8b2 100644 --- a/src/resources/locales/nl.json +++ b/src/resources/locales/nl.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} overeenkomst(en)", + "founds": "{{- count}} overeenkomst(en)", "input": "zoektekst", "next": "Volgende", "notFound": "geen overeenkomst", diff --git a/src/resources/locales/pt-br.json b/src/resources/locales/pt-br.json index f4752e681..a9a5249b3 100644 --- a/src/resources/locales/pt-br.json +++ b/src/resources/locales/pt-br.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} correspondência(s)", + "founds": "{{- count}} correspondência(s)", "input": "texto para correspondência", "next": "Próximo", "notFound": "sem correspondências", diff --git a/src/resources/locales/pt-pt.json b/src/resources/locales/pt-pt.json index 6dd6279c7..b0d736e84 100644 --- a/src/resources/locales/pt-pt.json +++ b/src/resources/locales/pt-pt.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "por {{- author}}", "descCreator": "criado por", - "descList": "{{- nb}} anotações de {{- creator}} serão associadas a {{- title}} {{- author}}", - "descNewer": "Conflitos: {{- nb}} anotações mais recentes", - "descOlder": "Conflitos: {{- nb}} anotações mais antigas", + "descList": "{{- count}} anotações de {{- creator}} serão associadas a {{- title}} {{- author}}", + "descNewer": "Conflitos: {{- count}} anotações mais recentes", + "descOlder": "Conflitos: {{- count}} anotações mais antigas", "descTitle": "Título das anotações: ", "importAll": "Importar todas as anotações", "importWithoutConflict": "Importar apenas anotações sem conflitos", @@ -134,7 +134,7 @@ }, "cancel": "Cancelar", "deleteAnnotations": "Eliminar anotações?", - "deleteAnnotationsText": "Quer eliminar {{- annotationListLength}} anotações?", + "deleteAnnotationsText": "Quer eliminar {{- count}} anotações?", "deleteFeed": "Eliminar catálogo?", "deletePublication": "Eliminar documento?", "import": "Confirmar importação:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} correspondência(s)", + "founds": "{{- count}} correspondência(s)", "input": "texto a encontrar", "next": "Seguinte", "notFound": "sem correspondências", diff --git a/src/resources/locales/ru.json b/src/resources/locales/ru.json index e135ba62e..ca49b0276 100644 --- a/src/resources/locales/ru.json +++ b/src/resources/locales/ru.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} найдено", + "founds": "{{- count}} найдено", "input": "подходящий текст", "next": "Далее", "notFound": "нет совпадений", diff --git a/src/resources/locales/sl.json b/src/resources/locales/sl.json index 915a5f96d..25a62c3ba 100644 --- a/src/resources/locales/sl.json +++ b/src/resources/locales/sl.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} zadetek(kov)", + "founds": "{{- count}} zadetek(kov)", "input": "besedilo, ki se ujema z", "next": "Naslednje", "notFound": "ni zadetkov", diff --git a/src/resources/locales/sv.json b/src/resources/locales/sv.json index a8875b808..9064f4a54 100644 --- a/src/resources/locales/sv.json +++ b/src/resources/locales/sv.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "av {{- author}}", "descCreator": "", - "descList": "{{- nb}} anteckning(ar) av {{- creator}} kommer att kopplas till {{- title}} {{- author}}", - "descNewer": "{{- nb}} nyare versioner av de här anteckningarna är redan kopplade till publikationen.", - "descOlder": "{{- nb}} äldre versioner av de här anteckningarna är redan kopplade till publikationen.", + "descList": "{{- count}} anteckning(ar) av {{- creator}} kommer att kopplas till {{- title}} {{- author}}", + "descNewer": "{{- count}} nyare versioner av de här anteckningarna är redan kopplade till publikationen.", + "descOlder": "{{- count}} äldre versioner av de här anteckningarna är redan kopplade till publikationen.", "descTitle": "Anteckningarnas titel: ", "importAll": "Importera alla anteckningar", "importWithoutConflict": "Importera anteckningar utan konflikter", @@ -134,7 +134,7 @@ }, "cancel": "Avbryt", "deleteAnnotations": "Radera anteckningar?", - "deleteAnnotationsText": "Vill du radera {{- annotationListLength}} anteckning(ar)?", + "deleteAnnotationsText": "Vill du radera {{- count}} anteckning(ar)?", "deleteFeed": "Vill du ta bort den här katalogen?", "deletePublication": "Vill du ta bort den här publikationen?", "import": "Vill du importera följande filer:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} träff(ar)", + "founds": "{{- count}} träff(ar)", "input": "text att söka på", "next": "Nästa", "notFound": "inga träffar", diff --git a/src/resources/locales/zh-cn.json b/src/resources/locales/zh-cn.json index c8af4d542..17184c1bf 100644 --- a/src/resources/locales/zh-cn.json +++ b/src/resources/locales/zh-cn.json @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}}个匹配", + "founds": "{{- count}}个匹配", "input": "输入搜索文本", "next": "后一个", "notFound": "无匹配", diff --git a/src/resources/locales/zh-tw.json b/src/resources/locales/zh-tw.json index 0220e5902..8cc88bf20 100644 --- a/src/resources/locales/zh-tw.json +++ b/src/resources/locales/zh-tw.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "經由 '{{- author}}'", "descCreator": "創建者", - "descList": "{{- nb}} 註解 {{- creator}} 將會被匯入到 '{{- title}}' {{- author}}", - "descNewer": "衝突:{{- nb}} 個較新的註解", - "descOlder": "衝突:{{- nb}} 個舊註解", + "descList": "{{- count}} 註解 {{- creator}} 將會被匯入到 '{{- title}}' {{- author}}", + "descNewer": "衝突:{{- count}} 個較新的註解", + "descOlder": "衝突:{{- count}} 個舊註解", "descTitle": "註解標題: ", "importAll": "匯入所有註解", "importWithoutConflict": "僅匯入無衝突的註解", @@ -134,7 +134,7 @@ }, "cancel": "取消", "deleteAnnotations": "刪除註解?", - "deleteAnnotationsText": "您確定要刪除 {{-annotationListLength}} 條註解嗎?", + "deleteAnnotationsText": "您確定要刪除 {{-count}} 條註解嗎?", "deleteFeed": "你真的要刪除此出版目錄嗎?", "deletePublication": "你真的要刪除此出版物嗎?", "import": "你真的要匯入這些文件嗎:", @@ -432,7 +432,7 @@ }, "picker": { "search": { - "founds": "{{- nResults}} 個匹配", + "founds": "{{- count}} 個匹配", "input": "輸入搜索文字", "next": "後一個", "notFound": "無匹配", From 76fd79d2b856865aff2804d53f25cfda4553efb2 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Wed, 1 Jan 2025 12:37:11 +0200 Subject: [PATCH 2/3] i18n: use plural forms in Lithuanian translation --- src/resources/locales/lt.json | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/resources/locales/lt.json b/src/resources/locales/lt.json index 13d611668..217a3753f 100644 --- a/src/resources/locales/lt.json +++ b/src/resources/locales/lt.json @@ -123,9 +123,15 @@ "annotations": { "descAuthor": "'{{- author}}'", "descCreator": ", kurią(-ias) sukūrė", - "descList": "{{- count}} pastaba(-os, -ų){{- creator}}, bus susietos su {{- author}} leidiniu '{{- title}}'", - "descNewer": "Konfliktas(-ai): {{- count}} naujesnė(-s, -ių) pastaba(-os, -ų)", - "descOlder": "Konfliktas(-ai): {{- count}} 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ų", @@ -134,7 +140,9 @@ }, "cancel": "Nutraukti", "deleteAnnotations": "Šalinti pastabas?", - "deleteAnnotationsText": "Ar norite pašalinti {{- count}} 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ą:", @@ -432,7 +440,9 @@ }, "picker": { "search": { - "founds": "{{- count}} atitikmuo(-ys, -ų)", + "founds_one": "{{- count}} atitikmuo", + "founds_few": "{{- count}} atitikmenys", + "founds_other": "{{- count}} atitikmenų", "input": "ieškomas tekstas", "next": "Kitas", "notFound": "atitikmenų nėra", From c5142f296184a25419de0bcba8d87f1a4561c991 Mon Sep 17 00:00:00 2001 From: Naglis Jonaitis Date: Wed, 1 Jan 2025 12:37:28 +0200 Subject: [PATCH 3/3] i18n: use plural forms in English translation --- src/resources/locales/en.json | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/resources/locales/en.json b/src/resources/locales/en.json index d89b9405a..1a48d886f 100644 --- a/src/resources/locales/en.json +++ b/src/resources/locales/en.json @@ -123,9 +123,12 @@ "annotations": { "descAuthor": "by '{{- author}}'", "descCreator": "created by", - "descList": "{{- count}} note(s) {{- creator}} will be imported into '{{- title}}' {{- author}}", - "descNewer": "Conflict(s): {{- count}} newer note(s)", - "descOlder": "Conflict(s): {{- count}} 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", @@ -134,7 +137,8 @@ }, "cancel": "Cancel", "deleteAnnotations": "Delete annotations?", - "deleteAnnotationsText": "Are you sure you want to delete {{- count}} 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:", @@ -432,7 +436,8 @@ }, "picker": { "search": { - "founds": "{{- count}} match(es)", + "founds_one": "{{- count}} match", + "founds_other": "{{- count}} matches", "input": "text to match", "next": "Next", "notFound": "no matches",