[PC-BSD Translations] untranslatable words in source code

Ken Moore ken at pcbsd.org
Thu Sep 13 12:51:58 PDT 2012


On 09/02/2012 05:20, Yamashiro, Jun wrote:
> 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.
>
> In src-qt4/pc-mounttray/mountTray.cpp:
> ====line 65
>   }else if(ident==2){
>     //Device mounted
>     trayIcon->showMessage( tr("Device Mounted"), tr("Device")+" \""+device->text()+"\" "+tr("has been mounted at")+" "+MOUNTDIR+device->text(), QSystemTrayIcon::NoIcon,3000 );
>
>   }else if(ident==3){
>     //Device unmounted
>     trayIcon->showMessage( tr("Device Unmounted"), tr("Device")+" \""+device->text()+"\" "+tr("may now be safely removed"), QSystemTrayIcon::NoIcon,3000 );
> ====end here
>
>
> I suggest alternative code with QString::arg().  This code is transratable for
> non-SVO language(http://en.wikipedia.org/wiki/Subject%E2%80%93verb%E2%80%93object)
> 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
> trayIcon->showMessage(
> 	tr("Device Mounted"),
> 	tr("Device \"%1\" has been mounted at %2%3")
> 		.arg(device->text()).arg(MOUNTDIR).arg(device->text()),
> 	QSystemTrayIcon::NoIcon,3000 );
> ====example end here
>
> see also:
> Use QString::arg() for Dynamic Text
> http://doc-snapshot.qt-project.org/4.8/internationalization.html#use-qstring-arg-for-dynamic-text
>
>
> regards,

I just fixed the pc-mounttray translation strings as well.
Let us know if you find any other examples!

-- 
~~ Ken Moore ~~
PC-BSD/iXsystems



More information about the Translations mailing list