Quote usage in gettexted WML
Hello Debian-WWW,
The files english/template/debian/{stat_tags,legal}.wml contain
constructs like:
<: printf '<gettext domain="stats">...</gettext>', %0 :>
Note the single quotation marks ('). This causes breakage when the
translated string also contains single quotation marks. I recently
encountered this when trying to enable the Dutch translation for
devel/website/stats. I think the right solutions is to simply replace
the single quotation marks with double quotation marks.
I have attached a patch that does this. I can commit it myself if
there are no objections to it, but would be more confident if a
regular committer would do this.
An alternative would be to use the Unicode 'Punctuation apostrophe'
(U+2019) in gettext strings and add a warning to these strings that
the ASCII apostrophe should not be used.
Regards,
--
Jeroen Schot
Index: english/template/debian/legal.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/legal.wml,v
retrieving revision 1.13
diff -u -r1.13 legal.wml
--- english/template/debian/legal.wml 16 Aug 2008 12:25:43 -0000 1.13
+++ english/template/debian/legal.wml 16 Aug 2011 15:32:04 -0000
@@ -46,10 +46,10 @@
<h1>\
<ifeq "<license-version/>" ""
# title string without version, on the form "dls-xxx - license name: status"
-"<: printf( '<gettext domain="legal">%s – %s: %s</gettext>',
+"<: printf( "<gettext domain="legal">%s – %s: %s</gettext>",
'<pagetitle/>', '<license-name/>', '<dls-result isfree="<isfree>"/>' ) :>"
# title string with version, on the form "dls-xxx - license name, version: status"
-"<: printf( '<gettext domain="legal">%s – %s, Version %s: %s</gettext>',
+"<: printf( "<gettext domain="legal">%s – %s, Version %s: %s</gettext>",
'<pagetitle/>', '<license-name/>', '<license-version/>', '<dls-result isfree="<isfree>"/>' ) :>" />\
</h1>
Index: english/template/debian/stats_tags.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/stats_tags.wml,v
retrieving revision 1.1
diff -u -r1.1 stats_tags.wml
--- english/template/debian/stats_tags.wml 9 Mar 2011 22:19:22 -0000 1.1
+++ english/template/debian/stats_tags.wml 16 Aug 2011 15:32:04 -0000
@@ -7,15 +7,15 @@
</define-tag>
<define-tag stats_pages whitespace="delete">
-<: printf '<gettext domain="stats">There are %d pages to translate.</gettext>', %0 :>
+<: printf "<gettext domain="stats">There are %d pages to translate.</gettext>", %0 :>
</define-tag>
<define-tag stats_bytes whitespace="delete">
-<: printf '<gettext domain="stats">There are %d bytes to translate.</gettext>', %0 :>
+<: printf "<gettext domain="stats">There are %d bytes to translate.</gettext>", %0 :>
</define-tag>
<define-tag stats_strings whitespace="delete">
-<: printf '<gettext domain="stats">There are %d strings to translate.</gettext>', %0 :>
+<: printf "<gettext domain="stats">There are %d strings to translate.</gettext>", %0 :>
</define-tag>
Reply to: