Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quotes and number parsing for each language/locale #12

Open
tdulcet opened this issue Nov 29, 2020 · 1 comment
Open

Quotes and number parsing for each language/locale #12

tdulcet opened this issue Nov 29, 2020 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed i18n/l10n internationalisation & localisation

Comments

@tdulcet
Copy link
Collaborator

tdulcet commented Nov 29, 2020

Background

The “Use Unicode smart quotes” option currently just uses the English smart quotes. The “Convert fractions and mathematical constants to Unicode characters” option currently only accepts the period for the decimal point and it does not support numbers with thousand separators, such as 1234.25. This is mainly because that is all the parseFloat() function supports (see here).

Proposed solution

For the “Use Unicode smart quotes” option, @rugk suggested that it use the quotes for each language/locale in rugk/awesome-emoji-picker#93 (review). See here for a table of the quotes for different languages. I would need to know which quote character(s) are on the keyboards for each locale and which smart quote character(s) it should automatically replace (autocorrect) them with.

For the “Convert fractions and mathematical constants to Unicode characters” option, I propose that it support locale formatted numbers, with the locale decimal point and thousand separators. For example, some locales write numbers like 1,234.25, while others would write the same number as 1.234,25.

@tdulcet tdulcet added enhancement New feature or request help wanted Extra attention is needed i18n/l10n internationalisation & localisation labels Nov 29, 2020
@rugk
Copy link
Owner

rugk commented Nov 29, 2020

parseFloat seems indeed problematic. While JS does have localized versions for string comparison and number generation it seems to have no built-in way for localized number parsing.

@rugk rugk changed the title Use the quotes and support the numbers for each language/locale Quotes and number parsing for each language/locale Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed i18n/l10n internationalisation & localisation
Projects
None yet
Development

No branches or pull requests

2 participants