Repository navigation
Add plural labels for subjects and sections - #15
Merged
Merged
Conversation
Lists and headers need the plural, which a translator cannot derive from the singular label. Education gets 'Subjects', Music and Magazines and Newspapers get 'Sections', each translated in the same terms as the singular next to it.
Jeehut
force-pushed
the
wip/plural-subject-section-labels
branch
from
October 12, 2026 09:36
0177471 to
3b9e06c
Compare
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.
Closes #3.
Answers the first question in #3 by @The-Wolfson: there were no plural versions of
TK.Label.subjectandTK.Label.section.TranslateKitEducationgetsTK.Label.subjects("Subjects").TranslateKitMusicandTranslateKitMagazinesAndNewspaperseach getTK.Label.sections("Sections"), the two modules that already carry the singular.Each plural uses the same word as the singular next to it in that catalog (de "Fach" → "Fächer", "Abschnitt" → "Abschnitte" in Music, "Bereich" → "Bereiche" in Magazines), so a list header and its rows match. Languages without a plural form for nouns (ja, ko, zh, th, vi, id, ms) keep the singular word, as their own UIs do.
This adds plural labels, not plural variations (
%lld subjects). Counted strings are a different feature and not part of 2.0.How this was verified
PluralLabelTestsreads the three compiled bundles for any language that lacks the new key. With the entries reduced to English it failed for all three; on this branch it passes:swift test --build-system swiftbuildon Xcode 26.6 / Swift 6.3.3, as in CI.Tests/TranslateKitTests/CompiledCatalog.swiftis the same helper as in #12–#14.