mirror of
https://github.com/flarum/core.git
synced 2025-08-08 01:16:52 +02:00
Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
This commit is contained in:
31
js/dist-typings/common/Translator.d.ts
vendored
Normal file
31
js/dist-typings/common/Translator.d.ts
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
declare type Translations = Record<string, string>;
|
||||
declare type TranslatorParameters = Record<string, unknown>;
|
||||
export default class Translator {
|
||||
/**
|
||||
* A map of translation keys to their translated values.
|
||||
*/
|
||||
translations: Translations;
|
||||
/**
|
||||
* The underlying ICU MessageFormatter util.
|
||||
*/
|
||||
protected formatter: any;
|
||||
setLocale(locale: string): void;
|
||||
addTranslations(translations: Translations): void;
|
||||
/**
|
||||
* An extensible entrypoint for extenders to register type handlers for translations.
|
||||
*/
|
||||
protected formatterTypeHandlers(): {
|
||||
plural: any;
|
||||
select: any;
|
||||
};
|
||||
/**
|
||||
* A temporary system to preprocess parameters.
|
||||
* Should not be used by extensions.
|
||||
* TODO: An extender will be added in v1.x.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
protected preprocessParameters(parameters: TranslatorParameters): TranslatorParameters;
|
||||
trans(id: string, parameters?: TranslatorParameters): any;
|
||||
}
|
||||
export {};
|
Reference in New Issue
Block a user