mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
🩹 fix get current resource name
This commit is contained in:
@@ -2,8 +2,7 @@ Locales = {}
|
||||
|
||||
function Translate(str, ...) -- Translate string
|
||||
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(currentResourceName))
|
||||
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()))
|
||||
return 'Given translate function parameter is nil!'
|
||||
end
|
||||
if Locales[Config.Locale] then
|
||||
|
||||
Reference in New Issue
Block a user