File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
packages/runtime-core/src Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -44,17 +44,25 @@ export abstract class BaseTranslator<T extends { [key: string]: unknown } = { [k
4444 protected currentDocumentLanguage : Language | null ;
4545 protected fallbackLanguage : Language ;
4646 protected handleLanguageChange : LanguageChangeHandler | null ;
47- public isInitialized : boolean ;
4847 protected translations : T ;
48+ #isInitialized: boolean ;
4949
5050 constructor ( { fallbackLanguage, translations } : TranslatorOptions < T > ) {
5151 this . currentDocumentLanguage = null ;
5252 this . fallbackLanguage = fallbackLanguage ?? 'en' ;
5353 this . handleLanguageChange = null ;
54- this . isInitialized = false ;
54+ this . # isInitialized = false ;
5555 this . translations = translations ;
5656 }
5757
58+ get isInitialized ( ) {
59+ return this . #isInitialized;
60+ }
61+
62+ protected set isInitialized ( value : boolean ) {
63+ this . #isInitialized = value ;
64+ }
65+
5866 @InitializedOnly
5967 set onLanguageChange ( handler : LanguageChangeHandler ) {
6068 this . handleLanguageChange = handler ;
You can’t perform that action at this time.
0 commit comments