Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
Use more ES6 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
cibernox committed Feb 13, 2017
1 parent a789656 commit c83186d
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion addon/config/ar.js
Expand Up @@ -3,7 +3,7 @@ import { ZERO, ONE, TWO, FEW, MANY, OTHER } from './constants';
export default {
rtl: true,

pluralForm: function(n) {
pluralForm(n) {
const mod100 = n % 100;

if (n === 0) { return ZERO; }
Expand Down
2 changes: 1 addition & 1 deletion addon/config/en.js
Expand Up @@ -3,7 +3,7 @@ import { ONE, OTHER } from "./constants";
export default {
rtl: false,

pluralForm: function(n) {
pluralForm(n) {
if (n === 1) { return ONE; }
return OTHER;
}
Expand Down
2 changes: 1 addition & 1 deletion addon/config/fr.js
Expand Up @@ -3,7 +3,7 @@ import { ONE, OTHER } from "./constants";
export default {
rtl: false,

pluralForm: function(n) {
pluralForm(n) {
if (n >= 0 && n < 2) { return ONE; }
return OTHER;
}
Expand Down
2 changes: 1 addition & 1 deletion addon/config/hi.js
Expand Up @@ -3,7 +3,7 @@ import { ONE, OTHER } from "./constants";
export default {
rtl: false,

pluralForm: function(n) {
pluralForm(n) {
if (n === 0) { return ONE; }
if (n === 1) { return ONE; }
return OTHER;
Expand Down
2 changes: 1 addition & 1 deletion addon/config/pl.js
Expand Up @@ -3,7 +3,7 @@ import { ONE, FEW, MANY, OTHER } from './constants';
export default {
rtl: false,

pluralForm: function(n) {
pluralForm(n) {
const mod1 = n % 1;
const mod10 = n % 10;
const mod100 = n % 100;
Expand Down
2 changes: 1 addition & 1 deletion addon/config/ru.js
Expand Up @@ -3,7 +3,7 @@ import { ONE, FEW, MANY, OTHER } from './constants';
export default {
rtl: false,

pluralForm: function(n) {
pluralForm(n) {
const mod1 = n % 1;
const mod10 = n % 10;
const mod100 = n % 100;
Expand Down
2 changes: 1 addition & 1 deletion addon/config/zh.js
Expand Up @@ -3,7 +3,7 @@ import { OTHER } from './constants';
export default {
rtl: false,

pluralForm: function(/* n */) {
pluralForm() /* n */{
return OTHER;
}
};
2 changes: 1 addition & 1 deletion blueprints/locale/index.js
@@ -1,7 +1,7 @@
module.exports = {
description: 'Generates new i18n locale directory with config and translations files.',

beforeInstall: function(options) {
beforeInstall(options) {
if (options.args.length < 2) {
throw new Error("ember-i18n locale generator requires a locale name.");
}
Expand Down
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -7,15 +7,15 @@ module.exports = {
name: 'ember-i18n',
isLocalizationFramework: true,

init: function() {
init() {
this._super.init && this._super.init.apply(this, arguments);

var checker = new VersionChecker(this);
var dep = checker.forEmber();
this.hasEmberHelper = !dep.lt('1.13.0');
},

treeFor: function(name) {
treeFor(name) {
var result = this._super.treeFor.apply(this, arguments);

if (this.hasEmberHelper) {
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/app/locales/en-wz/config.js
@@ -1,5 +1,5 @@
export default {
pluralForm: function(count) {
pluralForm(count) {
if (count === 0) { return 'zero'; }
if (count === 1) { return 'one'; }
return 'other';
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/utils/macro-test.js
Expand Up @@ -5,7 +5,7 @@ import { translationMacro as t } from 'ember-i18n';
moduleFor('service:i18n', 'translationMacro', {
integration: true,

beforeEach: function() {
beforeEach() {
const i18n = this.subject({ locale: 'en' });

this.object = Ember.Object.extend({
Expand Down

0 comments on commit c83186d

Please sign in to comment.