GDateTime i18n



hello,

I just made some pretty weird changes to quite a lot of i18n-related
things in GLib (mostly related to GDateTime formatting).  These changes
are designed to improve our compliance with C99 formatting of dates and
times.  I hope that I haven't caused anybody headaches -- if so, please
let me know what I can do to help fix it.

Here's a summary of what's going on:

First: on August 21, Matthias changed from having separate translations
of "am"/"pm" and "AM"/"PM" to only translating "am" and "pm" and doing
the case change from inside the code.  There were 14 translations that
updated after that change (be, en_CA, es, gl, ko, lt, nb, pt_BR, ru, sr,
sr@latin, sv, zh_HK, zh_TW), all of them dropping the "AM"/"PM" strings
from their translation.

The string in the POSIX locale for this purpose, unfortunately is
"AM;PM", not "am;pm".  I've changed the case of this string to uppercase
and I updated the 14 affected translations to use the uppercase form.

  http://git.gnome.org/browse/glib/commit/?id=9ddd25c18b59c443945ff9dcb19675e00caeca63

Second: our formatting of 12-hour time was hard-coded to the US way,
insensitive to the locale.  I made it locale-dependent, introducing a
new string to be translated: "%I:%M:%S %p".

  http://git.gnome.org/browse/glib/commit/?id=b6fdbb8e448be794fd9d098dc5f2bd327b2f23f0

Third: I modified our Makefiles to be more intltool-friendly and did
'make update-po' to ensure that the Report-Msgid-Bugs-To: was properly
included at the top of each file.  I also did this to provide a solid
base for the next changes.

  http://git.gnome.org/browse/glib/commit/?id=a2b350d9c3bcc979f1ce4dd6efc7ca79c07624b3
  http://git.gnome.org/browse/glib/commit/?id=2752f8668e74fc080bda22994fdbddc3cc77cd6b

Fourth: in an attempt to save some translation effort and slightly
improve the translation stats for GLib, I wrote a script that found the
untranslated GDateTime-related strings in all .po files and filled them
in with values taken from the locale database of the C library.  I made
a minor goof and added the wrong strings for Punjabi, but I caught that
and fixed it.

  http://git.gnome.org/browse/glib/commit/?id=76c49589064c38ce9fe4789677f65e3e09021b40
  http://git.gnome.org/browse/glib/commit/?id=041a086256d90f6316c7cf23d8d6c6187a460296

Fifth: I ran my script again, but this time I had it replace *all*
strings (even those that had already been translated).  I didn't commit
those changes, since I don't think that they're all correct.  I'd
appreciate it if translators could look over the changes, though, and
consider them for inclusion in their translations.

It's worth noting that the C library versions of the strings (which are
what my patch introduce) are how the date/time format will appear when
GLib is run on Linux anyway (since in that case we use the strings from
the C library).  Our translated strings are only used when glibc is
unavailable.  For that reason, it may be worth our while to report bugs
against glibc if our strings are better.

  https://bugzilla.gnome.org/show_bug.cgi?id=658215


One last thing to note is that my fill-in-the-blanks effort (from step
4) was intended to result in automatic translation of the new preferred
12 hour time string ("%I:%M:%S %p"), but by-and-large it didn't work.
This is due to the fact that most locales outside of North America don't
have a 12 hour time format specified.  When faced with this situation,
the C library falls back on the POSIX string (which is what GLib will do
as well -- as is the normal case for untranslated strings).  I could
have copied the POSIX string into each locale to keep the translations
at 100%, but it seems like this is sort of missing the point -- so for
now, almost every translation is missing this one string.  Sorry for
that :/


I apologise for for all the churn on GDateTime-related things lately,
but hopefully that's just about the end of it.  There should be no more
changes in this area (and hopefully to any strings in GLib) for the rest
of this cycle.


Cheers



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]