labellife-design-tool 2.1.0 → 2.1.1

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.
@@ -168,11 +168,20 @@ function _unsupportedIterableToArray(r, a) {
168
168
  }
169
169
  }
170
170
 
171
- var translations = {};
171
+ // Use a window-level singleton so that all Rollup bundles (config, toolbar,
172
+ // side-panel, canvas) share the same translations object. Without this each
173
+ // bundle gets its own copy of this module with a separate local variable.
174
+ var GLOBAL_KEY = '__labellife_translations__';
175
+ if (typeof window !== 'undefined' && !window[GLOBAL_KEY]) {
176
+ window[GLOBAL_KEY] = {};
177
+ }
178
+ function _get() {
179
+ return typeof window !== 'undefined' && window[GLOBAL_KEY] || {};
180
+ }
172
181
  function t(key, defaultValue) {
173
182
  // Support dot-notation paths like 'toolbar.duration'
174
183
  var parts = key.split('.');
175
- var current = translations;
184
+ var current = _get();
176
185
  var _iterator = _createForOfIteratorHelper(parts),
177
186
  _step;
178
187
  try {