From c8de051462236cd412107db7883bf29f1eb19884 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 | 10 +++++----- src/resources/locales/en.json | 10 +++++----- src/resources/locales/es.json | 10 +++++----- src/resources/locales/eu.json | 2 +- src/resources/locales/fi.json | 10 +++++----- 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 | 10 +++++----- src/resources/locales/ka.json | 2 +- src/resources/locales/ko.json | 2 +- src/resources/locales/lt.json | 10 +++++----- src/resources/locales/nl.json | 10 +++++----- 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, 85 insertions(+), 85 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 6ba164a45..3a5acaed6 100644 --- a/src/renderer/reader/components/ReaderMenu.tsx +++ b/src/renderer/reader/components/ReaderMenu.tsx @@ -1216,7 +1216,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 3bf099a37..da4c1b73a 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 4b16c93e8..8c53e2e37 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 7bbe5aa5a..2e4cab0b2 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 e0fee51df..de1b6a516 100644 --- a/src/resources/locales/da.json +++ b/src/resources/locales/da.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "af {{- author}}", "descCreator": "lavet af", - "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": "Er du sikker på at du vil slette dette katalog?", "deletePublication": "Er du sikker på at du vil fjerne 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 764a261b3..480072730 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 caa63480b..7dab2c332 100644 --- a/src/resources/locales/el.json +++ b/src/resources/locales/el.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": "καμία αντιστοιχία", diff --git a/src/resources/locales/en.json b/src/resources/locales/en.json index 941ab4d50..5c73cb60a 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 9f20bcf04..e5e7f9ba8 100644 --- a/src/resources/locales/es.json +++ b/src/resources/locales/es.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "de {{- author}}", "descCreator": "creado por", - "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 c36482cdb..c9c46a918 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 15594822b..793800908 100644 --- a/src/resources/locales/fi.json +++ b/src/resources/locales/fi.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "{{- author}}", "descCreator": "tekijältä", - "descList": "Tuodaan {{- nb}} muistiinpano(a) {{- creator}} julkaisuun {{- author}}: {{- title}}", - "descNewer": "Ristiriita: {{- nb}} uudempaa muistiinpanoa", - "descOlder": "Ristiriita: {{- nb}} vanhempaa muistiinpanoa", + "descList": "Tuodaan {{- count}} muistiinpano(a) {{- creator}} julkaisuun {{- author}}: {{- title}}", + "descNewer": "Ristiriita: {{- count}} uudempaa muistiinpanoa", + "descOlder": "Ristiriita: {{- count}} vanhempaa muistiinpanoa", "descTitle": "Muistiinpanojen otsikko: ", "importAll": "Tuo kaikki muistiinpanot", "importWithoutConflict": "Tuo muistiinpanot, joissa ei ole ristiriitoja", @@ -134,7 +134,7 @@ }, "cancel": "Peru", "deleteAnnotations": "Poistetaanko muistiinpanot?", - "deleteAnnotationsText": "Haluatko varmasti poistaa {{- annotationListLength}} muistiinpanoa?", + "deleteAnnotationsText": "Haluatko varmasti poistaa {{- count}} muistiinpanoa?", "deleteFeed": "Haluatko poistaa tämän luettelon?", "deletePublication": "Haluatko poistaa tämän julkaisun?", "import": "Haluatko tuoda nämä tiedostot:", @@ -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 d940582e0..f055bf638 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 911107755..00aca8ad6 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 f82d7c258..6fce81210 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 aa0d46650..9b62ef360 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 9953ceefd..ffdea00d7 100644 --- a/src/resources/locales/ja.json +++ b/src/resources/locales/ja.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": "一致しませんでした", diff --git a/src/resources/locales/ka.json b/src/resources/locales/ka.json index b8e44e03e..732f3c05d 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 4a7ec974d..206ac99f6 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 bad943543..644dabb5e 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 1cc01c77f..859b5e3d3 100644 --- a/src/resources/locales/nl.json +++ b/src/resources/locales/nl.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "door '{{- author}}'", "descCreator": "gemaakt door", - "descList": "{{- nb}} aantekening(en) {{- creator}} worden geïmporteerd naar '{{- title}}' {{- author}}", - "descNewer": "Conflict(en): {{- nb}} nieuwere aantekening(en)", - "descOlder": "Conflict(en): {{- nb}} oudere aantekening(en)", + "descList": "{{- count}} aantekening(en) {{- creator}} worden geïmporteerd naar '{{- title}}' {{- author}}", + "descNewer": "Conflict(en): {{- count}} nieuwere aantekening(en)", + "descOlder": "Conflict(en): {{- count}} oudere aantekening(en)", "descTitle": "Aantekeningen titel: ", "importAll": "Importeer alle aantekeningen", "importWithoutConflict": "Importeer alleen aantekeningen zonder conflicten", @@ -134,7 +134,7 @@ }, "cancel": "Annuleer", "deleteAnnotations": "Verwijder aantekeningen?", - "deleteAnnotationsText": "Weet je zeker dat je {{- annotationListLength}} aantekening(en) wil verwijderen?", + "deleteAnnotationsText": "Weet je zeker dat je {{- count}} aantekening(en) wil verwijderen?", "deleteFeed": "Wil je deze catalogus echt verwijderen ?", "deletePublication": "Wil je deze publicatie echt verwijderen ?", "import": "Wil je deze bestanden echt importeren :", @@ -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 9ea39c643..f233a3ef9 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 f70e35e1a..2b44bda8c 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 7a7461842..15d129570 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 b4e745f56..ec4233754 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 8bfb6d3a2..36a74f34d 100644 --- a/src/resources/locales/sv.json +++ b/src/resources/locales/sv.json @@ -123,9 +123,9 @@ "annotations": { "descAuthor": "av {{- author}}", "descCreator": "skapad(e) av", - "descList": "{{- nb}} anteckning(ar) {{- creator}} kommer att importeras till {{- title}} {{- author}}", - "descNewer": "Konflikter: {{- nb}} nyare anteckning(ar)", - "descOlder": "Konflikter: {{- nb}} äldre anteckning(ar)", + "descList": "{{- count}} anteckning(ar) {{- creator}} kommer att importeras till {{- title}} {{- author}}", + "descNewer": "Konflikter: {{- count}} nyare anteckning(ar)", + "descOlder": "Konflikter: {{- count}} äldre anteckning(ar)", "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 433637d2b..1cd7e1c2c 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 b5e02a3c6..9fa17c847 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 06c625bcf5016b6fdc0a0e932a9196eebbd3eb9b 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 644dabb5e..3ccdc72b6 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 7c603743f11efd6622c5a0d88d72ef026e44fdd9 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 5c73cb60a..77087d639 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",