Skip to content

Conversation

@dwaynebailey
Copy link

This adjust the Twine output format to align with the existing Twine strings.txt in OM

Changes:

  • Space indent instead of tab
  • Dev language after metadata
  • metadata order aligns with existing
  • en-GB follows en

Problems:

  • Plurals are not extracted at all
  • The fancy \n\n in Android is very broken

Zverik and others added 27 commits August 7, 2021 14:54
Xcode didn't parse XML files started with a comment line

Signed-off-by: Alexander Borsuk <[email protected]>
* Added regional dialect fallback to generic language

Signed-off-by: David Martinez <[email protected]>

* Reorder generic_language to mantain fallback_mapping priority

Signed-off-by: David Martinez <[email protected]>

* Update lib/twine/output_processor.rb

Signed-off-by: David Martinez <[email protected]>

Co-authored-by: Alexander Borsuk <[email protected]>

Co-authored-by: Alexander Borsuk <[email protected]>
Signed-off-by: David Martinez <[email protected]>
Merge branch 'main' into organicmaps
Signed-off-by: Alexander Borsuk <[email protected]>
Fixed jquery json language extraction and updated to the latest Twine
It creates a lot of unnecessary noise after upgrading Twine

Signed-off-by: Alexander Borsuk <[email protected]>
Instead of alphabetical, sort these in the expect CLDR order
zero...other

Only sort when retreiving the values for formatter consumption, this
should leave Twine files in their default order.

Signed-off-by: Dwayne Bailey <[email protected]>
Indent with 4 spaces and fix the broken plural \t\s*2 indentation
2*sp -> \t

Remove the confusingly named tab() that indents with spaces and use \t
directly
This aligns with current OrganicMaps structure of:

comment =
tag =
en =
allows:
en =
en-GB =

before alphabetical sorting

Aligns with existing and is more logical
OrganicMaps:
comment =
tags =
ref =
dev-LANG =
other-LANG =

Twine original:
dev-LANG =
ref =
tags =
comment =
other-LANG =

fix
@pastk
Copy link

pastk commented Jan 31, 2025

Do I understand it right that this change is needed to generate Twine/OM strings files from existing android or ios localization files (or other twine-supported formats)?

ATM we don't use this conversion at all, only the opposite (from Twine/OM to native platform localizations).

Is there some idea to use e.g. Android -> Twine conversion?

@rtsisyk
Copy link

rtsisyk commented Feb 23, 2025

Do I understand it right that this change is needed to generate Twine/OM strings files from existing android or ios localization files (or other twine-supported formats)?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants