@mongosh/i18n
Advanced tools
Comparing version 2.2.1 to 2.2.2
@@ -7,3 +7,2 @@ "use strict"; | ||
const errors_1 = require("@mongosh/errors"); | ||
const mustache_1 = __importDefault(require("mustache")); | ||
const de_DE_1 = __importDefault(require("./locales/de_DE")); | ||
@@ -16,3 +15,2 @@ const en_US_1 = __importDefault(require("./locales/en_US")); | ||
}; | ||
const TEMPLATE = '{{description}}\n\n' + '{{link}}\n\n' + '{{example}}\n\n' + '{{returns}}'; | ||
class Translator { | ||
@@ -56,3 +54,4 @@ __(key) { | ||
} | ||
return mustache_1.default.render(TEMPLATE, value); | ||
const { description = '', link = '', example = '', returns = '' } = value; | ||
return `${description}\n\n${link}\n\n${example}\n\n${returns}`; | ||
} | ||
@@ -59,0 +58,0 @@ find(key) { |
{ | ||
"name": "@mongosh/i18n", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "MongoDB Shell i18n Project", | ||
@@ -39,10 +39,8 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@mongosh/errors": "2.2.1", | ||
"mustache": "^4.0.0" | ||
"@mongosh/errors": "2.2.2" | ||
}, | ||
"devDependencies": { | ||
"@mongodb-js/eslint-config-mongosh": "2.2.1", | ||
"@mongodb-js/eslint-config-mongosh": "2.2.2", | ||
"@mongodb-js/prettier-config-devtools": "^1.0.1", | ||
"@mongodb-js/tsconfig-mongosh": "2.2.1", | ||
"@types/mustache": "^4.0.1", | ||
"@mongodb-js/tsconfig-mongosh": "2.2.2", | ||
"depcheck": "^1.4.3", | ||
@@ -52,3 +50,3 @@ "eslint": "^7.25.0", | ||
}, | ||
"gitHead": "bb1ce6b92296686285b46d95cf1b62a2e4230376" | ||
"gitHead": "2b16a0e22e8e2bb6d40278f108e1da452c68c89a" | ||
} |
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
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
1
6
221962
2532
+ Added@mongosh/errors@2.2.2(transitive)
- Removedmustache@^4.0.0
- Removed@mongosh/errors@2.2.1(transitive)
- Removedmustache@4.2.0(transitive)
Updated@mongosh/errors@2.2.2