bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Extend header to store target language


From: Bruno Haible
Subject: Re: Extend header to store target language
Date: Wed, 26 Dec 2007 17:03:11 +0100
User-agent: KMail/1.5.4

Dwayne Bailey wrote on 2007-12-20 in [1]:
> It would be useful in the following entry was added to the PO header:
> 
> Target-Language: af;
> 
> This would store the ISO code for the language in the same way that
> locales use this.  Allowing for language, regional variations and text
> encoding to be managed e.g. address@hidden
> 
> Rationale:
> At the moment the target language is guessed based on the name of the
> file - af.po or the location af/ (for KDE layout or storage of .mo
> files).  Or based on the user's settings usually in their translation
> tool.
> 
> If this information is missing then you are unable to determine the
> target language.  For a human this might be OK if they are familiar with
> the language but this is not so for a tool.
> 
> The result of not being having a certain target language is that the
> following things cannot be automated.
> 
> 1) Automatic conversion of MO files into Translation Memory
> 2) Spell checker initiation based on the file, not based on environment
> settings
> 3) Adjustment of automated language specific tests
> 4) Review of related languages (a translator for Zulu, reviewing Xhosa
> would have to continually change settings from Zulu to Xhosa.
> 
> If the language was present all of these tasks could be performed
> reliably by tools.

Very good point. Thank you for suggesting this. I'm implementing it. The
NEWS entry for the next gettext release will contain this:

* PO file format:
  There is a new field 'Language' in the header entry.  It denotes the language
  code (plus optional country code) for the PO file.  This field can be used
  by automated tools, such as spell checkers.  It is expected to be more
  reliable than looking at the file name or at the 'Language-Team' field in
  the header entry.
  msgmerge, msgcat, msgen have a new option --lang that allows to specify
  this field.  Additionally, msgmerge fills in this new field by looking at
  the 'Language-Team' field (if the --lang option is not given).

Notes:
  - The field is called 'Language', not 'Target-Language', by analogy to
    'Language-Team'. (And the source language is rarely anything else than
    English.)
  - The catalog names are based on the glibc conventions for locales, not
    on some newer RFC that has appeared since then. So, the syntax for what
    you call "address@hidden" will be "address@hidden".
  - I understood your points 1), 2), 3), but what you mean by 4) ?

Many thanks for this thoughtful contribution!

Bruno

[1] http://lists.gnu.org/archive/html/bug-gnu-utils/2007-12/msg00055.html




reply via email to

[Prev in Thread] Current Thread [Next in Thread]