@jupyterlab/translation
Advanced tools
Comparing version 3.0.9 to 3.0.10
@@ -16,2 +16,5 @@ /** | ||
* Example: "jupyterlab", "jupyterlab_git" | ||
* | ||
* #### Note | ||
* Normalization replaces `-` by `_` in package name. | ||
*/ | ||
@@ -54,2 +57,5 @@ domain: string; | ||
* Example: "jupyterlab", "jupyterlab_git" | ||
* | ||
* #### Note | ||
* Normalization replaces `-` by `_` in package name. | ||
*/ | ||
@@ -56,0 +62,0 @@ domain?: string; |
@@ -15,2 +15,3 @@ /* ---------------------------------------------------------------------------- | ||
|----------------------------------------------------------------------------*/ | ||
import { normalizeDomain } from './utils'; | ||
/** | ||
@@ -34,3 +35,3 @@ * Gettext class providing localization methods. | ||
this._locale = (options.locale || this._defaults.locale).replace('_', '-'); | ||
this._domain = options.domain || this._defaults.domain; | ||
this._domain = normalizeDomain(options.domain || this._defaults.domain); | ||
this._contextDelimiter = | ||
@@ -88,3 +89,3 @@ options.contextDelimiter || this._defaults.contextDelimiter; | ||
setDomain(domain) { | ||
this._domain = domain; | ||
this._domain = normalizeDomain(domain); | ||
} | ||
@@ -149,2 +150,3 @@ /** | ||
} | ||
domain = normalizeDomain(domain); | ||
let headers = jsonData['']; | ||
@@ -286,3 +288,3 @@ let jsonDataCopy = JSON.parse(JSON.stringify(jsonData)); | ||
dcnpgettext(domain, msgctxt, msgid, msgid_plural, n, ...args) { | ||
domain = domain || this._domain; | ||
domain = normalizeDomain(domain) || this._domain; | ||
let translation; | ||
@@ -438,2 +440,3 @@ let key = msgctxt | ||
setMessages(domain, locale, messages, pluralForms) { | ||
domain = normalizeDomain(domain); | ||
if (pluralForms) | ||
@@ -440,0 +443,0 @@ this._pluralForms[locale] = pluralForms; |
@@ -5,2 +5,3 @@ // Copyright (c) Jupyter Development Team. | ||
import { TranslatorConnector } from './tokens'; | ||
import { normalizeDomain } from './utils'; | ||
/** | ||
@@ -43,2 +44,3 @@ * Translation Manager | ||
else { | ||
domain = normalizeDomain(domain); | ||
if (!(domain in this._translationBundles)) { | ||
@@ -45,0 +47,0 @@ let translationBundle = new Gettext({ |
{ | ||
"name": "@jupyterlab/translation", | ||
"version": "3.0.9", | ||
"version": "3.0.10", | ||
"description": "JupyterLab - Translation services", | ||
@@ -44,9 +44,9 @@ "keywords": [ | ||
"dependencies": { | ||
"@jupyterlab/coreutils": "^5.0.6", | ||
"@jupyterlab/services": "^6.0.9", | ||
"@jupyterlab/statedb": "^3.0.6", | ||
"@jupyterlab/coreutils": "^5.0.7", | ||
"@jupyterlab/services": "^6.0.10", | ||
"@jupyterlab/statedb": "^3.0.7", | ||
"@lumino/coreutils": "^1.5.3" | ||
}, | ||
"devDependencies": { | ||
"@jupyterlab/testutils": "^3.0.11", | ||
"@jupyterlab/testutils": "^3.0.12", | ||
"@types/jest": "^26.0.10", | ||
@@ -60,3 +60,3 @@ "jest": "^26.4.2", | ||
}, | ||
"gitHead": "6e4b14879f5d6995a6134aa493676694e37c589e" | ||
"gitHead": "4e5af054ad5d5b82a8618316039429eb45df9955" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
55523
24
1071
240
4
7
1
47
68203
1
Updated@jupyterlab/coreutils@^5.0.7
Updated@jupyterlab/services@^6.0.10
Updated@jupyterlab/statedb@^3.0.7