-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Entity Language Type is incorrect #107
Comments
Maybe something like this? /** Language code like de, en, fr but not de-ch */
type WmLanguageCode = typeof languages[number] // generated by script
/** Language variant like de-ch */
type WmLanguageVariant = string // not sure if that's something possible to be scripted
/** Language codes and language variants like de, de-ch, en, fr */
type WmLanguage = WmLanguageCode | WmLanguageVariant // something | string will be simplified to be string currently but its still better to use internally to understand what kind of string it is Interestingly there is wikibase-sdk/src/utils/utils.ts Lines 3 to 7 in 2f62520
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently the Entity Type for labels, description, aliases and so on is
Record<WmLanguageCode, …>
.WmLanguageCode
is onlyde
but not something likede-ch
which is also there.Not sure how to model all the possible variations there or just to use
string
ortype LanguageCode = string
to help with code reading?The text was updated successfully, but these errors were encountered: