Add localized selection count strings to all locale files#501
Merged
schuyler merged 1 commit intoJul 1, 2026
Merged
Conversation
NSLocalizedString returns the key name (not an English fallback) when a locale's strings file exists but lacks the key, causing JJPluralForm to display "ERR" instead of the count. Related to #452
Contributor
Code Coverage ReportCurrent Coverage: 0.00% Coverage Details (Summary) |
schuyler
added a commit
that referenced
this pull request
Jul 1, 2026
## Summary PR #460 added a selection character-count feature to the word-count widget and introduced three new plural string keys, but only in `en.lproj`. In any other locale, `NSLocalizedString` returns the **key name** (not an English fallback) when the key is absent, so `JJPluralForm` can't parse it and the widget shows **"ERR"** when text is selected. Reported by rcuisnier in French during rc.1 testing. This adds the three keys to all 25 non-English locales: - `WORDS_SELECTED_PLURAL_STRING` - `CHARACTERS_SELECTED_PLURAL_STRING` - `CHARACTERS_NO_SPACES_SELECTED_PLURAL_STRING` ## Approach Each locale's translation was built from its **existing** base plural vocabulary (`WORDS_PLURAL_STRING`, etc.) plus the word for "selected," with grammatical agreement matched per language — gender/number in Romance, Slavic, Hebrew, Arabic, Icelandic; case agreement in Finnish; invariant participles where appropriate (German, Dutch, Turkish, Hindi, CJK). The two-form `"%@ singular;%@ plural"` structure and `JJ_PLURAL_FORM_RULE = "1"` convention are preserved. A few forms were refined after review: - **Japanese** uses the state form `選択中` ("currently selected") rather than a verb reading as a command. - **Arabic / Hebrew** place the participle adjacent to the noun; Hebrew uses `מסומן` ("marked/selected") with correct final-vs-medial nun across gender/number. ## Verification - `grep -L` confirms all 25 non-English files now contain the keys; none missing. - `en.lproj` unchanged; no existing keys altered; only the three additions per file (`25 files changed, 175 insertions`). - Non-Latin strings decoded to Unicode codepoints to confirm correct letters and logical byte order (independent of terminal shaping/BiDi). Related to #452
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #460 added a selection character-count feature to the word-count widget and introduced three new plural string keys, but only in
en.lproj. In any other locale,NSLocalizedStringreturns the key name (not an English fallback) when the key is absent, soJJPluralFormcan't parse it and the widget shows "ERR" when text is selected. Reported by rcuisnier in French during rc.1 testing.This adds the three keys to all 25 non-English locales:
WORDS_SELECTED_PLURAL_STRINGCHARACTERS_SELECTED_PLURAL_STRINGCHARACTERS_NO_SPACES_SELECTED_PLURAL_STRINGApproach
Each locale's translation was built from its existing base plural vocabulary (
WORDS_PLURAL_STRING, etc.) plus the word for "selected," with grammatical agreement matched per language — gender/number in Romance, Slavic, Hebrew, Arabic, Icelandic; case agreement in Finnish; invariant participles where appropriate (German, Dutch, Turkish, Hindi, CJK). The two-form"%@ singular;%@ plural"structure andJJ_PLURAL_FORM_RULE = "1"convention are preserved.A few forms were refined after review:
選択中("currently selected") rather than a verb reading as a command.מסומן("marked/selected") with correct final-vs-medial nun across gender/number.Verification
grep -Lconfirms all 25 non-English files now contain the keys; none missing.en.lprojunchanged; no existing keys altered; only the three additions per file (25 files changed, 175 insertions).Related to #452