Move translator to helpers.js

This commit is contained in:
Blade Barringer
2015-09-21 17:35:27 -05:00
parent 0e6f563c1f
commit ad7e01d87e
44 changed files with 45 additions and 46 deletions

View File

@@ -3,7 +3,7 @@ api = module.exports
_ = require 'lodash'
moment = require 'moment'
t = require('../../dist/scripts/content/helpers/translator')
t = require('../../dist/scripts/content/helpers').translator
###
---------------------------------------------------------------

View File

@@ -1,7 +1,7 @@
import {each} from 'lodash';
import camelCase from 'lodash.camelcase';
import capitalize from 'lodash.capitalize';
import t from './helpers/translator';
import {translator as t} from './helpers';
let sets = {
'062014': ['beach', 'fairy_ring', 'forest'],

View File

@@ -1,5 +1,5 @@
import {each, defaults} from 'lodash';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
const DROP_EGGS = [
'Wolf',

View File

@@ -1,5 +1,5 @@
import {each, defaults} from 'lodash';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
const QUEST_EGGS = [
'Gryphon',

View File

@@ -1,4 +1,4 @@
import t from './helpers/translator';
import {translator as t} from './helpers';
const NUMBER_OF_QUESTIONS = 12;

View File

@@ -1,5 +1,5 @@
import {each, defaults} from 'lodash';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
const CAN_BUY = true;
const CAN_DROP = true;

View File

@@ -1,7 +1,7 @@
import {each, defaults} from 'lodash';
import capitalize from 'lodash.capitalize';
import camelCase from 'lodash.camelcase';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
const CAN_BUY = false;
const CAN_DROP = false;

View File

@@ -1,7 +1,7 @@
import {each, defaults} from 'lodash';
import capitalize from 'lodash.capitalize';
import camelCase from 'lodash.camelcase';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
const CAN_BUY = false;
const CAN_DROP = false;

View File

@@ -1,5 +1,5 @@
import {each, defaults, assign} from 'lodash';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import baseFood from './base';
import saddle from './saddle';

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
let saddle = {
Saddle: {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
import {armor as baseArmor} from './sets/base';

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let back = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let body = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let eyewear = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let headAccessory = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let head = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
import weapon from './weapon';

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
export var armor = {
0: {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../../helpers/translator';
import {translator as t} from '../../helpers';
import events from '../../events';
export var armor = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let shield = {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import events from '../events';
let weapon = {

View File

@@ -1,5 +1,5 @@
import {each, defaults} from 'lodash';
import t from './helpers/translator';
import {translator as t} from './helpers';
let hatchingPotions = {
Base: {

View File

@@ -1,7 +1,7 @@
require('coffee-script');
import i18n from '../../../../script/i18n.coffee';
import i18n from '../../../script/i18n.coffee';
var t = function(string, vars) {
export function translator(string, vars) {
var func = function(lang) {
if (vars == null) {
vars = {
@@ -16,4 +16,3 @@ var t = function(string, vars) {
return func;
};
export default t;

View File

@@ -1,7 +1,7 @@
import {each, defaults, assign} from 'lodash';
import capitalize from 'lodash.capitalize';
import camelCase from 'lodash.camelcase';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
let dilatoryDistressSeries = {
dilatoryDistress1: {

View File

@@ -1,6 +1,6 @@
import {each, defaults} from 'lodash';
import capitalize from 'lodash.capitalize';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
let holidayQuests = {
evilsanta: {

View File

@@ -1,7 +1,7 @@
import {each, assign, defaults, sortBy} from 'lodash';
import capitalize from 'lodash.capitalize';
import camelCase from 'lodash.camelcase';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import worldQuests from './world';
import holidayQuests from './holiday';

View File

@@ -1,7 +1,7 @@
import {each, defaults} from 'lodash';
import capitalize from 'lodash.capitalize';
import camelCase from 'lodash.camelcase';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
let petQuests = {
gryphon: {

View File

@@ -1,5 +1,5 @@
import {each, defaults, assign} from 'lodash';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
let inviteFriends = {
basilist: {

View File

@@ -1,6 +1,6 @@
import {each, defaults} from 'lodash';
import capitalize from 'lodash.capitalize';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
let worldQuests = {
dilatory: {

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import {diminishingReturns, calculateBonus, setSpellDefaults} from './spell-helper';
import {each} from 'lodash';

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import {diminishingReturns, calculateBonus} from './spell-helper';
import wizard from './wizard';

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import {diminishingReturns, calculateBonus, setSpellDefaults} from './spell-helper';
import {each} from 'lodash';

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import {diminishingReturns, calculateBonus, setSpellDefaults} from './spell-helper';
import {each} from 'lodash';

View File

@@ -1,6 +1,6 @@
import {each, defaults} from 'lodash';
import capitalize from 'lodash.capitalize';
import t from '../helpers/translator';
import {translator as t} from '../helpers';
export function diminishingReturns(bonus, max, halfway=max/2) {
return max * (bonus / (bonus + halfway));

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import {diminishingReturns, calculateBonus, setSpellDefaults} from './spell-helper';
import {each} from 'lodash';

View File

@@ -1,4 +1,4 @@
import t from '../helpers/translator';
import {translator as t} from '../helpers';
import {diminishingReturns, calculateBonus, setSpellDefaults} from './spell-helper';
import {each} from 'lodash';

View File

@@ -1,4 +1,4 @@
import t from './helpers/translator';
import {translator as t} from './helpers';
let stable = {
pets: {

View File

@@ -1,4 +1,4 @@
import t from './helpers/translator';
import {translator as t} from './helpers';
let habits = [
{