Re: Updated Package Descriptions Translations - Volunteers?
- From: Stanislav Brabec <utx penguin cz>
- To: simos pc96 ma rhbnc ac uk
- Cc: gnome-i18n gnome org
- Subject: Re: Updated Package Descriptions Translations - Volunteers?
- Date: Tue, 5 Dec 2000 00:41:43 +0100
On Mon, Dec 04, 2000 at 12:18:11AM +0000, simos@pc96.ma.rhbnc.ac.uk wrote:
> On Sat, 2 Dec 2000, Stanislav Brabec wrote:
>
> > On Thu, Nov 30, 2000 at 03:42:24PM +0000, simos@pc96.ma.rhbnc.ac.uk wrote:
> >
> > > For example, the could be a file MASTER.txt:
> > > ==== MASTER.txt ====
> > > gnome-core "Gnome-core is core to GNOME"
> > > gnome-libs "Basic gnome libraries"
> > > gnome-games "Gnome GaMes"
> > > ==== END ====
> > >
> The conversions between the MASTER files and the .po files should be
> done by some admin or the package generator. The translators should get
> .pot files and return their language .po file.
>
> >
> > I think, package name as comment is better...
>
> Check out first if those .po editing applications strip or rearrange
> comments. Additionally, if a comment is fuzzy, where is the fuzzy line
> put (above or below or something else happens).
>
Gettext contains more types of comment, based on first two characters:
# : initial comment. User editable.
#.: Informational comment. Generated from .pot comments (can be edited
in source code or .pot generator).
#:: Location messages. Generated.
#,: Formatting messages. Generated. Must not be edited or discarded.
#~: Outdated messages. Can be optionally filtered.
The order of comments is the order above.
info gettext:
-----------------
The Format of PO Files
======================
A PO file is made up of many entries, each entry holding the relation
between an original untranslated string and its corresponding
translation. All entries in a given PO file usually pertain to a
single project, and all translations are expressed in a single target
language. One PO file "entry" has the following schematic structure:
WHITE-SPACE
# TRANSLATOR-COMMENTS
#. AUTOMATIC-COMMENTS
#: REFERENCE...
#, FLAG...
msgid UNTRANSLATED-STRING
msgstr TRANSLATED-STRING
-----------------
In general: Any .po file editor MUST TAKE CARE about comments, otherwise
the catalog is marked as invalid and commit to GNOME CVS is rejected
(see my script CVSROOT/commitinfo).
> Moreover, you may stumble on a translator that has strong views
> on "semantics". That is, comments serve as comments and nothing
> else. Comments can be edited or discarded.
>
Comments in po file SHOULD NOT be edited (exception is '# ' initial comment
and '#~', which can be optionally discarded! '#.' informational comments
are generated from source code and edited comments are replaced by
source code ones by msgmerge: Example:
-----------
/* This is a comment */
_("This is a text")
-----------
will generate
-----------
#. This is a comment
#: myfile.c:123
msgid "This is a text"
msgstr ""
-----------
There are also special gettext comments in source code e. g.:
/* xgettext:no-c-format */
Comment solution have these advantages:
- Less typing for translators.
- Shorter .mo file.
- More sophisticated "fuzzy guess" by msgmerge.
> >From what I see from the .po format, .po comments are like HTML
> comments. They can be real comments or Javascript code.
> The difference is the character after the "#". In your example
> below, you wisely put the "." to denote something else.
> Thus, these comments are different and everybody should be happy.
>
No! Comments in .po format are mostly information for user and po file editor.
> Finally, in the case the #. directives are lost, an additional script
> can add them by using the MASTER file and the msgid string of the
> translation file.
>
No additional script. msgmerge does it every time is called.
There is improved version, which fixes my last \n bug and fills
pot-creation-date. You can pre-fill Project-Id-Version (and optionally
SOME DESCRIPTIVE TITLE) by proper data.
I have done similar sed based solution for i18n of xsane. You can look
at it.
--
Stanislav Brabec
desc2pot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]