SID-01855: MAKETEXT arguments
I ran into an oddity with MAKETEXT that I'm not sure how to handle.
I have a string of the form "Something about [_1] [_2]", where_1 can be "Boston, Massachusetts". _1 is from an external data source.
If I generate MAKETEXT{ "Something about [_1]" args="Boston, Massachusetts, today"}, obviously the args will be misinterpreted.
How is this handled? Is the ',' quotable somehow? (Shouldn't the API for MAKETEXT be arg1="string" arg2="string", ...?)
I had a similar issue with substituting a (span -title="...") (a href="...") (/a) stuff (/span).
The better-than-nothing approach is to concatenate MAKETEXT --, but obviously while that flags translations, it doesn't make them easy. One should be able to interpolate...
--
Timothe Litt - 2014-01-13
Discussion and Answer
I agree, the parameter API is strange and not so useful.
Using the current spec, you need to entity-escape the commas if you get arguments that may contain commas. That is, escape comma with
,
.
--
Peter Thoeny - 2014-01-13
On double quotes in arguments, you need to escape them with backslash, or replace by single quotes.
--
Peter Thoeny - 2014-01-13
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.