You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d7fe450
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .roo/rules-translate/001-general-rules.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ Example:
106
106
107
107
To list the plural forms of any locale, run: `node -p 'new Intl.PluralRules("<locale>").resolvedOptions().pluralCategories'`
108
108
109
-
`node scripts/find-missing-translations.js` reports a plural key only when a locale has no key with its base name (`key` or `key_*`). `node scripts/validate-plural-forms.js` reports missing forms, extra forms, bare keys next to plural forms and plural mistakes in English.
109
+
`node scripts/find-missing-translations.js` reports a plural key only when a locale has no key with its base name (`key` or `key_*`). `node scripts/validate-plural-forms.js` reports missing forms, forms without `{{count}}`, extra forms, bare keys next to plural forms and plural mistakes in English.
Copy file name to clipboardExpand all lines: .roo/skills/roo-translation/SKILL.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,7 +152,7 @@ Example:
152
152
153
153
To list the plural forms of any locale, run: `node -p 'new Intl.PluralRules("<locale>").resolvedOptions().pluralCategories'`.
154
154
155
-
`node scripts/find-missing-translations.js` reports a plural key only when a locale has no key with its base name (`key` or `key_*`). `node scripts/validate-plural-forms.js` reports missing forms, extra forms, bare keys next to plural forms and plural mistakes in English.
155
+
`node scripts/find-missing-translations.js` reports a plural key only when a locale has no key with its base name (`key` or `key_*`). `node scripts/validate-plural-forms.js` reports missing forms, forms without `{{count}}`, extra forms, bare keys next to plural forms and plural mistakes in English.
console.log("\n✏️ Give each plural key exactly the CLDR plural forms of its locale.")
191
-
console.log("List a locale's forms with Intl.PluralRules(<locale>).resolvedOptions().pluralCategories")
219
+
if(report.length>0){
220
+
printStatistics(report)
221
+
console.log("\n✏️ To fix the plural form problems:")
222
+
console.log(
223
+
"1. List the plural forms of a locale with: node -p 'new Intl.PluralRules(\"<locale>\").resolvedOptions().pluralCategories'",
224
+
)
225
+
console.log(
226
+
"2. Synchronize the plural forms of each key with that list: add each missing form, translated from the English plural key, and remove each form that is not in the list",
227
+
)
228
+
console.log('3. Put {{count}} in every form, including "one", instead of a hardcoded number')
229
+
console.log("4. Remove each bare key that is next to plural forms")
230
+
console.log("5. Run this script again to verify that all plural forms are correct")
0 commit comments