-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing initializer and adding suppressWarnings #19
Conversation
this.intl.setLocale('en-us'); | ||
|
||
const instance = this.subject({ | ||
warn() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
this.inject.service('intl'); | ||
this.intl.setLocale('en-us'); | ||
|
||
const instance = this.subject({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
let triggered = false; | ||
|
||
const instance = this.subject({ | ||
warn() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
this.intl.setLocale('en-us'); | ||
let triggered = false; | ||
|
||
const instance = this.subject({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
|
||
this.inject.service('intl'); | ||
this.intl.setLocale('en-us'); | ||
let triggered = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
assert.expect(1); | ||
|
||
this.register('config:environment', { | ||
intl_cp_validations: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Identifier 'intl_cp_validations' is not in camel case.
@@ -0,0 +1,55 @@ | |||
import { moduleFor, test } from 'ember-qunit'; | |||
|
|||
moduleFor('ember-intl-cp-validations@validator:messages', 'Unit | Validators | messages', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
@@ -0,0 +1,55 @@ | |||
import { moduleFor, test } from 'ember-qunit'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'import' is only available in ES6 (use 'esversion: 6').
@@ -0,0 +1 @@ | |||
export { default } from 'ember-intl-cp-validations/validators/messages'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'export' is only available in ES6 (use 'esversion: 6').
id: 'ember-intl-cp-validations-missing-translation' | ||
}); | ||
|
||
return this._super(...arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'spread/rest operator' is only available in ES6 (use 'esversion: 6').
return this.formatMessage(intl.t(key, options)); | ||
} | ||
|
||
this._warn(`[ember-intl-cp-validations] Missing translation for validation key: ${key}\nhttp://offirgolan.github.io/ember-cp-validations/docs/messages/index.html`, false, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
|
||
getMessageFor(type, options = {}) { | ||
let key = get(options, 'messageKey') || `${this.get('prefix')}.${type}`; | ||
let intl = get(this, 'intl'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
}, | ||
|
||
getMessageFor(type, options = {}) { | ||
let key = get(options, 'messageKey') || `${this.get('prefix')}.${type}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'let' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'template literal syntax' is only available in ES6 (use 'esversion: 6').
return this._super(...arguments); | ||
}, | ||
|
||
getMessageFor(type, options = {}) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'concise methods' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'default parameters' is only available in ES6 (use 'esversion: 6').
} | ||
} | ||
|
||
return this._super(...arguments); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'spread/rest operator' is only available in ES6 (use 'esversion: 6').
if (intl.exists(key)) { | ||
return intl.t(key, options); | ||
} else if (foundCustom) { | ||
this._warn(`Custom descriptionKey '${key}' provided but does not exist in intl translations.`, false, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long.
'template literal syntax' is only available in ES6 (use 'esversion: 6').
No description provided.