mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-25 00:13:00 +00:00
fix(i18n): the untranslated ratchet sees plural copies and copied phrases
Two holes let English through the ratchet unseen.
A plural form en has no key for (Russian .few and .many, Arabic .two)
was compared with en's value for that same key, which never exists, so a
locale could copy en's text into exactly the forms a new plural group
needs and the count stayed put. Such a form is now compared with every
form en spells out for the group. A form en does declare keeps the exact
comparison: Italian "{count} file" is the Italian plural, not a copy of
en's "{count} file".
The // same-as-en marker excused any value in a Latin-script locale, so
one comment waved a whole copied sentence through. It is honoured only
on a value holding a single plain word, the case shared/CLAUDE.md
already describes. No locale carries the marker today, so nothing that
passed before fails now; the counts are unchanged.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// Fixture for the untranslated ratchet's plural rule: en spells out only `one`.
|
||||
const a = {
|
||||
'a.pack': '{count} items to pack',
|
||||
'a.pack.one': '{count} item to pack',
|
||||
};
|
||||
export default a;
|
||||
@@ -0,0 +1,8 @@
|
||||
// Fixture: the general form, `few` and `many` are English copies; en declares no `few` or `many`.
|
||||
const a = {
|
||||
'a.pack': '{count} items to pack',
|
||||
'a.pack.one': 'Собрать {count} вещь',
|
||||
'a.pack.few': '{count} items to pack',
|
||||
'a.pack.many': '{count} item to pack',
|
||||
};
|
||||
export default a;
|
||||
@@ -1,9 +1,11 @@
|
||||
// Fixture: "Status" is the German word too and says so; the name and the unit need no marker.
|
||||
// The marker on a copied sentence is not honoured: a.delete still counts.
|
||||
const a = {
|
||||
'a.settings': 'Einstellungen',
|
||||
'a.appearance': 'Erscheinungsbild',
|
||||
'a.status': 'Status', // same-as-en
|
||||
'a.addon': 'Atlas',
|
||||
'a.distance': '{count} km',
|
||||
'a.delete': 'Delete this trip and all its places permanently', // same-as-en
|
||||
};
|
||||
export default a;
|
||||
|
||||
@@ -5,5 +5,6 @@ const a = {
|
||||
'a.status': 'Status',
|
||||
'a.addon': 'Atlas',
|
||||
'a.distance': '{count} km',
|
||||
'a.delete': 'Delete this trip and all its places permanently',
|
||||
};
|
||||
export default a;
|
||||
|
||||
@@ -5,5 +5,6 @@ const a = {
|
||||
'a.status': 'Status',
|
||||
'a.addon': 'Atlas',
|
||||
'a.distance': '{count} km',
|
||||
'a.delete': 'Supprimer définitivement ce voyage et tous ses lieux',
|
||||
};
|
||||
export default a;
|
||||
|
||||
@@ -5,5 +5,6 @@ const a = {
|
||||
'a.status': 'Status', // same-as-en
|
||||
'a.addon': 'Atlas',
|
||||
'a.distance': '{count} km',
|
||||
'a.delete': 'この旅行とすべての場所を完全に削除',
|
||||
};
|
||||
export default a;
|
||||
|
||||
Reference in New Issue
Block a user