From 71e9dc8294ec1dd15e60a3a404adc8976fde50e6 Mon Sep 17 00:00:00 2001 From: AdrineX Date: Sun, 3 Sep 2017 15:04:28 +0300 Subject: [PATCH 1/2] Chest to menu --- client/main.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 1f9064cc..48031430 100644 --- a/client/main.lua +++ b/client/main.lua @@ -124,7 +124,9 @@ end function OpenTaxiActionsMenu() local elements = { - {label = _U('spawn_veh'), value = 'spawn_vehicle'} + {label = _U('spawn_veh'), value = 'spawn_vehicle'}, + {label = 'Déposer Stock', value = 'put_stock'}, + {label = 'Prendre Stock', value = 'get_stock'} } if Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.grade_name == 'boss' then From e819ce31c2c4646baae663585f0441ad90b91c9b Mon Sep 17 00:00:00 2001 From: nearbyplayer Date: Sun, 3 Sep 2017 15:57:56 -0400 Subject: [PATCH 2/2] Update Translations --- client/main.lua | 18 +++++++++--------- locales/en.lua | 10 ++++++++++ locales/fr.lua | 10 ++++++++++ server/main.lua | 10 +++++----- 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/client/main.lua b/client/main.lua index 48031430..0e45ed9e 100644 --- a/client/main.lua +++ b/client/main.lua @@ -117,7 +117,7 @@ function StopTaxiJob() OnJob = false - DrawSub('Mission terminée', 5000) + DrawSub(_U('mission_complete'), 5000) end @@ -125,12 +125,12 @@ function OpenTaxiActionsMenu() local elements = { {label = _U('spawn_veh'), value = 'spawn_vehicle'}, - {label = 'Déposer Stock', value = 'put_stock'}, - {label = 'Prendre Stock', value = 'get_stock'} + {label = _U('deposit_stock'), value = 'put_stock'}, + {label = _U('take_stock'), value = 'get_stock'} } if Config.EnablePlayerManagement and PlayerData.job ~= nil and PlayerData.job.grade_name == 'boss' then - table.insert(elements, {label = 'Action Patron', value = 'boss_actions'}) + table.insert(elements, {label = _U('boss_actions'), value = 'boss_actions'}) end ESX.UI.Menu.CloseAll() @@ -291,14 +291,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() @@ -342,7 +342,7 @@ function OpenPutStocksMenu() ESX.UI.Menu.Open( 'default', GetCurrentResourceName(), 'stocks_menu', { - title = 'Inventaire', + title = _U('inventory'), elements = elements }, function(data, menu) @@ -352,14 +352,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() diff --git a/locales/en.lua b/locales/en.lua index 754bf8af..74eccd5d 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -28,5 +28,15 @@ Locales['en'] = { ['must_in_vehicle'] = 'you must be in a vehicle to begin the mission', ['have_earned'] = 'you have earned ~g~$', ['comp_earned'] = 'your company has earned ~g~$', + ['deposit_stock'] = 'deposit Stock', + ['take_stock'] = 'take Stock', + ['boss_actions'] = 'boss Actions', + ['mission_complete'] = 'mission Completed', + ['quantity'] = 'quantity', + ['quantity_invalid'] = 'invalid Quantity', + ['inventory'] = 'inventory', + ['taxi_client'] = 'taxi Client', + ['have_withdrawn'] = 'you have withdrawn x', + ['added'] = 'you added x', } diff --git a/locales/fr.lua b/locales/fr.lua index cad6a5ff..fe238144 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -28,5 +28,15 @@ Locales['fr'] = { ['must_in_vehicle'] = 'vous devez être dans un véhicule pour commencer la mission', ['have_earned'] = 'vous avez gagné ~g~$', ['comp_earned'] = 'votre société a gagné ~g~$', + ['deposit_stock'] = 'Déposer Stock', + ['take_stock'] = 'Prendre Stock', + ['boss_actions'] = 'action Patron', + ['mission_complete'] = 'Mission terminée', + ['quantity'] = 'Quantité', + ['quantity_invalid'] = 'Quantité invalide', + ['inventory'] = 'Inventaire', + ['taxi_client'] = 'client Taxi', + ['have_withdrawn'] = 'Vous avez retiré x', + ['added'] = 'Vous avez ajouté x', } diff --git a/server/main.lua b/server/main.lua index df8b4877..9b8a8af3 100644 --- a/server/main.lua +++ b/server/main.lua @@ -6,7 +6,7 @@ if Config.MaxInService ~= -1 then TriggerEvent('esx_service:activateService', 'taxi', Config.MaxInService) end -TriggerEvent('esx_phone:registerNumber', 'taxi', 'Client taxi', true, true) +TriggerEvent('esx_phone:registerNumber', 'taxi', _U('taxi_client'), true, true) RegisterServerEvent('esx_taxijob:success') AddEventHandler('esx_taxijob:success', function() @@ -58,10 +58,10 @@ AddEventHandler('esx_taxijob: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) @@ -88,10 +88,10 @@ AddEventHandler('esx_taxijob: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)