mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 02:08:55 +00:00
Update Multi-Language Support
This commit is contained in:
+6
-6
@@ -850,7 +850,7 @@ function OpenGetStocksMenu()
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'stocks_menu',
|
||||
{
|
||||
title = 'Police Stock',
|
||||
title = _U('police_stock'),
|
||||
elements = elements
|
||||
},
|
||||
function(data, menu)
|
||||
@@ -860,14 +860,14 @@ function OpenGetStocksMenu()
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'stocks_menu_get_item_count',
|
||||
{
|
||||
title = 'Quantité'
|
||||
title = _U('quantity')
|
||||
},
|
||||
function(data2, menu2)
|
||||
|
||||
local count = tonumber(data2.value)
|
||||
|
||||
if count == nil then
|
||||
ESX.ShowNotification('Quantité invalide')
|
||||
ESX.ShowNotification(_U('quantity_invalid'))
|
||||
else
|
||||
menu2.close()
|
||||
menu.close()
|
||||
@@ -911,7 +911,7 @@ function OpenPutStocksMenu()
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'stocks_menu',
|
||||
{
|
||||
title = 'Inventaire',
|
||||
title = _U('inventory'),
|
||||
elements = elements
|
||||
},
|
||||
function(data, menu)
|
||||
@@ -921,14 +921,14 @@ function OpenPutStocksMenu()
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'stocks_menu_put_item_count',
|
||||
{
|
||||
title = 'Quantité'
|
||||
title = _U('quantity')
|
||||
},
|
||||
function(data2, menu2)
|
||||
|
||||
local count = tonumber(data2.value)
|
||||
|
||||
if count == nil then
|
||||
ESX.ShowNotification('Quantité invalide')
|
||||
ESX.ShowNotification(_U('quantity_invalid'))
|
||||
else
|
||||
menu2.close()
|
||||
menu.close()
|
||||
|
||||
@@ -69,6 +69,12 @@ Locales['en'] = {
|
||||
['invalid_amount'] = 'amount Invalid',
|
||||
['amount_of_deposit'] = 'amount of Deposit',
|
||||
['open_bossmenu'] = 'press ~INPUT_CONTEXT~ to open the menu',
|
||||
['quantity_invalid'] = 'invalid quantity',
|
||||
['have_withdraw'] = 'you have withdrawn x',
|
||||
['added'] = 'you added x',
|
||||
['quantity'] = 'quantity',
|
||||
['inventory'] = 'inventory',
|
||||
['police_stock'] = 'Police Stock',
|
||||
--Misc
|
||||
['remove_object'] = 'press ~INPUT_CONTEXT~ to delete the object',
|
||||
['map_blip'] = 'police Station',
|
||||
|
||||
@@ -69,6 +69,12 @@ Locales['fr'] = {
|
||||
['invalid_amount'] = 'montant invalide',
|
||||
['amount_of_deposit'] = 'montant du dépôt',
|
||||
['open_bossmenu'] = 'appuez sur ~INPUT_CONTEXT~ pour ouvrir le menu',
|
||||
['quantity_invalid'] = 'Quantité invalide',
|
||||
['have_withdrawn'] = 'Vous avez retiré x',
|
||||
['added'] = 'Vous avez ajouté x',
|
||||
['quantity'] = 'Quantité',
|
||||
['inventory'] = 'inventaire',
|
||||
['police_stock'] = 'Police Stock',
|
||||
--Misc
|
||||
['remove_object'] = 'appuez sur ~INPUT_CONTEXT~ pour enlever l\'objet',
|
||||
['map_blip'] = 'Commissariat',
|
||||
|
||||
+5
-5
@@ -6,7 +6,7 @@ if Config.MaxInService ~= -1 then
|
||||
TriggerEvent('esx_service:activateService', 'police', Config.MaxInService)
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'police', _('alert_police'), true, true)
|
||||
TriggerEvent('esx_phone:registerNumber', 'police', _U('alert_police'), true, true)
|
||||
|
||||
RegisterServerEvent('esx_policejob:giveWeapon')
|
||||
AddEventHandler('esx_policejob:giveWeapon', function(weapon, ammo)
|
||||
@@ -77,10 +77,10 @@ AddEventHandler('esx_policejob:getStockItem', function(itemName, count)
|
||||
inventory.removeItem(itemName, count)
|
||||
xPlayer.addInventoryItem(itemName, count)
|
||||
else
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, 'Quantité invalide')
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid'))
|
||||
end
|
||||
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, 'Vous avez retiré x' .. count .. ' ' .. item.label)
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('have_withdrawn') .. count .. ' ' .. item.label)
|
||||
|
||||
end)
|
||||
|
||||
@@ -99,10 +99,10 @@ AddEventHandler('esx_policejob:putStockItems', function(itemName, count)
|
||||
xPlayer.removeInventoryItem(itemName, count)
|
||||
inventory.addItem(itemName, count)
|
||||
else
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, 'Quantité invalide')
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('quantity_invalid'))
|
||||
end
|
||||
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, 'Vous avez ajouté x' .. count .. ' ' .. item.label)
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('added') .. count .. ' ' .. item.label)
|
||||
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user