mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2025-12-27 21:49:59 +00:00
update extension api
This commit is contained in:
@@ -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