I'm having difficulties to achieve this... If someone that knows correctly the way the whole QTranslator thing should work...
What I understand is that .qm files contains messages translations, indexed by - a unique hash used as lookup key - the couple context/sourceText, and a non mandatory comment (what we see in .ts) My current problems are : - i find a lot of (or maybe all, don't remember) messages translated in the .qm but with no source text available (QTranslatorMessage::sourceText() is allways NULL) - i find duplicate translation with the same internal hash (sounds strange ?) (QTranslatorMessage::hash() is same). Maybe the key should be context + hash ? - i don't find any context information (QTranslatorMessage::context() is allways NULL) It seems that the .qm file is kind of stripped. Is this possible ? I can currently extract a list of "hash=translation" (also with the comments, but I don't think that's very useful) values from the chinese .qm file, and do the same on another one, for example the french one, and then do comparisons based on the hash value, but I can't find a way (easy, without parsing XML files and so on) to make them match the english messages (english .qm have no translations inside, no surprise there). Furthermore, the duplicate hash value problem make me think there's something buggy... I'll try another thing if I got time : use the empty .ts file to get all the context/sourceText keys and use the QTranslator::findMessage method to search their translation in the .qm... If anybody have ideas on how to help... Thanks Christophe 2006/1/24, Craig Bradney <cbradney at zip.com.au>: > > On Tuesday 24 January 2006 11:25, Christophe Chailloleau-Leclerc wrote: > > Not sure i'll have time, but if someone could send me the base .ts/po > file > > and the current "lost" qm, i'll could try to have a look. > > > > Christophe > > > Sent > > Craig > > > _______________________________________________ > Scribus mailing list > Scribus at nashi.altmuehlnet.de > http://nashi.altmuehlnet.de/mailman/listinfo/scribus > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20060124/1ecb1f09/attachment.html
