question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

language_mapping doesn't work for %locale% placeholder

See original GitHub issue

Describe the bug I’m trying to set up Google Play’s changelogs translation. In most cases, Google prefer the full dashed locale code (e.g. en-US), but in some cases, they require the two-letter code (th, lv, fil). I have the next configuration:

files:
  - source: /fastlane/metadata/android/en-US/changelogs/default.txt
    dest: /android/default-changelog.txt
    translation: /fastlane/metadata/android/%locale%/changelogs/default.txt
    languages_mapping:
      locale:
        th-TH: th

But it doesn’t do anything.

To Reproduce Steps to reproduce the behavior:

  1. Configuration file: above
  2. Execute CLI command: crowdin download
  3. See that translations are still downloaded to the th-TH folder rather than th, defined in the languages_mapping setting.

Expected behavior All locales should be stored in their %locale% folders, but th-TH should be mapped to the th directory.

Environment:

  • OS: MacOS
  • Version: 10.14.6
  • CLI: 3.1.15

Screenshots

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
andrii-bodnarcommented, Sep 10, 2020

Hi @erickskrauch @Wohlie ! We have updated the Language Mapping feature description in the documentation.

1reaction
erickskrauchcommented, Jul 3, 2020

@andrii-bodnar, thanks, that worked! It will be nice if the cli application will notify users about invalid mappings. Also, it will be good, if the documentation will better describe this feature.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: The placeholder for Search Tool of map widget does...
Solved: After add "?locale=fr" to URL, the placeholder for Search Tool of map widget is still "Find address or place" and doesn't change...
Read more >
gen_l10n tool doesn't generate map entries or ... - GitHub
gen_l10n tool doesn't generate map entries or mapping functions for strings with DateTime placeholders #48977.
Read more >
string formatting issue due to different placeholder counts ...
I'm assuming that you'll have some kind of table or mapping where you look up the placeholder values based on language and gender....
Read more >
Localize your app - Android Developers
Whenever the app runs in a locale for which you have not provided locale-specific text, Android loads the default strings from res/values/ ...
Read more >
Localization - Archive of obsolete content
When a localizable string can take two or more placeholders, translators can define the order in which placeholders are inserted, without affecting the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found