@energy8platform/shell 0.6.3 → 0.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/html.cjs.js CHANGED
@@ -1220,12 +1220,19 @@ function normalizeLang(code) {
1220
1220
  return (LANG_SET.has(base) ? base : 'en');
1221
1221
  }
1222
1222
  function createI18n(opts) {
1223
- // Social is the `en-social` pseudo-locale: it rewrites the English source. Non-English locales are
1224
- // authored social-safe already, so `socialize` only runs on the English source string.
1223
+ // Social is the `en-social` pseudo-locale: it rewrites the English source into social-safe
1224
+ // vocabulary. The replacement dictionary only exists for English, so social mode FORCES English
1225
+ // the requested `language` is ignored, matching the `isSocial` contract ("…derived from English…
1226
+ // regardless of `language`"). Rendering a non-English locale in social mode would leak untranslated
1227
+ // restricted terms, so we never do it.
1228
+ if (opts.isSocial) {
1229
+ const t = (src) => socialize(src);
1230
+ return { lang: 'en', t };
1231
+ }
1225
1232
  const lang = normalizeLang(opts.language);
1226
1233
  const t = (src) => {
1227
1234
  if (lang === 'en')
1228
- return opts.isSocial ? socialize(src) : src;
1235
+ return src;
1229
1236
  return opts.messages?.[lang]?.[src] ?? LOCALES[lang]?.[src] ?? src;
1230
1237
  };
1231
1238
  return { lang, t };
@@ -1448,7 +1455,7 @@ class KeyboardController {
1448
1455
 
1449
1456
  // AUTO-GENERATED by scripts/gen-version.mjs — do not edit. Mirrors package.json "version".
1450
1457
  /** The @energy8platform/shell package version, stamped into the game-info footer. */
1451
- const PACKAGE_VERSION = '0.6.3';
1458
+ const PACKAGE_VERSION = '0.6.4';
1452
1459
 
1453
1460
  /** Apply defaults to the raw config (the mount target lives on the renderer, not here). */
1454
1461
  function resolveConfig(config) {