Lars Gullik Bjønnes wrote: > As to the other problem: different transaltions of the same string is > needed.... Perhaps "To:" is a bit to generic and f.ex. "To Printer:" > or somethign should be used for one of them, similarly for the other > one.
IMHO both strings should be "To:" in this case. They mean a) Convert from format xxx to format yyy (german: "nach") and b) print pages from xxx to yyy (german: "bis") BTW, the qt frontend solves the problem by writing "to" in lowercase in the print dialog, but IMHO this is wrong. I just looked it up in the gettext manual, and if I understood it correctly, gettext does not provide a mechanism to supply additional context information. Instead, they suggest to mark ambigous strings like "Menu|File|Open" and "Menu|Printer|Open" and then use a special translation function that strips the part before the first "|". See http://tinyurl.com/3sy5v The translation mechanism of qt is more flexible here, it has a function QString QObject::tr ( const char * sourceText, const char * comment ) where the comment is used for disambiguation. What should we do? I see the following possibilities: 1. Replace "From:" and "To:" in the preferences dialog with something else, e. g. "From format:" and "To format:". The print dialog should stay as is because this notation is used in many other programs. Try to find similar solutions whenever an ambiguity pops up. 2. Adapt the solution in the gettext manual: Find a character "delimiter" that is not used in translated strings. Then use this as separator and create the following new functions: // use this in .C files if disambiguation is needed _(sourceText, comment) { msgval = _(sourceText + delimiter + comment); if (msgval is not translated) return msgval with comment stripped else return msgval; } // use this from qt .ui files via the -tr option of uic qt_(sourceText, comment) { return toqstr(_(sourceText, comment); } // use this from xforms .fd files xforms_(sourceText) { msgval = _(sourceText); if (msgval is not translated) return msgval with comment stripped else return msgval; } Then make fdfix.sh recognize the delimiter character and use xforms_() instead of _() for strings that contain it. No special conversion is needed for qt. Opinions anyone? Georg