[Kbabel] Full Gettext support in KBabel

Nicolas Goutte nicolasg at snafu.de
Sun Oct 23 18:56:01 CEST 2005


On Sunday 23 October 2005 18:24, Chusslove Illich wrote:
> > [: Nicolas Goutte :]
> > In your new text "Context inserted by KBabel, do not translate:" I see
> > a potentential misunderstanding, as the context is very well in the PO
> > file.
>
> I have the same feeling, but I want to point out that msgid is not really
> containing that stuff. Perhaps you could drop another message to
> kde-i18n-doc, amplifying that we need a good wording there.
>
> > The new patch still uses "not"!
>
> *sigh* When I was reading my first book on C++, I've seen the and, or, not,
> and thought, "how nice" :) For some strange reason, it is easier for me to
> follow the indenting conventions, than this...
>
> > void setText(QStringList texts, QString msgctxt = QString::null);
>
> Fine.
>
> > So I suppose that with this patch the change needed for KBabel's editor
> > are clear, now we need to see about the catalog manager...
>
> As far as I've understood, you've patched it to load properly, and it is
> msgfmt that is making problems?
>

> Strictly speaking, if one is to operate with the new Gettext format, he
> should also have new Gettext installed. By the way, we should tell Bruno
> when do we really need it as a new release.

Yes, a translator should but he won't always have it.

Sure we cannot offer everything with an old Gettext. We cannot offer anything 
where msgfmt has no alternative (for example the check at save).

>
> Practically, there is that problem of not disturbing translators too much,
> but I really don't see any complete solution which doesn't require new
> Gettext being installed.

KBabel does only need msgfmt for tests.

I do not really see why this is needed for the catalog manager. It was only 
added because apparently the code had a weakness (as far as I understand).
So we have to find that weakness and make the code stronger.

(Also I really do not understand why the PO files have to been processed two 
times once by msgfmt once by the catalog manager. It makes loading a full 
translation (like on of KDE) extremely slow. (And the cache only works for 
the default project. So a translator having a few projects feels that 
problem.))

>
> One patch we could do, is to detect whether msgfmt knows about msgctxt, and
> if it doesn't, skip checking any file which contains "msgctxt" string in
> it (and that would mean additional search through the file).

That would mean to process a file a third time! That is not the right 
direction to go.

> This way,
> user wouldn't be informed about syntax errors in such a file, but would
> have to find out in some other way (e.g. statistics page).

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.))

Have a nice day!



More information about the kbabel mailing list