mdn / yari

The platform code behind MDN Web Docs
Mozilla Public License 2.0
1.16k stars 486 forks source link

[Suggestion] 'Locale' values would be better to be managed as a type. #11322

Closed C17AN closed 1 week ago

C17AN commented 2 weeks ago

Summary

The locale properties used in the project are of the string type, and it would be nice if they were managed more strictly with the Locale type.

Anything else?

First of all, I think this could be a breaking change, so I started by fixing one small type.

If there is a reason for using the string type considering future scalability, etc., you can reject this PR. :)

Or If you think this proposal is okay, I'll fix the parts that are considered to have less impact to the Locale type.

Validations

caugner commented 1 week ago

Fixed via https://github.com/mdn/yari/pull/11323.