[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: Help with KAccounts i18n
From:       Caslav Ilic <caslav.ilic () gmx ! net>
Date:       2014-10-15 22:48:34
Message-ID: 201410160048.37793.caslav.ilic () gmx ! net
[Download RAW message or body]


>> [: Martin Klapetek :]
>> So the code in the kcm then looks something like
>>
>>   i18nd(Accounts::Service::trCatalog(), Accoutns::Service::description());
>>
>> ...where Accounts::Service is the convenience class for that xml.
>
> [: Albert Astals Cid :]
> Yes, i hope Accounts::Service is doing something useful with those
> strings, otherwise it's just making your like hard :D
>
> Now I am not sure you should use i18nd, you should just probably use
> dgettext directly. Chusslove?

Either way should be fine. (i18n in KDE 4 would also interpret XML-looking
things in the string, but in KF 5 only xi18n does that.) Maybe i18nd is a
bit easier, because it will directly return QString. Also, both i18nd and
dgettext expect const char*, so .toUtf8() is needed to those arguments.

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic