From 9bf1ebdb0faee3f46ef8ed3f7ed2eca72bf06be1 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Mon, 16 Nov 2015 08:14:42 -0600 Subject: [PATCH] Remove last of coffee files --- common/script/i18n.coffee | 44 --------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 common/script/i18n.coffee diff --git a/common/script/i18n.coffee b/common/script/i18n.coffee deleted file mode 100644 index 3e9b08f01d..0000000000 --- a/common/script/i18n.coffee +++ /dev/null @@ -1,44 +0,0 @@ -_ = require 'lodash' - -module.exports = - strings: null, # Strings for one single language - translations: {} # Strings for multiple languages {en: strings, de: strings, ...} - t: (stringName) -> # Other parameters allowed are vars (Object) and locale (String) - vars = arguments[1] - - if _.isString(arguments[1]) - vars = null - locale = arguments[1] - else if arguments[2]? - vars = arguments[1] - locale = arguments[2] - - locale = 'en' if (!locale? or (!module.exports.strings and !module.exports.translations[locale])) - - if module.exports.strings - string = module.exports.strings[stringName] - else - string = - module.exports.translations[locale] and - module.exports.translations[locale][stringName] - - clonedVars = _.clone(vars) or {} - clonedVars.locale = locale - - if string - try - _.template(string)((clonedVars)) - catch e - 'Error processing the string. Please see Help > Report a Bug.' - else - if module.exports.strings - stringNotFound = module.exports.strings.stringNotFound - else if module.exports.translations[locale] - stringNotFound = - module.exports.translations[locale] and - module.exports.translations[locale].stringNotFound - - try - _.template(stringNotFound)({string: stringName}) - catch e - 'Error processing the string. Please see Help > Report a Bug.'