[Kbabel] Default behaviors (header-wise) in KBabel
Nicolas Goutte
nicolasg at snafu.de
Sat Oct 29 14:36:41 CEST 2005
On Saturday 29 October 2005 08:00, Daichi Kawahata wrote:
> On Fri, 28 Oct 2005 20:31:46 +0200
(...)
> > 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.
Unfortunately I would say that it is already too late for KDE 3.5. Perhaps for
KDE 3.5.1, we can try to improve it by using user-visible messages that are
already used in the project configuration.
>
> > > > > > 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.
I have checked again in the meantime: there is only two "magic" strings and
there are those already used. So there is no solution in this way.
>
> Please look a subject, what I asked is not knowing usage of KBabel, it was
> changing default behaviors of KBabel,
Well, the default behaviour of KBabel will probably always remain oriented to
what KDE needs. What is probably missing is an easier entry level for non-KDE
projects.
Probably the "GNU" setting in the wizard is not enough, at least according to
your feedback. (Also it could also be possible that for some software
projects, GNU settings are as extreme/unsuitable as KDE ones.)
> okay I understood ISO language codes
> at the `Project-Id-Version' come from directories `$lang.po/', but what's
> logic behind there?
No, you seem to have misunderstood me.
The @PACKNAME@ "magic" string takes the file name (in your case ca.po) and
uses the basename of the file name (for you: ca).
The logic is that in KDE the PO files have the same names than the
corresponding POT files (except the final T in the extension). So for a
kdelibs.pot, the translation would be in kdelibs.po. And "kdelibs" makes a
good project name. (The version number in the Project-Id is not used in KDE.)
> I mean, PO file I used as example isn't unique, the
> most KBabel users tend to make a mess against the header.
Probably because the setting about Project-Id is the most KDE-specific of all
settings of KBabel. (I will have to check what the "GNU" setting of the
wizard sets. Perhaps the problem is (also?) there.)
>
> 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,
To compare: KBabel's philosophy would be to open the POT file and save it as
PO file. KBabel would be supposed to set all headers correctly (at least for
KDE, if the project configuration was done correctly).
The msginit program is barely needed in KDE, as its main information would be
the plural formula, but plurals are not handled like this in KDE. (It is
planned to return to the Gettext behaviour in KDE 4, now that the Gettext
development version has message context support.)
>
> # 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...
Sorry, I do not think that bad user data entered in the project setting is
mainly a problem of KBabel. (I had a similar problem with a new translation
language and KBabel was not used at all.)
The user setting problems can be fixed in the current KBabel. It is just up to
the user to set them correctly (and perhaps to translation coordinators to
remind their translator colleagues about the correct settings.)
As for the example of KBabel 1.3.1, I suppose that this is pretty old stuff.
(That would make 8 KDE minor versions back (from KDE 3.5). My first guess
would be that it is still some KDE2.)
For the comment header, personally I think too that KBabel has some weaknesses
inthat direction. (But without your feedback, I would perhaps not have seen
the problems that you are reporting.)
At last, ther eis Project-Id. That is probably that the current implementation
follows too much KDE's practise.
>
> > > > 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.
There is not really a "first time setup wizard". This wizard just configure
the default project, it does not set any global valid data. (However this is
probably a useful wish.)
(The reason is probably that the conversion between having only global
settings to have projects now has remained somewhere in the middle by lack of
developers (and unfortuantely other code parts were to make or to fix
urgently).)
>
> > > > 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'?
Well, KBabel would allow you everything between changing not any option to
changing all options at save time. (Perhaps this is more a usability problem,
as indeed not modifying any option in the header is perhaps a very seldom
case, so having an option just for that is perhaps superfluous.)
>
> > > > 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?).
There is no "intial setup wizard". There is just a wizard when creating a new
project. (Starting KBabel the first time means to create the default
project.)
>
(...)
> > > > # 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'.
Well, KBabel was made more made as internal tool for KDE. And it works well
(enough) for KDE.
Of course, I am not meaning that it could not be made useful (or improve that
usefulness) for other projects too. But anyway due to the KDE-specific
plurals, the use of KBabel was quite limited outside KDE.
That is probably also a reason why non-KDE feedback is/was sparse. (Good, it
is also a "chicken and egg" problem. If KBabel is not useful enough for other
projects, therw ill be no feedback. And without feedback, it cannot be made
more useful.)
(...)
> > > > > > 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...
Sorry, but perhaps it is KDE specific too. We try to give the translators (or
at least each language coordinator) a little more responsibility than that.
Probably giving the KBabel user more help would be preferable but there are
many many details that could be improved in KBabel but we have not the
necessary developers to do everything, even less at once. (So probably what
can be done with a setting, already today, is not much a priority, even if it
is bad usability.)
>
Nevertheless, I can see a few relevant problems from the emails that you have
written. I am trying to list them below:
- have a mode where the project-id can be read, modified and saved again.
- have a global setting wizard (and setting) for the basic translators' data:
his (full) name, his email and optionally his language. (The language can
only be optional, as there are translators, at least in KDE, working on more
than one language.)
- improve the "new project" wizard to ask for all relevant project data.
(Note: the email address of the translators might need to be confirmed, if
the translator has a project-specific email address, e.g. goutte at kde.org )
- improve the "new project" wizard to give sensible default for general kinds
of projects: KDE, GNU and a more general open source project (e.g. not a FSF
copyright),
- allow users to have a better access to the header comment to be able to edit
it. (Note: I have not checked what the current possibilities of KBabel are in
this matter.)
- allow typical (but not used in KDE currently) (non-FSF-)copyright line and a
license line (just below) in the comment header
Potentially ideas:
- perhaps allow "project configuration templates" for languages.
Already registered bug reports that might be relevant:
- bug #76495 ( http://bugs.kde.org/show_bug.cgi?id=76495 ) about that the
catalog manager does not support the GNU form of POT/PO file organization.
(PO files named after language codes).
- bug #115295 ( http://bugs.kde.org/show_bug.cgi?id=115295 ) about that the
save code should not be so aggresive with author lines in the comment header.
Good, it makes a lot of bug reports to be created. Do you want to create them
in KDE Bugs ( http://bugs.kde.org ) or should I do it?
(Unfortunately most bugs will only be able to be fixed for KDE 4.)
> Regards,
Have a nice day!
More information about the kbabel
mailing list