[Kbabel] Full Gettext support in KBabel

Nicolas Goutte nicolasg at snafu.de
Sun Oct 23 20:54:36 CEST 2005


On Sunday 23 October 2005 20:29, Chusslove Illich wrote:
> > [: Nicolas Goutte :]
> > Sure we cannot offer everything with an old Gettext. We cannot offer
> > anything where msgfmt has no alternative (for example the check at
> > save).
>
> Especially on save, we should not engage msgfmt if it doesn't know about
> contexts and the file being edited contains one. It would wreck
> translator's experience, spewing errors on each save.
>
> I suppose cutting out msgfmt at save in these conditions would be quite
> easy. Perhaps with appropriate warning dialog, that msgfmt is too old to
> be used for checking the file in question.

Well, for KDE 3.5, it is enough that the check can be disabled by the user. 
(That is not an emergency.)

>
> > KBabel does only need msgfmt for tests.
>
> One must ask, what really constitutes as a well formed PO file? In my view,
> that is one which passes msgfmt check, because it is msgfmt which
> generates runtime catalogs. Ie. I wouldn't say that msgfmt is just a check
> for correctness, but a working definition of correctness.

Well, normally a well formed PO file would pass
msgfmt --check

That is currently not possible with many files in KDE, due to the KDE plurals.
(--check-header should be possible instead but I do not want to try it in 
KBabel. But that is what is in the translator's HOWTO now.)

msgfmt alone tries to work with all kind of PO file variants and therefore 
checks little. (Of course, if it does not understand the syntax, like for 
msgctxt, it has no choice but to quit.)

>
> In other words, no other check (except the conceptually same, using
> matching libgettextpo library) can be assurance that file is correct, and
> that is why I think it would be counterproductive to try to cut msgfmt (or
> libgettextpo) out of catalog manager.

As written, msgfmt without any check parameter checks little. So a rather
robust loading code should be able to do as well. 

>
> In fact, I'm thinking that we should do absolutely nothing about catalog
> manager (except switching it to libgettextpo sometime in the future, for
> performance). 

Well, would you like a catalog manager full of question marks? It makes the 
catalog manager useless and degrades it purely to a CVS/Subversion client.

> So that when translator comes complaining about correct
> files being flagged as incorrect, he will positively find out that he
> needs to update some tools, or live with false alarms.
or abandon translatng...
>

> > No, we need to find the syntax errors. (Otherwise a translator might
> > find that everything is right and then Scripty will have an extremely
> > long list of errors (as if today's list was not long enough.))
>
> Can't the info about incorrect files just be shot back to team
> coordinators, using big menacing letters, and let them organize themselves
> within their teams?

Well, team coordinators are only people too and mostly volunteers too. 
Menacing is not quite a good way for them to remain volunteers.

But sure for KDE4, we must improve the feedback from Scripty to team 
coordinators. That is one of the many places where work is needed.

(The very best solution would be to make "msgfmt --check" while committing, 
but that needs probably too much computer power on the KDE SVN server. But 
Subversion's SVN server works so, it seems.)

Have a nice day!



More information about the kbabel mailing list