diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-05-15 13:12:43 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-05-16 20:40:37 -0400 |
commit | 3a6ed727d4435ba4bca970fe0f309e6a728f0ee6 (patch) | |
tree | 3f73a41346fbbc6d3190355966c315a474e2022d /tools/genlang | |
parent | 9d3b012ac06cec18e9128e87bc866169613925dc (diff) | |
download | rockbox-3a6ed727d4435ba4bca970fe0f309e6a728f0ee6.tar.gz rockbox-3a6ed727d4435ba4bca970fe0f309e6a728f0ee6.zip |
lang: Add a special flag to differentiate "intentionally identical to english"
We normally treat "same as English" as a translation errors that needs to be
corrected. However, many languages effectively use english words as-is, so
we need a way of distinguishing the "intentionally the same" situations with
our tools "automatically copying missing translated strings from English" to
avoid blank or missing UI strings.
The solution is to make sure these "intentionally same as english"
strings are actually different. This will be accomplished by prepending
'~' to the these strings. This special character is stripped from the
binary data files used by the player and the voice generation tools.
Change-Id: I90088cbd74de0e5cb9d65f75f26afe04f7e301bf
Diffstat (limited to 'tools/genlang')
-rwxr-xr-x | tools/genlang | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/genlang b/tools/genlang index abff3e8e18..24b29b7d9a 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -469,6 +469,10 @@ while(<LANG>) { | |||
469 | else { | 469 | else { |
470 | $idnum = $idcount[$user]++; | 470 | $idnum = $idcount[$user]++; |
471 | } | 471 | } |
472 | |||
473 | # Strip out the magic "Same as english" flag | ||
474 | $dest =~ s/^("?)~/$1/; | ||
475 | $voice =~ s/^("?)~/$1/; | ||
472 | 476 | ||
473 | $id{$idstr} = $idnum; | 477 | $id{$idstr} = $idnum; |
474 | $idnum[$user][$idnum]=$idstr; | 478 | $idnum[$user][$idnum]=$idstr; |