[PC-BSD Translations] untranslatable words in source code
yamajun at ofug.net
Sun Sep 2 02:20:02 PDT 2012
On Mon, 21 May 2012 11:07:00 -0400
Kris Moore <kris at pcbsd.org> wrote:
> On 05/18/2012 12:00, Leslie wrote:
> > Hello,
> > There are some untranslatable words, which are fixed strings in PC-BSD source files.
> > For example in 'pc-updategui/mainWin.cpp' there are several " of " concatenations:
> > " (" + tmp + " of " + tmp2 + ")"
> > " (Update " + cI + " of " + tI + ")"
> > " (" + cI + " of " + tI + ")"
> > Otherwise in Hungarian language it can not be translated well in itself. '5 of 10' translated to Hungarian is '5 a 10-b〓l'; '-b〓l' is the 'of'. Do you notice the changed word order?
> > So can't developers use c-formats somehow please, instead of string concatenation?
> > See: http://qt-project.org/doc/qt-4.8/qstring.html#arg
> > I think it would make translators' life easier a bit sometimes :-).
> > Horv〓th L〓szl〓.
> > _______________________________________________
> > Translations mailing list
> > Translations at lists.pcbsd.org
> > http://lists.pcbsd.org/mailman/listinfo/translations
> Thanks! I've fixed the example you've sent. When you find others, please
> send them over and I'll get the corrected in SVN.
(Sorry for reply to old topic.)
I found translation difficulties for Japanese cause of dynamic text.
trayIcon->showMessage( tr("Device Mounted"), tr("Device")+" \""+device->text()+"\" "+tr("has been mounted at")+" "+MOUNTDIR+device->text(), QSystemTrayIcon::NoIcon,3000 );
trayIcon->showMessage( tr("Device Unmounted"), tr("Device")+" \""+device->text()+"\" "+tr("may now be safely removed"), QSystemTrayIcon::NoIcon,3000 );
I suggest alternative code with QString::arg(). This code is transratable for
and more readable message in English.
I hope to PC-BSD develpers use Qstring::arg() with dynamic text in all new code.
====example start here
tr("Device \"%1\" has been mounted at %2%3")
====example end here
Use QString::arg() for Dynamic Text
Yamashiro, Jun Email: yamajun at ofug.net
Okinawa FreeBSD Users Group
More information about the Translations