Re: problem with parasite cross over in translations
Hi,
This patch was focusing on /src/select-toolbar.cpp so that X, Y, W (idth), H (eight) strings become translatable. The problem is that now, in all .pot file, H can conflict with H (ue) of the color tab of clonetiler.cpp dialog.
There's a solution for this kind of problem: context sensitive strings. An example from a KDE translation file (kdelibs.po):
-------------------
#: kdecore/kcalendarsystemgregorian.cpp:99 kdecore/klocale.cpp:550 msgid "" "_: May short\n" "May" msgstr "mag"
#: kdecore/kcalendarsystemgregorian.cpp:127 kdecore/klocale.cpp:566 msgid "" "_: May long\n" "May" msgstr "maggio"
-------------------
These two strings above are from the same (Italian) PO file. If the UI language is English, then the appropriate KDE applications will display "May" in both cases, but if the UI language is Italian, then one of the strings will be "mag", while the other will be "maggio". As you can see, there can be multiple translations for the _same_ English string, you just have to differentiate them with context (the "_: blah blah blah\n" lines before the English strings).
The Italian ("it") PO file I used as example is here: http://webcvs.kde.org/kde-i18n/it/messages/kdelibs/kdelibs.po
Arpad Biro
Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html
I've just taken a look at KDE cvs. I'm afraid this workaround won't work. They don't really manage the translation process like Inkscape. See : --------- QString KCalendarSystemGregorian::monthName(int month, int year, bool shortName) const { Q_UNUSED(year);
if ( shortName ) switch ( month ) { < --- snip --- > case 5: return locale()->translate("May short", "May"); case 6: -------------
from http://websvn.kde.org/branches/KDE/3.4/kdelibs/kdecore/klocale.cpp?rev=40920...
QString KLocale::monthName(int i, bool shortName) const { if ( shortName ) switch ( i ) { < --- snip --- > case 4: return translate("April", "Apr"); case 5: return translate("May short", "May"); case 6: return translate("June", "Jun"); ...
I think I'll resubmit a patch to revert my previous one (pitty).
Regards,
Matiphas
Selon Arpad Biro <biro_arpad@...36...>:
Hi,
This patch was focusing on /src/select-toolbar.cpp so that X, Y, W (idth), H (eight) strings become translatable. The problem is that now, in all .pot file, H can conflict with H (ue) of the color tab of clonetiler.cpp dialog.
There's a solution for this kind of problem: context sensitive strings. An example from a KDE translation file (kdelibs.po):
#: kdecore/kcalendarsystemgregorian.cpp:99 kdecore/klocale.cpp:550 msgid "" "_: May short\n" "May" msgstr "mag"
#: kdecore/kcalendarsystemgregorian.cpp:127 kdecore/klocale.cpp:566 msgid "" "_: May long\n" "May" msgstr "maggio"
These two strings above are from the same (Italian) PO file. If the UI language is English, then the appropriate KDE applications will display "May" in both cases, but if the UI language is Italian, then one of the strings will be "mag", while the other will be "maggio". As you can see, there can be multiple translations for the _same_ English string, you just have to differentiate them with context (the "_: blah blah blah\n" lines before the English strings).
The Italian ("it") PO file I used as example is here: http://webcvs.kde.org/kde-i18n/it/messages/kdelibs/kdelibs.po
Arpad Biro
Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html
participants (2)
-
unknown@example.com
-
Arpad Biro