mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-09-29 14:23:26 -05:00
Revert "Add translation support and translations extracted from the ROM. Requires every game message from battle.js to use _ to be translated."
This reverts commit 9bc8c023e6.
This commit is contained in:
13334
data/translations.js
13334
data/translations.js
File diff suppressed because it is too large
Load Diff
@@ -101,25 +101,6 @@ function hashColor(name) {
|
||||
return colorCache[name];
|
||||
}
|
||||
|
||||
// Translation function
|
||||
var _ = (function() {
|
||||
var re = /@[0-9]+/g;
|
||||
var args = {};
|
||||
var callback = function (args) { return function(i) { return args[+i.substr(1)+1] || ""; }; };
|
||||
var lt = {en: 0, jp: 1, fr: 2, it: 3, de: 4, es: 5};
|
||||
var lang = (window.Config && Config.language && lt[Config.language]) ? lt[Config.language] : 0;
|
||||
|
||||
if(lang && window.exports && exports.Translations)
|
||||
{
|
||||
return function f (message) {
|
||||
var m = exports.Translations.hasOwnProperty(message) ? exports.Translations[message][lang-1] : message;
|
||||
return m.replace(re, callback(f.arguments));
|
||||
};
|
||||
} else {
|
||||
return function f (message) { return m.replace(re, callback(f.arguments)); };
|
||||
}
|
||||
})();
|
||||
|
||||
function messageSanitize(str) {
|
||||
str = Tools.escapeHTML(str);
|
||||
// Don't format console commands (>>).
|
||||
|
||||
Reference in New Issue
Block a user