From bde89e7dbfe6e9b81be61a74050870a578744bff Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sat, 18 Jan 2025 21:41:36 +0100 Subject: [PATCH 1/2] refactor(es_extended/locale): refactor Translate fun --- [core]/es_extended/locale.lua | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/[core]/es_extended/locale.lua b/[core]/es_extended/locale.lua index db77eba76..7d940e4f2 100644 --- a/[core]/es_extended/locale.lua +++ b/[core]/es_extended/locale.lua @@ -3,21 +3,23 @@ Locales = {} function Translate(str, ...) -- Translate string if not str then error(("Resource ^5%s^1 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 - if Locales[Config.Locale][str] then - return string.format(Locales[Config.Locale][str], ...) - elseif Config.Locale ~= "en" and Locales["en"] and Locales["en"][str] then - return string.format(Locales["en"][str], ...) - else - return "Translation [" .. Config.Locale .. "][" .. str .. "] does not exist" + + local translations = Locales[Config.Locale] + if not translations then + -- Fall back to English translation if the current locale is not found + if Locales.en and Locales.en[str] then + return Locales.en[str]:format(...) end - elseif Config.Locale ~= "en" and Locales["en"] and Locales["en"][str] then - return string.format(Locales["en"][str], ...) - else - return "Locale [" .. Config.Locale .. "] does not exist" + + return ("Locale [%s] does not exist"):format(Config.Locale) end + + if translations[str] then + return translations[str]:format(...) + end + + return ("Translation [%s][%s] does not exist"):format(Config.Locale, str) end function TranslateCap(str, ...) -- Translate string first char uppercase From 86af2ef0edd8e6d23845048ae703cdb8f419d5ae Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 19 Jan 2025 12:54:14 +0100 Subject: [PATCH 2/2] feat(es_extended/locale): add support for lazy loading locales --- [core]/es_extended/fxmanifest.lua | 2 +- [core]/es_extended/locale.lua | 20 +++++++++++++++----- [core]/es_extended/locales/cs.lua | 8 ++++---- [core]/es_extended/locales/de.lua | 2 +- [core]/es_extended/locales/el.lua | 2 +- [core]/es_extended/locales/en.lua | 2 +- [core]/es_extended/locales/es.lua | 2 +- [core]/es_extended/locales/fi.lua | 2 +- [core]/es_extended/locales/fr.lua | 2 +- [core]/es_extended/locales/he.lua | 2 +- [core]/es_extended/locales/hu.lua | 8 ++++---- [core]/es_extended/locales/id.lua | 2 +- [core]/es_extended/locales/it.lua | 2 +- [core]/es_extended/locales/nl.lua | 2 +- [core]/es_extended/locales/pl.lua | 8 ++++---- [core]/es_extended/locales/sl.lua | 8 ++++---- [core]/es_extended/locales/sr.lua | 8 ++++---- [core]/es_extended/locales/sv.lua | 2 +- [core]/es_extended/locales/tr.lua | 16 ++++++++-------- [core]/es_extended/locales/zh-cn.lua | 8 ++++---- [core]/es_extended/shared/config/main.lua | 9 ++++----- [core]/esx_identity/locales/cs.lua | 2 +- [core]/esx_identity/locales/da.lua | 2 +- [core]/esx_identity/locales/de.lua | 4 ++-- [core]/esx_identity/locales/en.lua | 2 +- [core]/esx_identity/locales/es.lua | 2 +- [core]/esx_identity/locales/fi.lua | 2 +- [core]/esx_identity/locales/fr.lua | 2 +- [core]/esx_identity/locales/he.lua | 2 +- [core]/esx_identity/locales/hu.lua | 2 +- [core]/esx_identity/locales/it.lua | 2 +- [core]/esx_identity/locales/nl.lua | 2 +- [core]/esx_identity/locales/pl.lua | 2 +- [core]/esx_identity/locales/pt.lua | 2 +- [core]/esx_identity/locales/sl.lua | 2 +- [core]/esx_identity/locales/sr.lua | 2 +- [core]/esx_identity/locales/sv.lua | 2 +- [core]/esx_skin/locales/da.lua | 2 +- [core]/esx_skin/locales/de.lua | 12 ++++++------ [core]/esx_skin/locales/en.lua | 2 +- [core]/esx_skin/locales/es.lua | 2 +- [core]/esx_skin/locales/fi.lua | 2 +- [core]/esx_skin/locales/fr.lua | 2 +- [core]/esx_skin/locales/he.lua | 2 +- [core]/esx_skin/locales/hu.lua | 2 +- [core]/esx_skin/locales/it.lua | 2 +- [core]/esx_skin/locales/nl.lua | 2 +- [core]/esx_skin/locales/pl.lua | 2 +- [core]/esx_skin/locales/pt.lua | 2 +- [core]/esx_skin/locales/sl.lua | 2 +- [core]/esx_skin/locales/sr.lua | 2 +- [core]/esx_skin/locales/sv.lua | 2 +- [core]/esx_skin/locales/zh-cn.lua | 2 +- 53 files changed, 101 insertions(+), 92 deletions(-) diff --git a/[core]/es_extended/fxmanifest.lua b/[core]/es_extended/fxmanifest.lua index 6bef96559..5bcca0968 100644 --- a/[core]/es_extended/fxmanifest.lua +++ b/[core]/es_extended/fxmanifest.lua @@ -7,7 +7,6 @@ version '1.12.2' shared_scripts { 'locale.lua', - 'locales/*.lua', 'shared/config/main.lua', 'shared/config/weapons.lua', @@ -63,6 +62,7 @@ ui_page { files { 'imports.lua', + 'locales/*.lua', 'locale.js', 'html/ui.html', diff --git a/[core]/es_extended/locale.lua b/[core]/es_extended/locale.lua index 7d940e4f2..3f059b620 100644 --- a/[core]/es_extended/locale.lua +++ b/[core]/es_extended/locale.lua @@ -5,14 +5,24 @@ function Translate(str, ...) -- Translate string error(("Resource ^5%s^1 You did not specify a parameter for the Translate function or the value is nil!"):format(GetInvokingResource() or GetCurrentResourceName())) end + --- Load the locale file if it hasn't been loaded yet + if Locales[Config.Locale] == nil then + local success, result = pcall(function() + return assert(load(LoadResourceFile(GetCurrentResourceName(), ("locales/%s.lua"):format(Config.Locale))))() + end) + + Locales[Config.Locale] = success and result or false + end + local translations = Locales[Config.Locale] if not translations then - -- Fall back to English translation if the current locale is not found - if Locales.en and Locales.en[str] then - return Locales.en[str]:format(...) + if Config.Locale == "en" then + return "Locale [en] does not exist" end - return ("Locale [%s] does not exist"):format(Config.Locale) + -- Fall back to English translation if the current locale is not found + Config.Locale = "en" + return Translate(str, ...) end if translations[str] then @@ -28,4 +38,4 @@ end _ = Translate -- luacheck: ignore _U -_U = TranslateCap +_U = TranslateCap \ No newline at end of file diff --git a/[core]/es_extended/locales/cs.lua b/[core]/es_extended/locales/cs.lua index a9b278fd7..435cd875a 100644 --- a/[core]/es_extended/locales/cs.lua +++ b/[core]/es_extended/locales/cs.lua @@ -1,4 +1,4 @@ -Locales["cs"] = { +return { -- Inventory ["inventory"] = "Inventář ( Váha %s / %s )", ["use"] = "Použít", @@ -223,10 +223,10 @@ Locales["cs"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Míček", diff --git a/[core]/es_extended/locales/de.lua b/[core]/es_extended/locales/de.lua index 8951fdf08..3aac3dd21 100644 --- a/[core]/es_extended/locales/de.lua +++ b/[core]/es_extended/locales/de.lua @@ -1,4 +1,4 @@ -Locales["de"] = { +return { -- Inventory ["inventory"] = "Inventar ( Gewicht %s / %s )", ["use"] = "Benutzen", diff --git a/[core]/es_extended/locales/el.lua b/[core]/es_extended/locales/el.lua index ba1d1ab0b..4fe64ddc5 100644 --- a/[core]/es_extended/locales/el.lua +++ b/[core]/es_extended/locales/el.lua @@ -1,4 +1,4 @@ -Locales["el"] = { +return { -- Inventory ["inventory"] = "Αποθήκη ( Βάρος %s / %s )", ["use"] = "Χρήση", diff --git a/[core]/es_extended/locales/en.lua b/[core]/es_extended/locales/en.lua index 81431aec0..194d29125 100644 --- a/[core]/es_extended/locales/en.lua +++ b/[core]/es_extended/locales/en.lua @@ -1,4 +1,4 @@ -Locales["en"] = { +return { -- Inventory ["inventory"] = "Inventory ( Weight %s / %s )", ["use"] = "Use", diff --git a/[core]/es_extended/locales/es.lua b/[core]/es_extended/locales/es.lua index 9d03a65d2..b5bb38d36 100644 --- a/[core]/es_extended/locales/es.lua +++ b/[core]/es_extended/locales/es.lua @@ -1,4 +1,4 @@ -Locales["es"] = { +return { -- Inventory ["inventory"] = "Inventario %s / %s", ["use"] = "Usar", diff --git a/[core]/es_extended/locales/fi.lua b/[core]/es_extended/locales/fi.lua index 4d71ff482..a1ebffd2c 100644 --- a/[core]/es_extended/locales/fi.lua +++ b/[core]/es_extended/locales/fi.lua @@ -1,4 +1,4 @@ -Locales["fi"] = { +return { -- Inventory ["inventory"] = "Reppu %s / %s", ["use"] = "Käytä", diff --git a/[core]/es_extended/locales/fr.lua b/[core]/es_extended/locales/fr.lua index a0a132b43..95f5f7960 100644 --- a/[core]/es_extended/locales/fr.lua +++ b/[core]/es_extended/locales/fr.lua @@ -1,4 +1,4 @@ -Locales["fr"] = { +return { -- Inventory ["inventory"] = "Inventaire ( Poids %s / %s )", ["use"] = "Utiliser", diff --git a/[core]/es_extended/locales/he.lua b/[core]/es_extended/locales/he.lua index d6216573b..4c8440ff3 100644 --- a/[core]/es_extended/locales/he.lua +++ b/[core]/es_extended/locales/he.lua @@ -1,4 +1,4 @@ -Locales["he"] = { +return { -- Inventory ["inventory"] = "מלאי ( משקל %s / %s )", ["use"] = "השתמש", diff --git a/[core]/es_extended/locales/hu.lua b/[core]/es_extended/locales/hu.lua index 5d3b230be..e805ccf11 100644 --- a/[core]/es_extended/locales/hu.lua +++ b/[core]/es_extended/locales/hu.lua @@ -1,4 +1,4 @@ -Locales["hu"] = { +return { -- Inventory ["inventory"] = "Inventory ( Súly %s / %s )", ["use"] = "Használ", @@ -229,10 +229,10 @@ Locales["hu"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Baseball", diff --git a/[core]/es_extended/locales/id.lua b/[core]/es_extended/locales/id.lua index bbd2587c7..1dfa8487a 100644 --- a/[core]/es_extended/locales/id.lua +++ b/[core]/es_extended/locales/id.lua @@ -1,4 +1,4 @@ -Locales["id"] = { +return { -- Inventory ["inventory"] = "Inventaris ( Berat %s / %s )", ["use"] = "Gunakan", diff --git a/[core]/es_extended/locales/it.lua b/[core]/es_extended/locales/it.lua index 8a7caf594..9de0edb5f 100644 --- a/[core]/es_extended/locales/it.lua +++ b/[core]/es_extended/locales/it.lua @@ -1,4 +1,4 @@ -Locales["it"] = { +return { -- Inventory ["inventory"] = "Inventario ( Peso %s / %s )", ["use"] = "Usa", diff --git a/[core]/es_extended/locales/nl.lua b/[core]/es_extended/locales/nl.lua index 2dee1716e..494e0c3f3 100644 --- a/[core]/es_extended/locales/nl.lua +++ b/[core]/es_extended/locales/nl.lua @@ -1,4 +1,4 @@ -Locales["nl"] = { +return { -- Inventory ["inventory"] = "Inventaris ( Gewicht %s / %s )", ["use"] = "Gebruik", diff --git a/[core]/es_extended/locales/pl.lua b/[core]/es_extended/locales/pl.lua index a9dceb4f1..7535ffdd1 100644 --- a/[core]/es_extended/locales/pl.lua +++ b/[core]/es_extended/locales/pl.lua @@ -1,4 +1,4 @@ -Locales["pl"] = { +return { -- Inventory ["inventory"] = "ekwipunek %s / %s", ["use"] = "użyj", @@ -202,10 +202,10 @@ Locales["pl"] = { ["component_luxary_finish"] = "luksusowe wykończenie broni", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Weapon Ammo ["ammo_rounds"] = "nabój/oi", diff --git a/[core]/es_extended/locales/sl.lua b/[core]/es_extended/locales/sl.lua index da0c9de44..3808ab280 100644 --- a/[core]/es_extended/locales/sl.lua +++ b/[core]/es_extended/locales/sl.lua @@ -1,4 +1,4 @@ -Locales["sl"] = { +return { -- Inventory ["inventory"] = "Shramba ( Teza %s / %s )", ["use"] = "Uporabi", @@ -229,10 +229,10 @@ Locales["sl"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Baseball", diff --git a/[core]/es_extended/locales/sr.lua b/[core]/es_extended/locales/sr.lua index 9ef517030..fb76e019f 100644 --- a/[core]/es_extended/locales/sr.lua +++ b/[core]/es_extended/locales/sr.lua @@ -1,4 +1,4 @@ -Locales["sr"] = { +return { -- Inventory ["inventory"] = "Inventar ( Težina %s / %s )", ["use"] = "Koristi", @@ -229,10 +229,10 @@ Locales["sr"] = { ["weapon_tactilerifle"] = "Service Carbine", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "Baseball", diff --git a/[core]/es_extended/locales/sv.lua b/[core]/es_extended/locales/sv.lua index e528baca5..14e45b407 100644 --- a/[core]/es_extended/locales/sv.lua +++ b/[core]/es_extended/locales/sv.lua @@ -1,4 +1,4 @@ -Locales["sv"] = { +return { -- Inventory ["inventory"] = "Inventory ( Vikt %s / %s )", ["use"] = "Använd", diff --git a/[core]/es_extended/locales/tr.lua b/[core]/es_extended/locales/tr.lua index f12d64957..6c0f9edb9 100644 --- a/[core]/es_extended/locales/tr.lua +++ b/[core]/es_extended/locales/tr.lua @@ -1,4 +1,4 @@ -Locales["tr"] = { +return { -- Inventory ["inventory"] = "Envanter ( Ağırlık %s / %s )", ["use"] = "Kullan", @@ -36,10 +36,10 @@ Locales["tr"] = { ["threw_weapon_already"] = "Bu Silaha Zaten Sahipsiniz", ["threw_cannot_pickup"] = "Envanter Dolu, Alınamaz!", ["threw_pickup_prompt"] = "Almak İçin E'ye Basın", - + -- Key mapping ["keymap_showinventory"] = "Envanteri Göster", - + -- Salary related ["received_salary"] = "Maaşınız Ödendi: $%s", ["received_help"] = "Yardım Çekiniz Ödendi: $%s", @@ -49,11 +49,11 @@ Locales["tr"] = { ["account_bank"] = "Banka", ["account_black_money"] = "Kirli Para", ["account_money"] = "Nakit", - + ["act_imp"] = "İşlem Yapılamaz", ["in_vehicle"] = "İşlem Yapılamaz, Oyuncu Araçta", ["not_in_vehicle"] = "İşlem Yapılamaz, Oyuncu Araçta Değil", - + -- Commands ["command_bring"] = "Oyuncuyu Yanınıza Getir", ["command_car"] = "Araç Spawn Et", @@ -119,14 +119,14 @@ Locales["tr"] = { ["command_giveammo_ammo"] = "Mermi Miktarı", ["tpm_nowaypoint"] = "Hiçbir Yol İşareti Ayarlanmadı.", ["tpm_success"] = "Başarıyla Teleport Edildi", - + ["noclip_message"] = "Noclip %s Yapıldı", ["enabled"] = "~g~Aktif Edildi~s~", ["disabled"] = "~r~Pasif Edildi~s~", - + -- Locale settings ["locale_digit_grouping_symbol"] = ",", - ["locale_currency"] = "£%s", + ["locale_currency"] = "£%s", -- Silahlar diff --git a/[core]/es_extended/locales/zh-cn.lua b/[core]/es_extended/locales/zh-cn.lua index 5971cc35b..b49819e7c 100644 --- a/[core]/es_extended/locales/zh-cn.lua +++ b/[core]/es_extended/locales/zh-cn.lua @@ -1,4 +1,4 @@ -Locales["zh-cn"] = { +return { -- Inventory ["inventory"] = "背包 %s / %s", ["use"] = "使用", @@ -229,10 +229,10 @@ Locales["zh-cn"] = { ["weapon_tactilerifle"] = "制式卡宾步枪", -- Drug Wars DLC - ["weapon_candycane"] = "Candy Cane", -- not translated + ["weapon_candycane"] = "Candy Cane", -- not translated ["weapon_acidpackage"] = "Acid Package", -- not translated - ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated - ["weapon_railgunxm3"] = "Railgun", -- not translated + ["weapon_pistolxm3"] = "WM 29 Pistol", -- not translated + ["weapon_railgunxm3"] = "Railgun", -- not translated -- Thrown ["weapon_ball"] = "棒球", diff --git a/[core]/es_extended/shared/config/main.lua b/[core]/es_extended/shared/config/main.lua index 5d37450af..108d292d6 100644 --- a/[core]/es_extended/shared/config/main.lua +++ b/[core]/es_extended/shared/config/main.lua @@ -1,5 +1,9 @@ Config = {} +local txAdminLocale = GetConvar("txAdmin-locale", "en") +local esxLocale = GetConvar("esx:locale", "invalid") +Config.Locale = (esxLocale ~= "invalid") and esxLocale or (txAdminLocale ~= "custom" and txAdminLocale) or "en" + -- for ox inventory, this will automatically be adjusted, do not change! for other inventories, change to "resource_name" Config.CustomInventory = false @@ -60,8 +64,3 @@ if GetResourceState("ox_inventory") ~= "missing" then end Config.EnableDefaultInventory = Config.CustomInventory == false -- Display the default Inventory ( F2 ) - -local txAdminLocale = GetConvar("txAdmin-locale", "en") -local esxLocale = GetConvar("esx:locale", "invalid") - -Config.Locale = (esxLocale ~= "invalid") and esxLocale or (txAdminLocale ~= "custom" and txAdminLocale) or "en" diff --git a/[core]/esx_identity/locales/cs.lua b/[core]/esx_identity/locales/cs.lua index bb17bed20..1482b1543 100644 --- a/[core]/esx_identity/locales/cs.lua +++ b/[core]/esx_identity/locales/cs.lua @@ -1,4 +1,4 @@ -Locales["cs"] = { +return { ["show_registration"] = "zobrazit registracni menu", ["show_active_character"] = "zobrazit aktivni postavy", ["delete_character"] = "smazat svou stavajici postavu a vytvorit novou", diff --git a/[core]/esx_identity/locales/da.lua b/[core]/esx_identity/locales/da.lua index 21c03808b..f5c0c1d20 100644 --- a/[core]/esx_identity/locales/da.lua +++ b/[core]/esx_identity/locales/da.lua @@ -1,4 +1,4 @@ -Locales["da"] = { +return { ["show_active_character"] = "Vis aktiv karakter", ["active_character"] = "Aktiv karakter: %s", ["error_active_character"] = "Der opstod en fejl under indhentning af dine data.", diff --git a/[core]/esx_identity/locales/de.lua b/[core]/esx_identity/locales/de.lua index 4c6de824a..b2285b00f 100644 --- a/[core]/esx_identity/locales/de.lua +++ b/[core]/esx_identity/locales/de.lua @@ -1,4 +1,4 @@ -Locales["de"] = { +return { ["show_active_character"] = "Aktiven Charakter anzeigen", ["active_character"] = "Aktiver Charakter: %s", ["error_active_character"] = "Beim Abrufen deiner Daten ist ein Fehler aufgetreten", @@ -35,4 +35,4 @@ Locales["de"] = { ["invalid_dob_format"] = "Ungültiges Format (Geburtstag): Bitte versuche es erneut.", ["invalid_sex_format"] = "Ungültiges Format (Geschlecht): Bitte versuche es erneut.", ["invalid_height_format"] = "Ungültiges Format (Körpergröße): Bitte versuche es erneut.", -} \ No newline at end of file +} diff --git a/[core]/esx_identity/locales/en.lua b/[core]/esx_identity/locales/en.lua index ab3d922c9..fa4737e30 100644 --- a/[core]/esx_identity/locales/en.lua +++ b/[core]/esx_identity/locales/en.lua @@ -1,4 +1,4 @@ -Locales["en"] = { +return { ["show_active_character"] = "Show Active Character", ["active_character"] = "Active Character: %s", ["error_active_character"] = "There was an error obtaining your data.", diff --git a/[core]/esx_identity/locales/es.lua b/[core]/esx_identity/locales/es.lua index d6385eac1..3961d823e 100644 --- a/[core]/esx_identity/locales/es.lua +++ b/[core]/esx_identity/locales/es.lua @@ -1,4 +1,4 @@ -Locales["es"] = { +return { ["show_active_character"] = "Mostrar personaje actual", ["active_character"] = "Personaje actual: %s", ["error_active_character"] = "Se produjo un error al recuperar tu nombre. Por favor contacta con un administrador", diff --git a/[core]/esx_identity/locales/fi.lua b/[core]/esx_identity/locales/fi.lua index c9d9ccb38..f2c879353 100644 --- a/[core]/esx_identity/locales/fi.lua +++ b/[core]/esx_identity/locales/fi.lua @@ -1,4 +1,4 @@ -Locales["fi"] = { +return { ["show_active_character"] = "Näytä nykyinen hahmosi", ["active_character"] = "Nykyinen hahmosi: %s", ["error_active_character"] = "Hahmosi hakemisessa ilmeni ongelma. Ota yhteyttä ylläpitoon.", diff --git a/[core]/esx_identity/locales/fr.lua b/[core]/esx_identity/locales/fr.lua index 36b9d8664..4a0e007bd 100644 --- a/[core]/esx_identity/locales/fr.lua +++ b/[core]/esx_identity/locales/fr.lua @@ -1,4 +1,4 @@ -Locales["fr"] = { +return { ["show_active_character"] = "Afficher le personnage actif", ["active_character"] = "Personnage actif: %s", ["error_active_character"] = "Une erreur s'est produite lors de l'obtention de vos données.", diff --git a/[core]/esx_identity/locales/he.lua b/[core]/esx_identity/locales/he.lua index 18c8a5149..1205e4ece 100644 --- a/[core]/esx_identity/locales/he.lua +++ b/[core]/esx_identity/locales/he.lua @@ -1,4 +1,4 @@ -Locales["he"] = { +return { ["show_active_character"] = "הצג דמות פעילה", ["active_character"] = "דמות פעילה: %s", ["error_active_character"] = "אירעה שגיאה בקבלת הנתונים שלך.", diff --git a/[core]/esx_identity/locales/hu.lua b/[core]/esx_identity/locales/hu.lua index 0af9173d6..3c08cd3c9 100644 --- a/[core]/esx_identity/locales/hu.lua +++ b/[core]/esx_identity/locales/hu.lua @@ -1,4 +1,4 @@ -Locales["hu"] = { +return { ["show_active_character"] = "Aktív karakterek mutatása", ["active_character"] = "Aktív karakter: %s", ["error_active_character"] = "A név nem megfelelő", diff --git a/[core]/esx_identity/locales/it.lua b/[core]/esx_identity/locales/it.lua index 41ce44e34..6bdca479c 100644 --- a/[core]/esx_identity/locales/it.lua +++ b/[core]/esx_identity/locales/it.lua @@ -1,4 +1,4 @@ -Locales["it"] = { +return { ["show_active_character"] = "Mostra Personaggio Attivo", ["active_character"] = "Personaggio Attivo: %s", ["error_active_character"] = "Errore nel recuperare i tuoi dati.", diff --git a/[core]/esx_identity/locales/nl.lua b/[core]/esx_identity/locales/nl.lua index 6cd862c62..a5bd00827 100644 --- a/[core]/esx_identity/locales/nl.lua +++ b/[core]/esx_identity/locales/nl.lua @@ -1,4 +1,4 @@ -Locales["nl"] = { +return { ["show_active_character"] = "Actieve karakter laten zien", ["active_character"] = "Actief karakter: %s", ["error_active_character"] = "Er is een probleem opgetreden tijdens het verzamelen van uw data.", diff --git a/[core]/esx_identity/locales/pl.lua b/[core]/esx_identity/locales/pl.lua index d10a79688..7f6551cb9 100644 --- a/[core]/esx_identity/locales/pl.lua +++ b/[core]/esx_identity/locales/pl.lua @@ -1,4 +1,4 @@ -Locales["pl"] = { +return { ["show_active_character"] = "Pokaż aktywną postać", ["active_character"] = "Aktywna postać: %s", ["error_active_character"] = "Podczas pobierania Twojego imienia wystąpił błąd. Proszę skontaktować się z administratorem.", diff --git a/[core]/esx_identity/locales/pt.lua b/[core]/esx_identity/locales/pt.lua index 52088df86..1d78f10d4 100644 --- a/[core]/esx_identity/locales/pt.lua +++ b/[core]/esx_identity/locales/pt.lua @@ -1,4 +1,4 @@ -Locales["pt"] = { +return { ["show_active_character"] = "Mostrar personagem ativa", ["active_character"] = "Personagem ativa: %s", ["error_active_character"] = "Houve um erro a obter os teus dados.", diff --git a/[core]/esx_identity/locales/sl.lua b/[core]/esx_identity/locales/sl.lua index 1d93aa7bf..cf4ad1e92 100644 --- a/[core]/esx_identity/locales/sl.lua +++ b/[core]/esx_identity/locales/sl.lua @@ -1,4 +1,4 @@ -Locales["sl"] = { +return { ["show_active_character"] = "Prikaži aktivnega lika", ["active_character"] = "Aktivni lik: %s", ["error_active_character"] = "Prišlo je do napake pri pridobivanju podatkov.", diff --git a/[core]/esx_identity/locales/sr.lua b/[core]/esx_identity/locales/sr.lua index 8cb37a22a..f34819e7a 100644 --- a/[core]/esx_identity/locales/sr.lua +++ b/[core]/esx_identity/locales/sr.lua @@ -1,4 +1,4 @@ -Locales["sr"] = { +return { ["show_active_character"] = "Prikazi karaktere", ["active_character"] = "Karakteri: %s", ["error_active_character"] = "Imamo problem sa ucitavanjem karaktera.", diff --git a/[core]/esx_identity/locales/sv.lua b/[core]/esx_identity/locales/sv.lua index 6c291d346..c298c85b5 100644 --- a/[core]/esx_identity/locales/sv.lua +++ b/[core]/esx_identity/locales/sv.lua @@ -1,4 +1,4 @@ -Locales["sv"] = { +return { ["show_active_character"] = "Visa aktiv karaktär", ["active_character"] = "Aktiv karaktär: %s", ["error_active_character"] = "Det blev ett fel med att ta din data.", diff --git a/[core]/esx_skin/locales/da.lua b/[core]/esx_skin/locales/da.lua index 4aee2f794..b799e3f87 100644 --- a/[core]/esx_skin/locales/da.lua +++ b/[core]/esx_skin/locales/da.lua @@ -1,4 +1,4 @@ -Locales["da"] = { +return { ["skin_menu"] = "Udseende Menu", ["use_rotate_view"] = "brug Q og E for at dreje kameraet.", ["skin"] = "skift udseende", diff --git a/[core]/esx_skin/locales/de.lua b/[core]/esx_skin/locales/de.lua index d92041a16..efc46293d 100644 --- a/[core]/esx_skin/locales/de.lua +++ b/[core]/esx_skin/locales/de.lua @@ -1,6 +1,6 @@ -Locales["de"] = { - ["skin_menu"] = "Skin Menü", - ["use_rotate_view"] = "Drücke Q oder E um deine Ansicht zu ändern.", - ["skin"] = "Aussehen ändern", - ["saveskin"] = "Aussehen abspeichern", - } +return { + ["skin_menu"] = "Skin Menü", + ["use_rotate_view"] = "Drücke Q oder E um deine Ansicht zu ändern.", + ["skin"] = "Aussehen ändern", + ["saveskin"] = "Aussehen abspeichern", +} diff --git a/[core]/esx_skin/locales/en.lua b/[core]/esx_skin/locales/en.lua index afc9581a4..a7a521625 100644 --- a/[core]/esx_skin/locales/en.lua +++ b/[core]/esx_skin/locales/en.lua @@ -1,4 +1,4 @@ -Locales["en"] = { +return { ["skin_menu"] = "Skin Menu", ["use_rotate_view"] = "use Q and E to rotate the view.", ["skin"] = "change skin", diff --git a/[core]/esx_skin/locales/es.lua b/[core]/esx_skin/locales/es.lua index 735c78fef..a34840ac7 100644 --- a/[core]/esx_skin/locales/es.lua +++ b/[core]/esx_skin/locales/es.lua @@ -1,4 +1,4 @@ -Locales["es"] = { +return { ["skin_menu"] = "Menú de apariencia", ["use_rotate_view"] = "Utiliza Q y E para rotar la vista.", ["skin"] = "Cambiar aspecto", diff --git a/[core]/esx_skin/locales/fi.lua b/[core]/esx_skin/locales/fi.lua index 7747dcc07..b6b342a1b 100644 --- a/[core]/esx_skin/locales/fi.lua +++ b/[core]/esx_skin/locales/fi.lua @@ -1,4 +1,4 @@ -Locales["fi"] = { +return { ["skin_menu"] = "Ulkonäkö", ["use_rotate_view"] = "Paina Q tai E liikutaaksesi kameraa.", ["skin"] = "Muokkaa ulkonäköä", diff --git a/[core]/esx_skin/locales/fr.lua b/[core]/esx_skin/locales/fr.lua index 44d3d4b25..7f5a5f85e 100644 --- a/[core]/esx_skin/locales/fr.lua +++ b/[core]/esx_skin/locales/fr.lua @@ -1,4 +1,4 @@ -Locales["fr"] = { +return { ["skin_menu"] = "menu de Skin", ["use_rotate_view"] = "utilisez Q et E pour tourner la vue.", ["skin"] = "changer de skin", diff --git a/[core]/esx_skin/locales/he.lua b/[core]/esx_skin/locales/he.lua index 6f750e075..6b24b452c 100644 --- a/[core]/esx_skin/locales/he.lua +++ b/[core]/esx_skin/locales/he.lua @@ -1,4 +1,4 @@ -Locales["he"] = { +return { ["skin_menu"] = "תפריט עור", ["use_rotate_view"] = "השתמש Q ו E כדי לסובב את התצוגה.", ["skin"] = "שנה עור", diff --git a/[core]/esx_skin/locales/hu.lua b/[core]/esx_skin/locales/hu.lua index a83ea9993..aa44c2518 100644 --- a/[core]/esx_skin/locales/hu.lua +++ b/[core]/esx_skin/locales/hu.lua @@ -1,4 +1,4 @@ -Locales["hu"] = { +return { ["skin_menu"] = "Kinézet Menü", ["use_rotate_view"] = "Használd Q vagy E gombokat a forgatáshoz", ["skin"] = "kinézet változtatása", diff --git a/[core]/esx_skin/locales/it.lua b/[core]/esx_skin/locales/it.lua index c6605e97d..7d20e777d 100644 --- a/[core]/esx_skin/locales/it.lua +++ b/[core]/esx_skin/locales/it.lua @@ -1,4 +1,4 @@ -Locales["it"] = { +return { ["skin_menu"] = "Menu Skin", ["use_rotate_view"] = "usa Q e E per ruotare la visuale.", ["skin"] = "cambia skin", diff --git a/[core]/esx_skin/locales/nl.lua b/[core]/esx_skin/locales/nl.lua index 1ec2b1d20..bf8c05432 100644 --- a/[core]/esx_skin/locales/nl.lua +++ b/[core]/esx_skin/locales/nl.lua @@ -1,4 +1,4 @@ -Locales["nl"] = { +return { ["skin_menu"] = "Kleding Menu", ["use_rotate_view"] = "gebruik Q en E om de camera te draaien.", ["skin"] = "verander outfit", diff --git a/[core]/esx_skin/locales/pl.lua b/[core]/esx_skin/locales/pl.lua index c12fe1393..0c3a33a0a 100644 --- a/[core]/esx_skin/locales/pl.lua +++ b/[core]/esx_skin/locales/pl.lua @@ -1,4 +1,4 @@ -Locales["pl"] = { +return { ["skin_menu"] = "menu wyglądu", ["use_rotate_view"] = "użyj Q i E aby obrócić ekran.", ["skin"] = "zmień wygląd", diff --git a/[core]/esx_skin/locales/pt.lua b/[core]/esx_skin/locales/pt.lua index 0109a66a2..f22e2faea 100644 --- a/[core]/esx_skin/locales/pt.lua +++ b/[core]/esx_skin/locales/pt.lua @@ -1,4 +1,4 @@ -Locales["pt"] = { +return { ["skin_menu"] = "Menu de Skin", ["use_rotate_view"] = "Usa Q e E para rodar a câmara.", ["skin"] = "alterar skin", diff --git a/[core]/esx_skin/locales/sl.lua b/[core]/esx_skin/locales/sl.lua index d2f3571cf..04ea3c3bb 100644 --- a/[core]/esx_skin/locales/sl.lua +++ b/[core]/esx_skin/locales/sl.lua @@ -1,4 +1,4 @@ -Locales["sl"] = { +return { ["skin_menu"] = "Oblacilni menu.", ["use_rotate_view"] = "Pritisni Q in E da se obracas s pogledom.", ["skin"] = "Zamenjaj Skin.", diff --git a/[core]/esx_skin/locales/sr.lua b/[core]/esx_skin/locales/sr.lua index 9d6ee01d5..03c55e475 100644 --- a/[core]/esx_skin/locales/sr.lua +++ b/[core]/esx_skin/locales/sr.lua @@ -1,4 +1,4 @@ -Locales["sr"] = { +return { ["skin_menu"] = "Skin Meni", ["use_rotate_view"] = "koristi Q i E da rotiras kameru.", ["skin"] = "promeni skin", diff --git a/[core]/esx_skin/locales/sv.lua b/[core]/esx_skin/locales/sv.lua index 1e14369ad..bf7b4d2d0 100644 --- a/[core]/esx_skin/locales/sv.lua +++ b/[core]/esx_skin/locales/sv.lua @@ -1,4 +1,4 @@ -Locales["sv"] = { +return { ["skin_menu"] = "Skin Meny", ["use_rotate_view"] = "Använd Q och E för att rotera.", ["skin"] = "Ända utseende", diff --git a/[core]/esx_skin/locales/zh-cn.lua b/[core]/esx_skin/locales/zh-cn.lua index c0402d436..52cc2339f 100644 --- a/[core]/esx_skin/locales/zh-cn.lua +++ b/[core]/esx_skin/locales/zh-cn.lua @@ -1,4 +1,4 @@ -Locales["zh-cn"] = { +return { ["skin_menu"] = "皮肤选单", ["use_rotate_view"] = "使用 Q 和 E 旋转镜头视角.", ["skin"] = "更换皮肤数据",