From a502a9090b068ac08f0f34bded0ebd499fc264fe Mon Sep 17 00:00:00 2001 From: Hendrik Leppkes Date: Mon, 29 Sep 2008 10:52:23 +0200 Subject: [PATCH] Allow configurationg of a different base locale in Babelfish Script --- locale/Babelfish.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/locale/Babelfish.lua b/locale/Babelfish.lua index 1bfd67d..0b6f803 100644 --- a/locale/Babelfish.lua +++ b/locale/Babelfish.lua @@ -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))