Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dile/editor

Package Overview
Dependencies
Maintainers
0
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dile/editor - npm Package Compare versions

Comparing version 2.4.8 to 2.4.9

4

package.json
{
"name": "@dile/editor",
"version": "2.4.8",
"version": "2.4.9",
"description": "Webcomponent to create a user editor interface, configured on various ways",

@@ -44,3 +44,3 @@ "keywords": [

},
"gitHead": "8665bccc5f2c06da590d20a3bfd2f7b4c0a7638c"
"gitHead": "f833a589b4bf56c3a1b46e40d3c5ce364b0facca"
}

@@ -1,15 +0,27 @@

import {TranslationService as OriginalTranslationService} from '@dile/ui/mixins/i18n/TranslationService.js';
import { TranslationService as OriginalTranslationService } from '@dile/ui/mixins/i18n/TranslationService.js';
const translations = import.meta.glob('./i18n/*.js', { eager: true });
class TranslationService extends OriginalTranslationService {
async importLanguage(language) {
const module = await import(`./i18n/${language}.js`);
return module;
const importPath = `./i18n/${language}.js`;
if (translations[importPath]) {
return translations[importPath];
} else {
throw new Error(`Translation file for language "${language}" not found.`);
}
}
async importFallback() {
const defaultModule = await import('./i18n/en.js');
return defaultModule;
const fallbackPath = './i18n/en.js';
if (translations[fallbackPath]) {
return translations[fallbackPath];
} else {
throw new Error('Fallback translation file not found.');
}
}
}
export const translationService = new TranslationService();
export const translationService = new TranslationService();
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc