@nextcloud/l10n
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -5,2 +5,14 @@ # Changelog | ||
## 2.0.1 - 2023-01-19 | ||
[Full Changelog](https://github.com/nextcloud/nextcloud-l10n/compare/v2.0.0...v2.0.1) | ||
### Fixed | ||
- fix\(config\): fix npmignore config [\#563](https://github.com/nextcloud/nextcloud-l10n/pull/563) ([skjnldsv](https://github.com/skjnldsv)) | ||
- fix\(config\): fix tsconfig out dir typings [\#562](https://github.com/nextcloud/nextcloud-l10n/pull/562) ([skjnldsv](https://github.com/skjnldsv)) | ||
- Fix standalone registration [\#556](https://github.com/nextcloud/nextcloud-l10n/pull/556) ([ShGKme](https://github.com/ShGKme)) | ||
### Changed | ||
- Dependency updates | ||
## 2.0.0 - 2023-01-12 | ||
@@ -7,0 +19,0 @@ |
@@ -26,2 +26,8 @@ 'use strict'; | ||
function registerAppTranslations(appId, translations, pluralFunction) { | ||
if (window._oc_l10n_registry_translations === undefined) { | ||
window._oc_l10n_registry_translations = {}; | ||
} | ||
if (window._oc_l10n_registry_plural_functions === undefined) { | ||
window._oc_l10n_registry_plural_functions = {}; | ||
} | ||
if (!hasAppTranslations(appId)) { | ||
@@ -50,13 +56,10 @@ setAppTranslations(appId, translations, pluralFunction); | ||
function getAppTranslations(appId) { | ||
if (typeof window._oc_l10n_registry_translations === 'undefined' | ||
|| typeof window._oc_l10n_registry_plural_functions === 'undefined') { | ||
console.warn('No OC L10N registry found'); | ||
return { | ||
translations: {}, | ||
pluralFunction: (number) => number, | ||
}; | ||
var _a, _b, _c, _d, _e, _f; | ||
if (typeof ((_a = window._oc_l10n_registry_translations) === null || _a === void 0 ? void 0 : _a[appId]) === 'undefined' | ||
|| typeof ((_b = window._oc_l10n_registry_plural_functions) === null || _b === void 0 ? void 0 : _b[appId]) === 'undefined') { | ||
console.warn(`No translation for appId "${appId}" have been registered`); | ||
} | ||
return { | ||
translations: window._oc_l10n_registry_translations[appId] || {}, | ||
pluralFunction: window._oc_l10n_registry_plural_functions[appId], | ||
translations: (_d = (_c = window._oc_l10n_registry_translations) === null || _c === void 0 ? void 0 : _c[appId]) !== null && _d !== void 0 ? _d : {}, | ||
pluralFunction: (_f = (_e = window._oc_l10n_registry_plural_functions) === null || _e === void 0 ? void 0 : _e[appId]) !== null && _f !== void 0 ? _f : ((number) => number), | ||
}; | ||
@@ -63,0 +66,0 @@ } |
{ | ||
"name": "@nextcloud/l10n", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
87056
13
1494