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

Deprecate currency information in locale #3269

Closed
atjn opened this issue Mar 16, 2024 · 1 comment · Fixed by #3278, espruino/EspruinoDocs#721 or espruino/Espruino#2476
Closed

Deprecate currency information in locale #3269

atjn opened this issue Mar 16, 2024 · 1 comment · Fixed by #3278, espruino/EspruinoDocs#721 or espruino/Espruino#2476

Comments

@atjn
Copy link
Contributor

atjn commented Mar 16, 2024

The locale app gives the name of the currency that is most commonly used in that locale. I suggest removing that information because I don't think it is useful. If you need to show a price in a local currency, you need to know what the local currency is, but also what the conversion is between your currency and the local currency. If you don't have both, none of them is useful. To get the conversion rate, you need to connect to some online service, and if you can do that, it should be simple to also get the local currency for at given locale.

My argument that it is not useful seems to be confirmed by the fact that no apps in this repository uses the currency information.

The reason I care about this, is because in #3268 I propose that you move to use the CLDR dataset for locales, but CLDR does not provide information about which currency each locale uses. Therefore to get that information, you need to import a different dataset and I could not find any industry standard datasets like CLDR, so it is a somewhat questionable source. If this information isn't useful anyways, I think it is best to remove it.

If you agree, I would propose that we redesign the module such that if you query the currency information, it will always return GBP and will log a warning that currency information is no longer supported.

@gfwilliams
Copy link
Member

Yes, I think that's a good plan. I never really liked having currency in there anyway. The docs on locale in EspruinoDocs and the default implementation in Espruino would need changing too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants