mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-10 15:11:58 +01:00
port the library tab labels from the old plural names
Albums/Artists/Playlists were new keys because the old Flutter strings were plurals, so their translations went unused. Take the `other` form of resourcesAlbumName/resourcesArtistName/resourcesPlaylistName into the three plain-string resources for the 26-27 locales that translated them. Arabic `resources_album_name` and Hungarian `resources_playlist_name` stay English because their upstream `other` form is empty.
This commit is contained in:
@@ -140,7 +140,7 @@ The two branches do not fold case identically: the trigram tokenizer lowercases
|
||||
|
||||
All user-facing text lives in Android string resources: `res/values/strings.xml` (the English source, including `<plurals>`) and `res/values-*/strings.xml` for translations. This is the platform-native mechanism, needs no extra dependency, and is a first-class Weblate format ("Android String Resource": monolingual base `res/values/strings.xml`, file mask `res/values-*/strings.xml`, plurals supported). Code reads it through `stringResource`/`pluralStringResource` in Compose and `getString`/`getQuantityString` elsewhere.
|
||||
|
||||
Resource names are `snake_case`. They were derived once from the old Flutter ARB keys: resources whose English matched an old string (the "identical" set) reuse the old key's translations, mechanically renamed (`settingsServersFieldsName` -> `settings_servers_fields_name`); everything else is a new key. Strings whose wording changed were deliberately given new keys rather than reusing a translation with stale meaning. The migration is one-time; there is no generator in the build.
|
||||
Resource names are `snake_case`. They were derived once from the old Flutter ARB keys: resources whose English matched an old string (the "identical" set) reuse the old key's translations, mechanically renamed (`settingsServersFieldsName` -> `settings_servers_fields_name`); everything else is a new key. Strings whose wording changed were deliberately given new keys rather than reusing a translation with stale meaning, with one exception: the three library tab labels (`resources_album_name`/`resources_artist_name`/`resources_playlist_name`) take the `other` form of the old `resourcesAlbumName`/`resourcesArtistName`/`resourcesPlaylistName` plurals. The migration is one-time; there is no generator in the build.
|
||||
|
||||
27 locales were carried over from the Flutter app: `ar, ca, cs, da, de, es, eu, fr, gl, hu, it, ja, ko, nb, pa, pl, pt, pt-BR, ru, sv, ta, th, tr, uk, vi, zh, zh-Hant` (PR #178 plus `ar/ca/cs/pa/pt` from the frozen Flutter branches). Locale files contain only translated keys; anything missing falls back to English. Chinese uses script qualifiers (`values-b+zh+Hans`, `values-b+zh+Hant`) and Brazilian Portuguese is `values-b+pt+BR`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user