pseudo-localization icon indicating copy to clipboard operation
pseudo-localization copied to clipboard

Optional number elongation

Open jopdeklein opened this issue 6 years ago • 5 comments

Fix #15.

For now I decided to only elongate even numbers to avoid elongating the numbers too much, it might make sense to review this later. Our main use case is currencies, but also to exercise the UI with longer numbers like the amount of reviews, for example.

jopdeklein avatar Feb 19 '19 14:02 jopdeklein

Hey! I did a quite significant refactoring of the internals so you probably have some conflicts. Sorry for the bother :)

tryggvigy avatar Feb 20 '19 02:02 tryggvigy

Hey! I did a quite significant refactoring of the internals so you probably have some conflicts. Sorry for the bother :)

Heyla, if you agree with the concepts in the PR I don't mind fixing the conflicts sometime soon :)

jopdeklein avatar Feb 20 '19 09:02 jopdeklein

It's an interesting idea. I'd love to explore the implications a bit further!

If some input value is being kept in sync in the DOM and JavaScript I'm not sure how this would affect that. For example in React it's common to use controlled inputs

tryggvigy avatar Feb 21 '19 18:02 tryggvigy

I rebased and noticed that 2 does not get superscripted image

The glyphs in strings of numbers are not as diverse as in text on average. 100, 100.000, 2019, etc will be more common. Doubling the even numbers is a good start but I'm worried about bias towards too much elongation (more than the ~30% on average we have for text) on average. Especially due to zero being common. I'm wondering if there are better numbers to pick based on frequency analysis of digits in a huge corpora of English text, like wikipedia for example.

Anyway, I like the idea of opt-in elongation of numbers. Superscript seems fine but have you explored any other options for glyphs to use in the pseudo language for numbers?

tryggvigy avatar Feb 27 '19 21:02 tryggvigy

I rebased and noticed that 2 does not get superscripted image

The glyphs in strings of numbers are not as diverse as in text on average. 100, 100.000, 2019, etc will be more common. Doubling the even numbers is a good start but I'm worried about bias towards too much elongation (more than the ~30% on average we have for text) on average. Especially due to zero being common. I'm wondering if there are better numbers to pick based on frequency analysis of digits in a huge corpora of English text, like wikipedia for example.

Anyway, I like the idea of opt-in elongation of numbers. Superscript seems fine but have you explored any other options for glyphs to use in the pseudo language for numbers?

I agree that the current approach is rather naive, I can do some research at a later stage for the numbers - it would really depend on what kind of numbers we're dealing with to exercise the UI (I assume for Spotify, play counts will have a much wider range than a number of seconds, for instance - the same for our use case of review count vs distance from a certain place in km's).

As mentioned, since our use case currencies are the most urgent, I think it's best if we approach those separately. It should be easier to get a more realistic average elongation based on USD or EUR for example.

I'll look into a separate concept based on this branch for currencies and come back to a more realistic number example later based on our usage.

jopdeklein avatar Feb 28 '19 12:02 jopdeklein