mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-12-06 10:34:13 +00:00
update extension api
This commit is contained in:
1 parent
f13d8c1e22
commit
467cb2e589
3 files changed
+50
-8
No files matched your search
@@ -14,7 +14,7 @@ class Locale {
|
||||
private _isLoadingInitial = $state(true);
|
||||
private _isLoading = $state(true);
|
||||
private dictionary: Dictionary = $state({});
|
||||
private _t = $derived((key: string) => {
|
||||
private _t = $derived((key: string, fallback?: string) => {
|
||||
const keys = key.split('.');
|
||||
let value: string | Dictionary = this.dictionary;
|
||||
|
||||
@@ -22,7 +22,7 @@ class Locale {
|
||||
if (value && typeof value === 'object' && k in value) {
|
||||
value = value[k];
|
||||
} else {
|
||||
return key;
|
||||
return fallback || key;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user