diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 12:38:34 -0300 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-09-07 12:38:34 -0300 |
commit | eb00f2993a1aaaba171ad6c918656552f80bb748 (patch) | |
tree | 5e61200ed707e02b76c337cb9107aa5f1eaa8898 /src/data/things/language.js | |
parent | 6889c764caef5542ba9ad8362acf6e8b7b879ea9 (diff) |
data: import Thing.common utilities directly
Also rename 'color' (from #cli) to 'colors'.
Diffstat (limited to 'src/data/things/language.js')
-rw-r--r-- | src/data/things/language.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/data/things/language.js b/src/data/things/language.js index 0638afa..c98495d 100644 --- a/src/data/things/language.js +++ b/src/data/things/language.js @@ -1,6 +1,10 @@ import {isLanguageCode} from '#validators'; -import Thing from './thing.js'; +import Thing, { + externalFunction, + flag, + simpleString, +} from './thing.js'; export class Language extends Thing { static [Thing.getPropertyDescriptors] = () => ({ @@ -16,7 +20,7 @@ export class Language extends Thing { // Human-readable name. This should be the language's own native name, not // localized to any other language. - name: Thing.common.simpleString(), + name: simpleString(), // Language code specific to JavaScript's Internationalization (Intl) API. // Usually this will be the same as the language's general code, but it @@ -38,7 +42,7 @@ export class Language extends Thing { // with languages that are currently in development and not ready for // formal release, or which are just kept hidden as "experimental zones" // for wiki development or content testing. - hidden: Thing.common.flag(false), + hidden: flag(false), // Mapping of translation keys to values (strings). Generally, don't // access this object directly - use methods instead. @@ -66,7 +70,7 @@ export class Language extends Thing { // Update only - escapeHTML: Thing.common.externalFunction(), + escapeHTML: externalFunction(), // Expose only |