csiden / pseudolocalization-tool

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

Digits? #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What about supporting digits here?

AFAIK this is also used on Android zz_ZZ and AFAICS there is not accented 
digits or something like that but it is needed IMO. Native digits generally are 
generated via String.format() on Android.

Original issue reported on code.google.com by ebrami...@gmail.com on 15 Feb 2014 at 8:32

GoogleCodeExporter commented 8 years ago
Not sure what you mean by "supporting digits", or in which pseudolocalization 
method.

If you are talking about the "accenter" method, I guess it is possible to map 
ASCII digits to U+FF10 - U+FF19 or to U+1D7D8 - U+1D7E1, but I don't see how it 
is really important.

If you are talking about the "fakebidi" method, then the idea there is to 
produce text that behaves like RTL text but remains readable to 
Latin-script-only users. Thus retaining ASCII digit numbers without alteration 
is perfectly fine, since all Hebrew and much Arabic text uses ASCII digits, 
while mapping the ASCII digits to native Arabic or Farsi digits is unacceptable 
because Latin-only users would not be able to read them.

Original comment by aha...@google.com on 17 Mar 2014 at 2:29

GoogleCodeExporter commented 8 years ago
Originally we tried substituting other Unicode digits that would remain 
readable but be clearly marked as having gone through the translation system.  
However, there were two problems:
1) we couldn't find a set of such characters that worked cross-platform
2) most digits aren't in translated strings anyway, but are generated by number 
formatters that exist outside the translation system.  So, supporting it in 
pseudolocalization-tool would not be enough -- you would also have to modify 
those libraries.  For example, in GWT it is possible to create new resources 
describing what digit characters to use for a pseudolocale, but that is outside 
the scope of this library.

If you have a suggestion for #1 above that is cross-platform now, then please 
suggest them.  There isn't anything we can do for #2 other than to provide 
documentation for how to do it in various environments.

Original comment by jat@jaet.org on 17 Mar 2014 at 2:39

GoogleCodeExporter commented 8 years ago
Actually, looking at 
https://code.google.com/p/pseudolocalization-tool/source/browse/trunk/java/com/g
oogle/i18n/pseudolocalization/methods/Accenter.java now, it seems that it does 
map the ASCII digits to the circled ones. Doesn't it?

Original comment by aha...@google.com on 17 Mar 2014 at 2:45

GoogleCodeExporter commented 8 years ago
Hmm, yes it does.  I thought I had reverted that because some browsers didn't 
support them.

So, I think all we can do here is to document how to get number formatters to 
use these digits in various environments.  I can write that up for GWT, but I 
don't know how to do it in JVM or Android applications.

Original comment by jat@jaet.org on 17 Mar 2014 at 2:50

GoogleCodeExporter commented 8 years ago
I didn't describe my suggestion well, I guess this would
Steps to reproduce:
1. Enable Android's developer menu
2. Choose zz_ZZ language
What I see actually?
I see on every Android related menu every string is accented but numbers not

What I like to see?
As an developer I also should check if numbers are localized and formatted 
correctly.

How about Zalgofying them? http://eeemo.net/ or using Arabic or Indic 
diacritics?

Sorry if this was actually an Android bug and not related here. Please move it 
to related if is accepted.

Original comment by ebrami...@gmail.com on 17 Mar 2014 at 2:56

GoogleCodeExporter commented 8 years ago
@aharon - do you know if Android is using this library for zz_ZZ?  I'm guessing 
not if the numbers are behaving differently.

Original comment by jat@jaet.org on 17 Mar 2014 at 3:07