Lua: Rename global variable “L” to “LOCALE”
Srsly, WTF? If we have to use global variables, at least give them descriptive names.
--- a/hedgewars/uScript.pas Wed Mar 07 12:33:56 2018 +0100
+++ b/hedgewars/uScript.pas Wed Mar 07 13:48:51 2018 +0100
@@ -3601,7 +3601,7 @@
luaopen_table(luaState);
// import some variables
-ScriptSetString(_S'L', cLocale);
+ScriptSetString(_S'LOCALE', cLocale);
// import game flags
ScriptSetInteger('gfForts', gfForts);
--- a/share/hedgewars/Data/Scripts/Locale.lua Wed Mar 07 12:33:56 2018 +0100
+++ b/share/hedgewars/Data/Scripts/Locale.lua Wed Mar 07 13:48:51 2018 +0100
@@ -1,6 +1,6 @@
-- Library for localizing strings in lua scripts
-local lang = HedgewarsScriptLoad("Locale/" .. tostring(L) .. ".lua")
+local lang = HedgewarsScriptLoad("Locale/" .. tostring(LOCALE) .. ".lua")
function loc(text)
if locale ~= nil and locale[text] ~= nil then return locale[text]