[Kbabel] Source references

Nicolas Goutte nicolasg at snafu.de
Thu Jan 5 17:00:08 CET 2006


On Wednesday 04 January 2006 10:51, Stanislav Visnovsky wrote:
> Dňa Pondelok 26 December 2005 04:44 Nicolas Goutte napísal:
> > I have worked on the source references (also known as contexts) in
> > KBabel.
> >
> > A few weeks ago I have fixed the problem that once you had clicked an
> > entry without any valid source references (typically all rc.cpp
> > references), not any other source references would work anymore for that
> > PO file.
> >
> > In the last days, I have added the parsing of source references coming
> > from extractrc and extractattr, so for comment lines starting like:
> > #. i18n file
> >
> > I have also added parsing the source reference of Gettext's "strict" mode
> > of PO files, so for lines starting like:
> > # File
> >
> > For GNU-like projects, I have introduced a new variable @POFILEDIR@ to
> > create search paths starting from the directory of the PO file.
> >
> > For new KBabel projects, two new search paths are added by default:
> > @POFILEDIR@/@COMMENTPATH@
> > @POFILEDIR@/../@COMMENTPATH@
> > (The last one is typical for GNU.) This fixes bug #114041
> >
> > For projects extracting their POT files under Windows, I have added the
> > support of backslahes in the source references' paths of the PO file.
> > (That fixes bug #116393.)
> >
> > So if you have the development versions of KBabel, it wouldbe nice if you
> > could test. If you do not have it, please test KBabel 1.11.1 of KDE 3.5.1
> > when it will be out (in a month or so), so that eventual problems could
> > be fixed for KDE 3.5.2.
> >
> > Despite the work, there are still cases where the source reference will
> > not work. (Just a note: this is for PO files only. Qt translation files
> > or XLIFF are not specially supported current by KBabel, as far as I
> > know.)
> >
> > PO files for KDE DocBooks have not enough information for KBabel to find
> > back the source. (Only the pure file name is given as reference.) Fixing
> > that in KDE will be difficult but should be possible. (I have an idea but
> > it must mature a little.)
>
> I know that Marco Wegner used Kbabel for docu references.

Well, I do not how. In such cases, the source reference consists only the 
filename (so typically index.docbook) with the line number. But I am just 
thinking that it is perhaps a reason to use the @PACKAGE@ variable. So I will 
have to check that further.

>
> > desktop_something.po files do not work either, as KBabel cannot guess
> > currently the needed paths out of the file name of the PO file. Perhaps a
> > new variable, for example called @KDEDESKTOPSPECIAL@ , should be needed.
> > (I do not really like it, as it again puts non-Gettext KDE knowledge into
> > KBabel.)
>
> IMO it's not worth it. The desktop file does not provide reasonable
> information for many translators.

Ah, yes, I had not seen it under this point of view. So indeed it is not a 
priority.

>
> > And last but not least, PO files whose POT files are extracted from
> > directories below KDE's "top sub directories" have also to few
> > information to let the source references work. (KBabel cannot guess the
> > module name.) Fixing that in KDE will be very difficult.
> >
> > If somebody knows another way to defeat the source references, please
> > tell, so that at least it could be documented as known problem.
>
> We have a bug report about bad usability of the configuration for source
> references. But it's very tricky by itself. Maybe something like
> configure-by-example could help here. But is it worth?

To fix bug #85885 (the second bug report on this, which was filed againt KDE's 
documentation), I have documented the "source" dialog in the project 
configure. So at least for KDE 3.5.1, the situation will be improved.

For further improved documentation, I have a feeling that we would need a 
whole chapter on the subject (but I not really ready to write it).

>
> Stano

Have a nice day!

> _______________________________________________
> kbabel mailing list
> kbabel at kde.org
> https://mail.kde.org/mailman/listinfo/kbabel



More information about the kbabel mailing list