🩹 fix get current resource name

This commit is contained in:
Gellipapa
2023-06-22 23:27:46 +02:00
parent 5ed7c768b6
commit 3d4e07fb8e
+1 -2
View File
@@ -2,8 +2,7 @@ Locales = {}
function Translate(str, ...) -- Translate string function Translate(str, ...) -- Translate string
if not str then if not str then
local currentResourceName = GetCurrentResourceName() print(("[^1ERROR^7] Resource ^5%s^7 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() or GetCurrentResourceName()))
print(("[^1ERROR^7] Resource ^5%s^7 You did not specify a parameter for the Translate function or the value is nil!"):format(currentResourceName))
return 'Given translate function parameter is nil!' return 'Given translate function parameter is nil!'
end end
if Locales[Config.Locale] then if Locales[Config.Locale] then