Fixed some lint problems
This commit is contained in:
parent
08e992626b
commit
da598c1485
@ -52,9 +52,11 @@ var LocalizedStrings = function () {
|
||||
function LocalizedStrings(props, options) {
|
||||
_classCallCheck(this, LocalizedStrings);
|
||||
|
||||
//Compatibility fix with previous version
|
||||
// Compatibility fix with previous version
|
||||
if (typeof options === "function") {
|
||||
/* eslint-disable no-param-reassign */
|
||||
options = { customLanguageInterface: options };
|
||||
/* eslint-enable */
|
||||
}
|
||||
this._opts = _extends({}, {
|
||||
customLanguageInterface: utils.getInterfaceLanguage,
|
||||
|
||||
@ -29,9 +29,11 @@ export default class LocalizedStrings {
|
||||
* @param {Boolean} options.logsEnabled - Enable/Disable console.log outputs (default=true)
|
||||
*/
|
||||
constructor(props, options) {
|
||||
//Compatibility fix with previous version
|
||||
// Compatibility fix with previous version
|
||||
if (typeof options === "function") {
|
||||
/* eslint-disable no-param-reassign */
|
||||
options = { customLanguageInterface: options };
|
||||
/* eslint-enable */
|
||||
}
|
||||
this._opts = Object.assign(
|
||||
{},
|
||||
@ -153,9 +155,7 @@ export default class LocalizedStrings {
|
||||
strings[key] = defaultStrings[key]; // eslint-disable-line no-param-reassign
|
||||
if (this._opts.logsEnabled) {
|
||||
console.log(
|
||||
`🚧 👷 key '${key}' not found in localizedStrings for language ${
|
||||
this._language
|
||||
} 🚧`
|
||||
`🚧 👷 key '${key}' not found in localizedStrings for language ${this._language} 🚧`
|
||||
);
|
||||
}
|
||||
} else if (typeof strings[key] !== "string") {
|
||||
@ -267,9 +267,7 @@ export default class LocalizedStrings {
|
||||
} catch (ex) {
|
||||
if (!omitWarning && this._opts.logsEnabled) {
|
||||
console.log(
|
||||
`No localization found for key '${key}' and language '${language}', failed on ${
|
||||
ex.message
|
||||
}`
|
||||
`No localization found for key '${key}' and language '${language}', failed on ${ex.message}`
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2404,9 +2404,9 @@ set-value@^0.4.3:
|
||||
is-plain-object "^2.0.1"
|
||||
to-object-path "^0.3.0"
|
||||
|
||||
set-value@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.0.tgz#71ae4a88f0feefbbf52d1ea604f3fb315ebb6274"
|
||||
set-value@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b"
|
||||
dependencies:
|
||||
extend-shallow "^2.0.1"
|
||||
is-extendable "^0.1.1"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user