Notes about translation of Ubuntu 18.04

Simos Xenitellis simos.lists at googlemail.com
Tue Apr 3 13:29:34 UTC 2018


On Tue, Apr 3, 2018 at 3:12 AM, Gunnar Hjalmarsson <gunnarhj at ubuntu.com> wrote:
> On 2018-04-02 23:48, Simos Xenitellis wrote:
>>
>> For those languages that have nouns with a genitive form (usually
>> Eastern European languages), they can update for date format strings
>> to appear more natural. The locale files have been autoupdated a few
>> months ago, and the changes are in 18.04.
>> This has been posted here a few months ago as well.
>>
>> In a nutshell, the genitive form of a noun like "April" is a single
>> word in Greek and looks like "Apriliou".
>> In English, the genitive form is not a single word, it's "of April".
>> In Ubuntu 16.04, the locale for the full month name in Greek was
>> "April" (Απρίλης).
>> In Ubuntu 18.04, the new locale has "Apriliou" (Απριλίου) instead.
>>
>> I do not have the definitive list of the locations of the date format
>> strings.
>
>
> Thanks for that info!
>
> Just run this command:
>
> $ LC_TIME=el_GR.UTF-8 locale alt_mon
> Ιανουάριος;Φεβρουάριος;Μάρτιος;Απρίλιος;Μάιος;Ιούνιος;Ιούλιος;Αύγουστος;Σεπτέμβριος;Οκτώβριος;Νοέμβριος;Δεκέμβριος
>
> Do you know if there is a strftime() conversion specification available yet,
> similar to %B, which refers to this new alt_mon component in the locale
> definitions?
>

There is a GNU extension for glibc2 for this, and it's "%OB" (that's a
capital "o"). That is, a modifier is added to get the alternate month
name.
This was added in glibc 2.27, and it's in Ubuntu 18.04.

Overall, quoting from
http://www.gnu.org/software/libc/manual/html_node/Formatting-Calendar-Time.html
:

"An optional modifier can follow the optional flag and width
specification. The modifiers, which were first standardized by
POSIX.2-1992 and by ISO C99, are:
   E    Use the locale’s alternate representation for date and time.
This modifier applies to the %c, %C, %x, %X, %y and %Y format
specifiers. In a Japanese locale, for example, %Ex might yield a date
format based on the Japanese Emperors’ reigns.
   O    With all format specifiers that produce numbers: use the
locale’s alternate numeric symbols.

   With %B, %b, and %h: use the grammatical form for month names that
is appropriate when the month is named by itself, rather than the form
that is appropriate when the month is used as part of a complete date.
This is a GNU extension."


Things to look for:

1. In previous versions of Ubuntu, %B is the month name in the nominative case.
In Ubuntu 18.04 (glibc2.27 or newer), %B is the month name in the
genitive case. %OB is the month name in the nominative case.

That is, %B has changed in its use. The reason is that %OB was already
implemented that way in FreeBSD,
so glibc2 did the switch as well for compatibility.

2. GCC currently emits a warning when it sees the %OB format, when you
compile code.
It is the code in GCC that checks for security issues in format
strings, and has not been updated yet.

3. The 'date' command does not support yet the %OB format. Apparently,
`date` does not pass the format verbatim to strftime(),

$ date "+%OB %B"
%OB Απριλίου

Simos




More information about the ubuntu-translators mailing list