Allow configurationg of a different base locale in Babelfish Script

This commit is contained in:
Hendrik Leppkes
2008-09-29 10:52:23 +02:00
parent 8664664151
commit a502a9090b
+8 -2
View File
@@ -40,8 +40,14 @@ local files = {
"Options/Options.lua",
}
--[[
The Language your addon was originally written in
]]
local baseLocale = "enUS"
--[[
The supported Languages
-- DO NOT INCLUDE the base locale here!
]]
local locale = {
"deDE",
@@ -94,10 +100,10 @@ for idx, lang in ipairs(locale) do
end
-- Write enUS file
local file = io.open("enUS.lua", "w")
local file = io.open(string.format("%s.lua", baseLocale), "w")
assert(file, "Could not open enUS.lua for writing")
file:write("-- Generated by Babelfish script, do not edit directly.\n")
file:write(string.format("local L = LibStub(\"AceLocale-3.0\"):NewLocale(\"%s\", \"enUS\", true)\n", localeName))
file:write(string.format("local L = LibStub(\"AceLocale-3.0\"):NewLocale(\"%s\", \"%s\", true)\n", localeName, baseLocale))
file:write("\n\n")
for idx, match in ipairs(work) do
file:write(string.format("L[\"%s\"] = true\n", match))