Skip to content
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

feat: add sync property #1388

Merged
merged 2 commits into from Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/index.js
Expand Up @@ -328,6 +328,9 @@ export default class VueI18n {
get postTranslation (): ?PostTranslationHandler { return this._postTranslation }
set postTranslation (handler: PostTranslationHandler): void { this._postTranslation = handler }

get sync (): boolean { return this._sync }
set sync (val: boolean): void { this._sync = val }

_getMessages (): LocaleMessages { return this._vm.messages }
_getDateTimeFormats (): DateTimeFormats { return this._vm.dateTimeFormats }
_getNumberFormats (): NumberFormats { return this._vm.numberFormats }
Expand Down
2 changes: 2 additions & 0 deletions types/index.d.ts
Expand Up @@ -174,6 +174,7 @@ export declare interface IVueI18n {
silentTranslationWarn: boolean | RegExp;
silentFallbackWarn: boolean | RegExp;
preserveDirectiveContent: boolean;
sync: boolean;
pluralizationRules: VueI18n.PluralizationRulesMap;
warnHtmlInMessage: VueI18n.WarnHtmlInMessageLevel;
postTranslation: VueI18n.PostTranslationHandler;
Expand Down Expand Up @@ -228,6 +229,7 @@ declare class VueI18n {
pluralizationRules: VueI18n.PluralizationRulesMap;
warnHtmlInMessage: VueI18n.WarnHtmlInMessageLevel;
postTranslation: VueI18n.PostTranslationHandler;
sync: boolean;

t(key: VueI18n.Path, values?: VueI18n.Values): VueI18n.TranslateResult;
t(key: VueI18n.Path, locale: VueI18n.Locale, values?: VueI18n.Values): VueI18n.TranslateResult;
Expand Down