[Kbabel] Default behaviors (header-wise) in KBabel

Daichi Kawahata daichi at xfce.org
Sat Oct 29 08:00:35 CEST 2005


On Fri, 28 Oct 2005 20:31:46 +0200
Nicolas Goutte wrote:

> Very sorry! It seems that you emailed to me only and I answered you
> to the kbabel mailing list too.
> 
> (But if you want, you can make this answer public.)

Yeah, I forgot to reply to the ML. BTW was that right place to post
(I just saw that address at the homepage and couldn't find ML archive)?
I wish that is for developers ML (and please CC me, I'm not subscribed).

> All the settings that I describe below are in what I have called the
> "project settings". Officially it is called Project/Configure in
> KBabel's menu.
> 
> I have used KBabel 1.11 (released in the future KDE 3.5). I am sorry
> that I have no earlier version but as far as I know the project
> configure has not much changed.

Then, please reconsider improvement of `Project Setting' for the 1.12
release.
 
> > > > >   o It replaces given proper header string at `Project-Id-Version'
> > > > >     with ISO 639 language code.
> > > >
> > > > In fact it is the filename that it places there.
> > > >
> > > > (In KDE, PO files are not named by the language but like the
> > > > corresponding POT file. And the directories are ordered by language,
> > > > not by POT file.)
> > >
> > > Probably so, but I've seen many times the following case from KBabel:
> > >
> > >     -"Project-Id-Version: Mousepad 0.2.2\n"
> > >     +"Project-Id-Version: ca\n"
> >
> > Yes, because in your project, the PO files are named like the language
> > code: ca.po . KBabel drops the .po extension and uses the basename as
> > project name.
> >
> > That is convenient in KDE, apparently not at all for you.
> >
> > > This clearly discarded proper give information.
> >
> > Because by default KBabel is told to do so.
> 
> In the the project configure dialog, there is settings for save (the
> "save" icon). On the "Header" tab, you can select which fields of the
> headers are updated.
> 
> So if you want you can uncheck the "Project" checkbox and then the 
> "Project-Id-Version" will not be changed anymore on save.
> 
> Alternatively you can set the "Project-Id" edit box, but I do not know
> which "magic" string will do what you intend to do.

Please look a subject, what I asked is not knowing usage of KBabel, it was
changing default behaviors of KBabel, okay I understood ISO language codes
at the `Project-Id-Version' come from directories `$lang.po/', but what's
logic behind there? I mean, PO file I used as example isn't unique, the most
KBabel users tend to make a mess against the header.

For example (from libxfcegui4-4.2.3, in Xfce):

  # SOME DESCRIPTIVE TITLE.
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
  # This file is distributed under the same license as the PACKAGE package.
  # FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
  #
  #, fuzzy
  msgid ""
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2005-10-28 20:54+0900\n"
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  "Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
  "Language-Team: LANGUAGE <LL at li.org>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=CHARSET\n"
  "Content-Transfer-Encoding: 8bit\n"

yeah, that's initial header strings by `make *.pot', then usually I
create target PO file with `msginit (--locale=$lang)', in this case
I used `de', generated PO file has header below,

  # German translations for libxfcegui4 package
  # German messages for libxfcegui4.
  # Copyright (C) 2005 THE libxfcegui4'S COPYRIGHT HOLDER
  # This file is distributed under the same license as the libxfcegui4 package.
  # Daichi Kawahata <daichi at xfce.org>, 2005.
  #
  msgid ""
  msgstr ""
  "Project-Id-Version: libxfcegui4 4.2.3\n"
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2005-10-28 20:54+0900\n"
  "PO-Revision-Date: 2005-10-29 13:59+0900\n"
  "Last-Translator: Daichi Kawahata <daichi at xfce.org>\n"
  "Language-Team: German <translation-team-de at lists.sourceforge.net>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=ISO-8859-1\n"
  "Content-Transfer-Encoding: 8bit\n"
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"

and the following is the ideal

  # German translations for libxfcegui4 package.
  # Copyright (C) 2002-2005 The Xfce development team.
  # This file is distributed under the same license as the libxfcegui4 package.
  # Daichi Kawahata <daichi at xfce.org>, 2005.
  #
  msgid ""
  msgstr ""
  "Project-Id-Version: libxfcegui4 4.2.3\n"
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2005-10-28 20:54+0900\n"
  "PO-Revision-Date: 2005-10-29 14:05+0900\n"
  "Last-Translator: Daichi Kawahata <daichi at xfce.org>\n"
  "Language-Team: German <translation-team-de at lists.sourceforge.net>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"

now you can see the PO files come from KBabel below (it's from Xfce
4.2.2, 196 of 657 PO files used KBabel),

  # translation of ca.po to 
  # This file is distributed under the same license as the PACKAGE package.
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
  # Pau Rul?lan Ferragut <paurullan at bulma.net>, 2005.
  #
  msgid ""
  msgstr ""
  "Project-Id-Version: ca\n"
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2004-12-19 10:56+0100\n"
  "PO-Revision-Date: 2005-04-21 00:25+0200\n"
  "Last-Translator: Pau Rul?lan Ferragut <paurullan at bulma.net>\n"
  "Language-Team:  <ca at li.org>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  "X-Generator: KBabel 1.9.1\n"

  # translation of cs.po to 
  # translation of cs.po to Czech
  # translation of libxfcegui4.po to Czech
  # This file is distributed under the same license as the PACKAGE package.
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
  # Alois Nespor <Alois.Nespor at seznam.cz>, 2004, 2005.
  #
  msgid ""
  msgstr ""
  "Project-Id-Version: cs\n" <- language code appears again and again
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2004-12-19 10:56+0100\n"
  "PO-Revision-Date: 2005-03-24 22:36+0100\n"
  "Last-Translator: Alois Nespor\n" <- where's address gone?
  "Language-Team:  <cs at li.org>\n"
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  "X-Generator: KBabel 1.9.1\n"

  # translation of libxfcegui4.po to 
  # translation of pa.po to Punjabi
  # translation of libxfcegui4.po to Punjabi
  # This file is distributed under the same license as the PACKAGE package.
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
  # Amanpreet Singh Alam <aalam at redhat.com>, 2004.
  # root <root at Phulewala>, 2004.
  #
  msgid ""
  msgstr ""
  "Project-Id-Version: libxfcegui4\n" <- version lacks
  "Report-Msgid-Bugs-To: \n"
  "POT-Creation-Date: 2004-12-19 10:56+0100\n"
  "PO-Revision-Date: 2004-10-01 08:27+0530\n"
  "Last-Translator: root <root at Phulewala>\n" <- clearly Unix user name
  "Language-Team:  <pa at li.org>\n" <- language name missing
  "MIME-Version: 1.0\n"
  "Content-Type: text/plain; charset=UTF-8\n"
  "Content-Transfer-Encoding: 8bit\n"
  "X-Generator: KBabel 1.3.1\n"
  "Plural-Forms: Plural-Forms: Plural-Forms: nplurals=2; plural=(n != 1);\n"
  "\n"

blah, blah... I'd like to say again, why KBabel allows header mess by
the translators? Assuming that a translator isn't familiar with usage
of Unix/Linux tools basically, why KBabel won't aid them? As for the
initial given header strings, I really hope KBabel goes like `msginit'
does, just using `basename' sounds fear for me...

> > > When KBabel appears in the header, modified files tend to sound
> > > a discord like below:
> > >
> > >     $ grep Project-Id-Version *.po
> > >     ca.po:"Project-Id-Version: ca\n"
> > >     cs.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     de.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     el.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     es.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     eu.po:"Project-Id-Version: Mosuepad\n"
> > >     fr.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     gu.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     hu.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     it.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     ja.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     lt.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     pl.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     pt_BR.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     ru.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     sk.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     sv.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     ta.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     zh_CN.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >     zh_TW.po:"Project-Id-Version: Mousepad 0.2.2\n"
> > >
> > > Yeah, Basque translator also uses KBabel (typo in project name...),
> > > and next part,
> > >
> > >      "Report-Msgid-Bugs-To: \n"
> > >      "POT-Creation-Date: 2005-10-21 17:30+0900\n"
> > >     -"PO-Revision-Date: 2005-10-07 18:36+0900\n"
> > >     -"Last-Translator: David Rosal <davidrr at users.sourceforge.net>\n"
> > >     -"Language-Team: Catalan <ca at dodds.net>\n"
> > >     +"PO-Revision-Date: 2005-10-27 22:30+0200\n"
> > >     +"Last-Translator: paurullan <paurullan at bulma.net>\n"
> > >     +"Language-Team: catala`\n"
> > >
> > > also given language team information is discarded,
> > > translator name is given by Unix-like user name too.
> >
> > The user name is the one given to KBabel. I am not sure if KBabel
> > tries to use the system user name by default but anyway that can be
> > changed too.
> >
> > > My point was why KBabel discards given values every per file
> > > saving?
> >
> > Because it is the default setting.
> 
> For the user name, again, you can select it not to change it. In the
> "save" icon, "Header" tab, you have the checkbox named "Last-Translator".
> 
> If you want to save the last translator's name correctly, then you
> have to set it in the "Identity" icon, in the "Name" edit box, The
> used email address is the one of the "Email" edit box.

I'd like to say again, a translator name should be fixed at first time
setup Wizard, don't allow frequently changes by translator and please
promote using proper name and address, please.

> > > Is there any option `Disable force over writing at save'?
> >
> > Yes, there is an option to leave the header unmodified. (There is
> > even more finer control if I remember well.)
> 
> In the "Save" icon, "General" tab, you can uncheck "Update header when
> saving" and the header is not changed anymore (not even PO-Revision-Date).

I'm using Emacs PO mode, it never touch when that PO file isn't changed
at all, only touches `PO-Revision-Date' when that file is modified,
why KBabel goes with `All or Nothing'?

> > > I really hope KBabel honors proper give strings.
> > >
> > > > >   o It keeps leaving strange comments at initial comment part.
> > > >
> > > > I have tried to limit the impact of the "strange comments" in
> > > > the KBabel version for KDE 3.5 by trying to remove all old strings
> > > > of the kind.
> > > >
> > > > However in your case, it seems that your name has been given in 2
> > > > different forms, so that KBabel cannot find that it is the same
> > > > name.
> > >
> > > That's not my name,
> >
> > Sorry!
> >
> > > I manage them for the release, and that's right,
> > > it seemed to be caused by different given forms but why?
> >
> > Because the data in KBabel was different?
> >
> > > Usually translator only have to fill the contact (translator) form
> > > once at startup Wizard (from my poEdit experience).
> >
> > Well, that is where it does not work cleanly with KBabel. If you use
> > only the wizard, the are missing important settings. So you have to
> > use the "project settings" afterward. (To avoid a misunderstanding,
> > for KBabel a project, like in "project setting" does not mean a PO
> > file but more the whole translation in a language, so all PO files.)
> 
> As written above, it is Project/Configure in the menu.

I'll say again and again, if that `Project setting' is invalid, don't
allow to move next step also, yeah I know initial setup Wizard only
works for the global values (probably, only contact address?).

> > > What strange comments (for me at least) are, the following comment
> > > part tends to get added per save,
> > >
> > >
> > >   # translation of ca.po to catala`   <- added string by KBabel
> >
> > Yes, this line is added by KBabel. There is a template in the "project
> > setting" that you can change (probably to an empty string too).
> 
> In the "Save" icon, you can uncheck "Update description comment when
> saving" to not have this sort of comments.
> 
> Instead, you could also change that comment in the "Description" text
> box (but again I am not sure how you ill get the name of the application
> there).
> 
> > >   # Catalan translation of Mousepad.  <- given string by me
> > >   # Copyright (C) 2005 Erik Harrison. <- (ditto)
> > >   # This file is distributed under the same license as the \
> > >     Mousepad package. <- (ditto)
> > >
> > > can be
> > >
> > >   # translation of ca.po to
> > >   # translation of ca.po to catala`
> > >   # translation of Mousepad.po to catala`
> > >   # translation of ca.po to catala`
> >
> > Yes, that is one bug in KBabel to repeat the lines as it cannot find
> > (and remove) the older ones. This is supposed to be fixed in KBabel
> > 1.11 (to be released with KDE 3.5).

Okay good to hear.

> Of course, this simplification happens only if KBabel is allowed to
> change the description comment.
> 
> > >   # Catalan translation of Mousepad.
> > >   # Copyright (C) 2005 Erik Harrison.
> > >   # This file is distributed under the same license as the Mousepad
> > >   package.
> > >
> > > > It is for simplification of the translator's tasks.
> > >
> > > Sorry, but discarding given proper strings doesn't sound
> > > simplification for me.
> >
> > The philosophy behind KBabel is probably another that the one that
> > you expect. 
> 
> To avoid a potential misunderstandind: in the sentence above: the
> "you" is supposed to be anonymous.

I think that couldn't be excuse, what's philosophy KBabel has? Making
tons of file with insufficient (in other words `slut') header won't
succeed at building `The Tower of Babel'.

> > You fill the project setting with the correct data and then it
> > modifies the header comment and the header automatically.
> 
> > (KDE has more than 900 POT files to translate, so you really want
> > some automatisation. Of course the automatisation can only work
> > correctly with the correct data entered in KBabel.)
> >
> > > > > as I've never used KDE, it's hard to figure the problem out,
> > > > > but I smelled there's some bad design at giving values to the
> > > > > PO header, at least Kbabel should warn at blank form (project
> > > > > name, contact address) if it exists but Kbabel shouldn't fill
> > > > > these forms with invalid values at the same time (there needs
> > > > > some guidance/tooltips for the translators),
> > > >
> > > > Normally with the project setting you can set nearly everything
> > > > (but the "project name" of a PO file).
> > > >
> > > > (The only bigger problem that I know is that the project wizard
> > > > fails to ask some questions, like the language team email. So you
> > > > have always to check the project setting (which is annoying as
> > > > the wizard is supposed to avoid that.))
> > >
> > > Probably, a language team should be given across the modules,
> >
> > The "project setting" is not linked to one PO file, but to each PO file
> > that you modify with KBabel under this project setting.
> >
> > As written above, "project" in this case as another meaning than "project"
> > like Gettext means it.
> >
> > > but each project name shouldn't be replaced by the single strings (e.g.
> > > soon, I'll have see `ca' at the `Project-Id-Version' in the every ca.po
> > > files.)
> > >
> > > > > to be more detailed, please read my post in the Xfce i18n ML also,
> > > > >
> > > > > http://foo-projects.org/pipermail/xfce-i18n/2005-September/003277.html
> > > >
> > > > I am not really understanding your critic about the language team that
> > > > you have in that email,
> > > >
> > > > The language team can be set correctly by KBabel, it is done often in
> > > > KDE.
> > >
> > > It's nothing to do with KBabel, I only pointed out that
> > >
> > >   -"Language-Team: Catalan <ca at dodds.net>\n"
> > >   +"Language-Team: catala`\n"
> > >
> > > isn't welcomed.
> >
> > Ah, sorry, I misunderstood you. (So probably you meant to check to
> > correctly set KBabel to avoid that.)
> >
> > > > > I'm bit tired with KBabel users, and thanks for your considerations.
> > > >
> > > > I am sorry about that you are tired to use KBabel.
> > > >
> > > > As far as I know, return of experience of non-KDE users is sparse,
> > > > so it is difficult to know what is needed.
> > > >
> > > > You can also uses KDE Bugs: http://bugs.kde.org to report bugs and
> > > > wishes that you would have for non-KDE projects.
> > > >
> > > > For the KDE 3.5 branch we cannot do much anymore, as we are already
> > > > in message freeze for weeks. So major changes will only be in KDE 4
> > > > unfortunately.
> > >
> > > I'd like to say again, if PO file gets given proper strings, please
> > > honor that, don't overwrite (except time stamp, last translator name)
> >
> > So set it that way in the "project setting" of KBabel. (As written,
> > KBabel's defaults are meant for KDE.)
> 
> Again it is Project/Configure

Again, please don't expect anything from a translator other that translation
works, it's KBabel that keeps watching file sanity, giving proper strings at
the header/initial comment, warning a translator `Your Project/Contact address
is invalid/vacant, please give decent values for them.' blah, blah, blah...

Regards,
-- 
Daichi

Language Codes: http://www.w3.org/WAI/ER/IG/ert/iso639.htm
Country Codes: http://www.ics.uci.edu/pub/ietf/http/related/iso3166.txt


More information about the kbabel mailing list