Crowley saved the day and fixed my brain
This commit is contained in:
1 parent
8a9cbdc658
commit
0382694f94
1 file changed
+6
-6
@@ -17,7 +17,6 @@ esxLang ~= "none" and esxLang or
|
||||
Language = {}
|
||||
|
||||
function Language.Locale(str, ...)
|
||||
print("Lang: ", GetInvokingResource(), GetCurrentResourceName())
|
||||
local resource = GetInvokingResource() or GetCurrentResourceName()
|
||||
assert(resource, "Resource name not found")
|
||||
|
||||
@@ -49,12 +48,7 @@ function Language.Locale(str, ...)
|
||||
end
|
||||
|
||||
|
||||
RegisterCommand("lang", function(source, args, raw)
|
||||
print(Language.Locale("UNITTEST.UNITTEST.UNITTESTA"))
|
||||
print(Language.Locale("UNITTEST.UNITTESTA", "Devil", "GERRRRRRR!"))
|
||||
|
||||
print( "Oh also this works", Language.Locale("place_object_scroll_down"))
|
||||
end)
|
||||
|
||||
if BridgeSharedConfig.DebugLevel == 2 then
|
||||
-- if outside this resource, use local whatever = Require("modules/locales/shared.lua")
|
||||
@@ -70,6 +64,12 @@ if BridgeSharedConfig.DebugLevel == 2 then
|
||||
-- local Language = Require('modules/locales/shared.lua')
|
||||
-- print("Language: ", Lang)
|
||||
-- print("Locale: ", Language.Locale("locale-unit-test"))
|
||||
RegisterCommand("lang", function(source, args, raw)
|
||||
print(Language.Locale("UNITTEST.UNITTEST.UNITTESTA"))
|
||||
print(Language.Locale("UNITTEST.UNITTESTA", "Devil", "GERRRRRRR!"))
|
||||
|
||||
print( "Oh also this works", Language.Locale("place_object_scroll_down"))
|
||||
end)
|
||||
end
|
||||
|
||||
return Language
|
||||
Reference in new issue
Block a user