praveenshirali / pseudolocalization-tool

Automatically exported from code.google.com/p/pseudolocalization-tool
Apache License 2.0
0 stars 0 forks source link

Is there any escape chars available if I want selective text (e.g. Placeholder) not to be psesudolocalized #6

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. psesudolocalize " Hi I don't want this {place_holder} to be psesudolocalized 
"
2.
3.

What is the expected output? What do you see instead?

The Original text :Hi I don't want this {place_holder} to be psesudolocalized 
The Modified text by psaccent 
:[?î?Î?ðöñ´???åñ????îš?(þ?åçé??ö?ðé?)??ö??é?þšéšûðö?ö
çå?îžéð? one two three four five six seven]
The Modified text by psbidi :?Hi? ?I? ?don?'?t? ?want? ?this? 
{?place?_?holder?} ?to? ?be? ?psesudolocalized? 

Expected output:: 

?Hi? ?I? ?don?'?t? ?want? ?this? {place_holder} ?to? ?be? ?psesudolocalized? 

What version of the product are you using? On what operating system?

Latest

Please provide any additional information below.

Original issue reported on code.google.com by ravindra...@gmail.com on 10 Oct 2013 at 5:37

GoogleCodeExporter commented 8 years ago
What is the actual format of the messages?  Are they Java MessageFormat 
messages?  If so, the .properties format handler knows how to parse the 
placeholders inside {} (though it doesn't handle quoting - see 
https://code.google.com/p/pseudolocalization-tool/source/browse/trunk/java/com/g
oogle/i18n/pseudolocalization/format/JavaProperties.java#L41 ).  You can force 
this format with --type=properties on the command line.  

If it isn't actually a Java properties file or if the messages aren't 
MessageFormat-syntax, it would be easy to write your own format like 
JavaProperties -- just have a static initializer register the format and 
reference your custom class in a --ext flag.

If you want to write a new format and submit it, I would be happy to review it 
-- just use JavaProperties as an example.  Alternatively, if it is a standard 
format that isn't too complicated I would be happy to write it.

Finally, if this is integrated into some localization process, you could use 
the Message API and mark that text as non-localizable.

Original comment by jat@jaet.org on 13 Oct 2013 at 5:34