Hi, I'm ready to release the next version of Grantlee, which is the first version with i18n features. The aim is to mark strings as translatable inside the template files instead of in C++. Before I release it I'd like to make sure it can fit into the KDE i18n infrastructure. The test case for that is very small - KJots has only one translatable string appearing in a template. Here's the patch I'd like to apply to kdepim: diff --git a/kjots/Messages.sh b/kjots/Messages.sh index 9c04534..8b6704e 100644 --- a/kjots/Messages.sh +++ b/kjots/Messages.sh @@ -1,3 +1,4 @@ #! /bin/sh $EXTRACTRC *.rc *.ui *.kcfg >> rc.cpp +$EXTRACT_TEMPLATE_STRINGS ts.cpp themes/default/*.html $XGETTEXT *.cpp -o $podir/kjots.pot diff --git a/kjots/kjotswidget.cpp b/kjots/kjotswidget.cpp index cba22d2..3355a3b 100644 --- a/kjots/kjotswidget.cpp +++ b/kjots/kjotswidget.cpp @@ -884,8 +884,6 @@ QString KJotsWidget::renderSelectionToHtml() } hash.insert( QLatin1String( "entities" ), objectList); - hash.insert( QLatin1String( "i18n_TABLE_OF_CONTENTS" ), - i18nc("Header for 'Table of contents' section of rendered output", "Table of contents") ); Context c(hash); Template t = m_templateEngine->loadByName( QLatin1String( "template.html" ) ); diff --git a/kjots/themes/default/booktemplate.html b/kjots/themes/default/booktemplate.html index f3e900b..4929509 100644 --- a/kjots/themes/default/booktemplate.html +++ b/kjots/themes/default/booktemplate.html @@ -1,7 +1,8 @@