Re: Fwd: gettext and contexts
Nicolas Goutte <[email protected]> Fri, 21 Oct 2005 21:07:17 +0200
| Newsgroups | gmane.comp.kde.devel.kbabel |
|---|---|
| Message-ID | <[email protected]> |
On Friday 21 October 2005 13:37, Bruno Haible wrote: > Chusslove Illich wrote: > > Anyway, thinking in this direction, 3.5 KBabel is feature frosen, but > > what exactly constitutes a feature freeze? I had this idea: currently, if > > the msgid_plural comes, the msgid pane is going to split into two tabs to > > show both ... > > Well, if you say that KBabel 3.5 is feature frozen, for the moment we > should perhaps try a patch that doesn't affect the GUI at all. > > Here is an attempt on this, touching only the input and output filters. > Patch relative to on kdesdk-472179. Completely untested, since I don't have > the right environment for compiling and testing KDE programs. > > Also attached are two sample PO files with msgctxt in it. I have committed the patch (fixing the compile error) and then I have made a few change to it: - fix saving - loading multiline contexts - improve code (by using QString::mid and QString:.truncate) The saving is still a problem. As the variable comment is a QString and not a QStringList, ^ cannot be used in the QRegExp. Also the code still assume that it is the last comment. (If the user has added a comment, the context is corrupted. Also perhaps the special comment should be named something with KBabel to really show that it is KBabel who has added the special comment. (Not that translators knowing the PO file format badly would start to assume that it is a new feature of the PO file format. (Also as expected msgfmt annoys, as it complains errors on each contexts at save. But that is more cosmetic compared to implement the Gettext context support, as with an old msgfmt, we will never be able to check the new PO file format, whatever we do.) So the next important step would be to add teh support to the PO loading code for the catalog manager. > > Bruno Have a nice day!