ka-extension-ts
ka-extension-ts copied to clipboard
Support translations
In general, support for translations would be nice.
For notifications specifically, this will mostly be easy as the translations exist but are not being used as currently the API queries are always routed through the default domain: https://github.com/ka-extension/ka-extension-ts/blob/master/src/popup.ts#L231
I suggest using the current window URL (window.location.hostname
), some kind of setting or an API (getFullUserProfile/preferredKaLocale) to determine which domain of KA the user is on.
I would be willing to take this on and create a PR, but I'm unsure on how to determine the locale through the code (mostly because I'm unfamiliar with it still)
Awesome! No rush, it takes time and practice with this stuff.
I would lean toward just using the URL hostname for determining this, and getting data through that domain's API. e.g. for Spanish it's https://es.khanacademy.org/
This would require rewriting every API endpoint we use to support a dynamic hostname. I'd have to re-familiarize myself with those bits of code to review or perform any changes to them. Hopefully we abstracted things enough we won't have to change much.
~~I'll see about creating some priority labels and labeling all our issues so everyone knows what's high priority.~~ Actually nah, we'll just work on whatever comes up, though bugs are highest priority to fix first.