12,601
edits
Blinkingline (talk | contribs) No edit summary |
Blinkingline (talk | contribs) (Just trying to remove the translation.) Tag: Reverted |
||
Line 44: | Line 44: | ||
local templates = require('Module:LuacardTemplates') | local templates = require('Module:LuacardTemplates') | ||
local cardstyle = require('Module:LuacardStyle') | local cardstyle = require('Module:LuacardStyle') | ||
local translations = require("Module:LocaleTable") -- double quotes to not stage | --local translations = require("Module:LocaleTable") -- double quotes to not stage | ||
local luastache = require("Module:luastache") -- double quotes to not stage | local luastache = require("Module:luastache") -- double quotes to not stage | ||
local translate_table = {} | --local translate_table = {} | ||
local translate = function(word) | --local translate = function(word) | ||
-- if(translate_table[word]~=nil) then | |||
-- return translate_table[word] | |||
-- else | |||
-- return word | |||
-- end | |||
end | --end | ||
function insert_translated(tab) | --function insert_translated(tab) | ||
-- local trans_tab = {} | |||
-- for k,v in pairs(tab) do | |||
-- trans_tab[k..'_t'] = translate(v) | |||
-- end | |||
-- combine(tab, trans_tab) | |||
end | --end | ||
function stachify(table) | function stachify(table) | ||
Line 96: | Line 96: | ||
function stache(s, tab) | function stache(s, tab) | ||
stachify(tab) | stachify(tab) | ||
-- insert_translated(tab) | |||
s = '{{=${ }=}}'..s | s = '{{=${ }=}}'..s | ||
return luastache:render(s, tab) | return luastache:render(s, tab) | ||
Line 116: | Line 116: | ||
end | end | ||
local translate_trait = function(frame, type, word) | --local translate_trait = function(frame, type, word) | ||
-- if(frame.args.locale) then | |||
-- if(not translations[type][frame.args.locale]) then | |||
-- return word | |||
-- end | |||
-- if(not translations[type][frame.args.locale][mw.ustring.lower(word)]) then | |||
-- return word | |||
-- end | |||
-- return mw.ustring.upper(translations[type][frame.args.locale][mw.ustring.lower(word)]) | |||
-- else | |||
-- return word | |||
-- end | |||
end | --end | ||
local load_translation_table = function(locale) | --local load_translation_table = function(locale) | ||
-- local translate_table_results = cargo_results( | |||
-- 'TranslationTable', | |||
-- 'EnglishText,Type,TranslatedText', | |||
-- { | |||
-- where='Locale="'..locale..'"' | |||
-- }) | |||
-- for r=1, #translate_table_results do | |||
-- local result = translate_table_results[r] | |||
-- translate_table[result.EnglishText] = result.TranslatedText | |||
-- end | |||
end | --end | ||
local apply_altart = function(frame, vars) | local apply_altart = function(frame, vars) | ||
Line 219: | Line 219: | ||
local split = mw.text.split(vars.cardtraits, ' • ') | local split = mw.text.split(vars.cardtraits, ' • ') | ||
vars.cardtraits = {} | vars.cardtraits = {} | ||
-- vars.translate_trait = function(self) | |||
-- return translate_trait(frame, 'traits', self.trait) | |||
-- end | |||
for i = 1, #split do | for i = 1, #split do | ||
append(vars.categories, split[i]) | append(vars.categories, split[i]) |