Review Request: Add extraction scripts for translatable strings from Grantlee templates
Chusslove Illich
caslav.ilic at gmx.net
Sun Jan 23 16:56:21 GMT 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/6405/#review9687
-----------------------------------------------------------
/home/kde-devel/kdesvn/trunk/KDE/kdesdk/scripts/grantlee_strings_extractor.py
<http://svn.reviewboard.kde.org/r/6405/#comment10828>
What is the difference between _() and i18n()? The example shows one to be ordinary text and the other having a placeholder, but they should be synonyms.
Since _() is native Gettext convention, other synonyms in the same vein would be p_() for i18nc(), n_() for i18np(), and pn_() for i18ncp().
(Just to be sure, are translations fetched later really through KDE i18n calls? Only then should calls have i18n*() names.)
/home/kde-devel/kdesvn/trunk/KDE/kdesdk/scripts/grantlee_strings_extractor.py
<http://svn.reviewboard.kde.org/r/6405/#comment10829>
Is it guaranteed that the order of messages in the output file is exactly the same as the order in the template file?
/home/kde-devel/kdesvn/trunk/KDE/kdesdk/scripts/grantlee_strings_extractor.py
<http://svn.reviewboard.kde.org/r/6405/#comment10830>
The line number in the template file should also be recorded for each extracted message, so that this comment can be
// i18n: file: <filename>:<line>
/home/kde-devel/kdesvn/trunk/KDE/kdesdk/scripts/grantlee_strings_extractor.py
<http://svn.reviewboard.kde.org/r/6405/#comment10831>
This means that first the shell will glob the arguments, and then the script will glob for the second time? Now that's weird :)
- Chusslove
On Jan. 23, 2011, 1:24 p.m., Stephen Kelly wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/6405/
> -----------------------------------------------------------
>
> (Updated Jan. 23, 2011, 1:24 p.m.)
>
>
> Review request for kdelibs, Pino Toscano and Chusslove Illich.
>
>
> Summary
> -------
>
> The new scripts allow the kde i18n infrastructure to extract translatable strings from Grantlee templates.
>
> An additional line is needed in the Messages.sh script
>
>
> Diffs
> -----
>
> /home/kde-devel/kdesvn/trunk/KDE/kdesdk/scripts/grantlee_strings_extractor.py PRE-CREATION
>
> Diff: http://svn.reviewboard.kde.org/r/6405/diff
>
>
> Testing
> -------
>
> Works locally. The code in playground/pim/contacts can be used to test this with x-test once it's checked in.
>
>
> Thanks,
>
> Stephen
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110123/9fb01ea3/attachment.htm>
More information about the kde-core-devel
mailing list