diff options
author | Simon Rozman <simon@rozman.si> | 2020-02-27 08:58:40 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-03-15 14:49:27 -0600 |
commit | c5d626821553c4c98e739170a2c84a410c1673bd (patch) | |
tree | 9067de44688ee843845ddec98fd9b2d24e204c1d /l18n | |
parent | l18n: fix Japanese translation and generate zgotext.go (diff) | |
download | wireguard-windows-c5d626821553c4c98e739170a2c84a410c1673bd.tar.xz wireguard-windows-c5d626821553c4c98e739170a2c84a410c1673bd.zip |
l18n: disambiguate enumeration and unit concatenation separators
In Japanese, "1分、5秒 前" is a little strange. It should be "1分 5秒 前".
After consulting Slovenian linguist, I've learned the same applies to
Slovenian as well.
Reported-by: Eiji Tanioka <tanioka404@gmail.com>
Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'l18n')
-rw-r--r-- | l18n/l18n.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/l18n/l18n.go b/l18n/l18n.go index 717e4861..76c52ccf 100644 --- a/l18n/l18n.go +++ b/l18n/l18n.go @@ -63,3 +63,14 @@ func EnumerationSeparator() string { // be nice to translators and skips all strings without letters when updating catalogs. return Sprintf("[EnumerationSeparator]" /* Text to insert between items when listing - most western languages will translate ‘[EnumerationSeparator]’ into ‘, ’ to produce lists like ‘apple, orange, strawberry’. Eastern languages might translate into ‘、’ to produce lists like ‘リンゴ、オレンジ、イチゴ’. */) } + +// UnitSeparator returns the separator to use when concatenating multiple units of the same metric +// (e.g. "1 minute, 32 seconds", "6 feet, 1 inch"). For English and western languages, unit +// separator is a comma followed by a space (i.e. ", "). For Slovenian and Japanese, it returns +// just space. +func UnitSeparator() string { + // BUG: We could just use `Sprintf(", " /* ...translator instructions... */)` and let the + // individual locale catalog handle its translation. Unfortunately, the gotext utility tries to + // be nice to translators and skips all strings without letters when updating catalogs. + return Sprintf("[UnitSeparator]" /* Text to insert when combining units of a measure - most languages will translate ‘[UnitSeparator]’ into ‘ ’ (space) to produce lists like ‘2 minuti 30 sekund’, or empty string ‘’ to produce ‘2分30秒’. */) +} |