Story 3.2 done
This commit is contained in:
@@ -145,6 +145,22 @@ export class FoundryAdapter {
|
||||
return false;
|
||||
},
|
||||
};
|
||||
|
||||
/** i18n surface — wraps game.i18n for localization. */
|
||||
this.i18n = {
|
||||
/**
|
||||
* Localize a string using the module's translation keys.
|
||||
* @param {string} key - The translation key (e.g., 'video-view-manager.notifications.gmHid')
|
||||
* @param {object} [data] - Optional data for string interpolation
|
||||
* @returns {string} The localized string
|
||||
*/
|
||||
localize: (key, data) => {
|
||||
if (g.i18n && typeof g.i18n.localize === 'function') {
|
||||
return g.i18n.localize(key, data);
|
||||
}
|
||||
return key; // Fallback: return the key if i18n not available
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user