For now we're only adding rules related to spacing and double quotes, following the same rules we use in Ruby, which are the same rules CoffeeScript followed when compiling these files. We're also using the recommended ESLint rules, which will warn us about many JavaScript common pitfalls, the `strict` rule which enforces using strict mode, and the `no-console` rule, which will prevent us from shipping code meant for debugging. Although it's arguably more common to use the JSON format to define these rules, I've chosen YAML because it's the format we use in all our linters.
41 lines
1.0 KiB
JavaScript
41 lines
1.0 KiB
JavaScript
// Generated by CoffeeScript 1.12.6
|
|
(function() {
|
|
"use strict";
|
|
var i18n;
|
|
|
|
i18n = {
|
|
es: {
|
|
"Comments": "Comentarios",
|
|
"No comment": "Sin comentarios",
|
|
"Cancel": "Cancelar",
|
|
"Save": "Guardar",
|
|
"Edit": "Editar",
|
|
"Delete": "Borrar",
|
|
"Unregistered": "<p>Necesitas <a href='/users/sign_in'>iniciar sesión</a> o <a href='/users/sign_up'>registrarte</a> para continuar.</p>"
|
|
},
|
|
en: {
|
|
"Comments": "Coments",
|
|
"No comment": "No comment",
|
|
"Cancel": "Cancel",
|
|
"Save": "Save",
|
|
"Edit": "Edit",
|
|
"Delete": "Delete",
|
|
"Unregistered": "You need to <a href='/users/sign_in'>sign in</a> or <a href='/users/sign_up'>sign up</a> to continue."
|
|
}
|
|
};
|
|
|
|
window.Gettext = function() {
|
|
return {
|
|
gettext: function(key) {
|
|
var locale, locale_id;
|
|
locale_id = $("html").attr("lang");
|
|
locale = i18n[locale_id];
|
|
if (locale && locale[key]) {
|
|
return locale[key];
|
|
}
|
|
return key;
|
|
}
|
|
};
|
|
};
|
|
}).call(this);
|