-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add number remapping feature #17
Comments
@jliliamen You weird Maghrebis 😁, didn't know this was an issue for some people but I too find the Arabic numerals easier than the Eastern Indian ones so it's definitely something I would use myself as well (just didn't know I wanted it until now 😂). |
I've pushed this to the next update, it's definitely useful but it's controversial as it is actually changing the text of the page and not just the styling of the text. |
Thanks! |
BTW, they are not called eastern Arabic numerals :) |
@jliliamen no? Wikipedia says so although they also have like 5 other names too, confusion! |
While this is controversial because it's changing the text of the page, I have come to realize that it's still useful as an accessibility feature. Which in the end, Wudooh is an accessibility tool first and foremost! So, we should probably implement this as a full numeral remapper for all Arabic Script locales.
Urdu uses the same characters as Persian but is supposed to be rendered differently somehow, 4 should look different completely and 6 is identical in appearance to the East Arabic number 6. This is achieved by changing the HTML tag's So in summary, Arabic, East Arabic and Persian all use their own unique character codes, even when they look identical! ١ !== ۱ even though they look identical, this is similar to how Unicode represents Arabic ى differently from Persian ی but with the numbers it's for different less obvious reasons, since with the letters it has to do with their intermediate and ending forms being actually different. With Urdu though it uses the exact same numbers as Persian but the browser renders it differently if told it is in that language, otherwise the default is the Persian form. Edit: certain fonts like This adds some complications because it means we need to add the Anyway, I'm just noting some implementation details for when we do implement this in another update because it's a bit more complicated if we choose to properly truly pursue this which I am now choosing to do because of its use as an accessibility feature. |
Can you make sure there is a toggle button for this feature. Thoughts? |
@jliliamen Yeah I was thinking of a HTML select (like the font select) where the user would pick what kind of numbers they'd like to see, with one of the options being Original (no change).
Something along those lines |
This might not be exactly a core feature but I think it is an excellent add-on. Almost all Maghreb readers, myself included, find it difficult to understand the Farsi numbering system used by our middle eastern cousins.
A feature that would re-render those numbers on the screen as Arab numerals would be awesome.
I could see the code traversing the dom structure, getting the inner text and maybe perform a simple replace regex but I'm not sure if that is the best approach as it actually changes the source code the page.
I would deem this as low priority.
The text was updated successfully, but these errors were encountered: