[strings] Translations for some languages are ignored #1762

Closed
opened 2021-12-31 07:31:36 +00:00 by pastk · 6 comments
Owner

Following translations are present in strings.txt, but are missing in android/iphone/js generated files:

bg      : 529 / 636 (83%)
sw      : 220 / 636 (35%)
he      : 151 / 636 (24%)
af      : 5 / 636 (1%)
fr-CA   : 5 / 636 (1%)
hi      : 5 / 636 (1%)

That's because in generate_localizations.sh twine is being run without --create-folders option.
(and its better to keep it this way for now until we add language codes validation - to prevent typos from getting in)

We need to add ignored translations into android, iphone, js localization files.

There are some special cases for Android:

There is android/res/values-in/, in is a deprecated code for Indonesian used in older java versions, a correct current code is id and current java supports it, see https://developer.android.com/reference/java/util/Locale.html#toLanguageTag()
To be sure it works in older android/java versions lets symlink values-in to values-id.

zh-Hans, zh-Hant are missing in android localizations, but zh, zh-rTW, zh-rHK, zh-rMO are present.
It looks like zh-Hans, zh-Hant are supported by Android natively starting from 8.0 Oreo (ref https://medium.com/googleplaydev/demystifying-chinese-languages-in-the-app-world-b2a4e7dd1276), so my suggestion is to add zh-Hans, zh-Hant and symlink zh, zh-rTW, zh-rHK, zh-rMO to them accordingly.

I see there were updates to in and zh, zh-rTW in android localizations, but current generate_localizations.sh doesn't produce them so I assume they were adjusted manually or maybe there is some other script that does renaming I don't know about?

Following translations are present in strings.txt, but are missing in android/iphone/js generated files: ``` bg : 529 / 636 (83%) sw : 220 / 636 (35%) he : 151 / 636 (24%) af : 5 / 636 (1%) fr-CA : 5 / 636 (1%) hi : 5 / 636 (1%) ``` That's because in `generate_localizations.sh` twine is being run without `--create-folders` option. (and its better to keep it this way for now until we add language codes validation - to prevent typos from getting in) We need to add ignored translations into android, iphone, js localization files. There are some special cases for Android: There is `android/res/values-in/`, `in` is a deprecated code for Indonesian used in older java versions, a correct current code is `id` and current java supports it, see https://developer.android.com/reference/java/util/Locale.html#toLanguageTag() To be sure it works in older android/java versions lets symlink `values-in` to `values-id`. `zh-Hans, zh-Hant` are missing in android localizations, but `zh, zh-rTW, zh-rHK, zh-rMO` are present. It looks like `zh-Hans, zh-Hant` are supported by Android natively starting from 8.0 Oreo (ref https://medium.com/googleplaydev/demystifying-chinese-languages-in-the-app-world-b2a4e7dd1276), so my suggestion is to add `zh-Hans, zh-Hant` and symlink `zh, zh-rTW, zh-rHK, zh-rMO` to them accordingly. I see there were updates to `in` and `zh, zh-rTW` in android localizations, but current `generate_localizations.sh` doesn't produce them so I assume they were adjusted manually or maybe there is some other script that does renaming I don't know about?
biodranik commented 2021-12-31 22:58:57 +00:00 (Migrated from github.com)

Did you check our twine patches?

Did you check our twine patches?
Author
Owner

Ahh, found it, thanks!
Do you prefer to keep in and zh-* support via a patch? I think that symlinking solution is simpler (and we have symlinks for zh-HK and zh-MO already anyway) and less patches to maintain.

Ahh, found it, thanks! Do you prefer to keep `in` and `zh-*` support via a patch? I think that symlinking solution is simpler (and we have symlinks for `zh-HK` and `zh-MO` already anyway) and less patches to maintain.
biodranik commented 2022-01-01 15:28:39 +00:00 (Migrated from github.com)

It would be great to drop the patch if symlinks will work properly.

It would be great to drop the patch if symlinks will work properly.
Author
Owner

The idea with symlinks didn't work unfortunately - android build errors on res/values-zh-rHant dir names. zh-Hant is supported in Android via BCP-47 tags which are not supported by Twine.
(https://github.com/scelis/twine/issues/307#issuecomment-1003964271)

The idea with symlinks didn't work unfortunately - android build errors on `res/values-zh-rHant` dir names. `zh-Hant` is supported in Android via BCP-47 tags which are not supported by Twine. (https://github.com/scelis/twine/issues/307#issuecomment-1003964271)
biodranik commented 2022-01-05 07:26:07 +00:00 (Migrated from github.com)

Then let's leave the patch as it is until the better times.

Then let's leave the patch as it is until the better times.
Author
Owner

Done.

Done.
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No milestone
No project
No assignees
2 participants
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#1762
No description provided.