i18next-cli-language-detector
Advanced tools
Comparing version 0.0.1-rc3 to 0.0.1-rc4
@@ -14,3 +14,2 @@ import { Services, InitOptions } from "i18next"; | ||
} | ||
declare const _default: I18nextCLILanguageDetector; | ||
export default _default; | ||
export default I18nextCLILanguageDetector; |
@@ -17,5 +17,5 @@ "use strict"; | ||
var formattedLangauge = this.formatShellLocale(shellLocale); | ||
if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) { | ||
return this.getFallbackLng(); | ||
} | ||
// if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) { | ||
// return this.getFallbackLng(); | ||
// } | ||
return formattedLangauge; | ||
@@ -34,3 +34,3 @@ }; | ||
return; | ||
return this.services.languageUtils.formatLanguageCode(splittedLC[0]); | ||
return this.services.languageUtils.formatLanguageCode(splittedLC[0].replace("_", "-")); | ||
}; | ||
@@ -55,2 +55,2 @@ I18nextCLILanguageDetector.prototype.checkIfWhitelisted = function (language) { | ||
}()); | ||
exports.default = new I18nextCLILanguageDetector(); | ||
exports.default = I18nextCLILanguageDetector; |
{ | ||
"name": "i18next-cli-language-detector", | ||
"description": "i18next language detector module for CLI", | ||
"version": "0.0.1-rc3", | ||
"version": "0.0.1-rc4", | ||
"author": "Ryo Igarashi <n33t5hin@gmail.com>", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
@@ -25,5 +25,5 @@ import { Services, InitOptions } from "i18next"; | ||
if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) { | ||
return this.getFallbackLng(); | ||
} | ||
// if (!formattedLangauge || !this.checkIfWhitelisted(formattedLangauge)) { | ||
// return this.getFallbackLng(); | ||
// } | ||
@@ -42,4 +42,5 @@ return formattedLangauge; | ||
if (splittedLC.length < 0) return; | ||
return this.services.languageUtils.formatLanguageCode(splittedLC[0]); | ||
return this.services.languageUtils.formatLanguageCode( | ||
splittedLC[0].replace("_", "-") | ||
); | ||
} | ||
@@ -71,2 +72,2 @@ | ||
export default new I18nextCLILanguageDetector(); | ||
export default I18nextCLILanguageDetector; |
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
11939
183