Skip to content

Commit

Permalink
Merge pull request #494 from Swellington-Soares/main
Browse files Browse the repository at this point in the history
Update multilanguage to target labels
  • Loading branch information
GhzGarage authored Jan 13, 2024
2 parents b8fd0bc + 113d74a commit 8a8ac7f
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
2 changes: 1 addition & 1 deletion client/anpr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ local function HandleSpeedCam(speedCam, radarID)
sprite = 488,
color = 1,
scale = 0.9,
text = 'Speed camera #' .. radarID .. ' - Marked vehicle'
text = Lang:t('info.camera_speed', { radarid = radarID})
}
local street1, street2 = table.unpack(GetStreetNameAtCoord(coords.x, coords.y, coords.z))
TriggerServerEvent('police:server:FlaggedPlateTriggered', radarID, plate, street1, street2, blipsettings)
Expand Down
15 changes: 8 additions & 7 deletions client/job.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ function TakeOutImpound(vehicle)
closeMenuFull()
TaskWarpPedIntoVehicle(PlayerPedId(), veh, -1)
TriggerEvent('vehiclekeys:client:SetOwner', QBCore.Functions.GetPlate(veh))
SetVehicleEngineOn(veh, true, true)
SetVehicleEngineOn(veh, true, true, true)
end, vehicle.plate)

end, vehicle.vehicle, coords, true)
end
end
Expand Down Expand Up @@ -699,7 +700,7 @@ if Config.UseTarget then
type = 'client',
event = 'qb-policejob:ToggleDuty',
icon = 'fas fa-sign-in-alt',
label = 'Sign In',
label = Lang:t('target.sign_in'),
jobType = 'leo',
},
},
Expand All @@ -719,7 +720,7 @@ if Config.UseTarget then
type = 'client',
event = 'qb-police:client:openStash',
icon = 'fas fa-dungeon',
label = 'Open Personal Stash',
label = Lang:t('target.open_personal_stash'),
jobType = 'leo',
},
},
Expand All @@ -739,7 +740,7 @@ if Config.UseTarget then
type = 'client',
event = 'qb-police:client:openTrash',
icon = 'fas fa-trash',
label = 'Open Trash',
label = Lang:t('target.open_trash'),
jobType = 'leo',
},
},
Expand All @@ -759,7 +760,7 @@ if Config.UseTarget then
type = 'client',
event = 'qb-police:client:scanFingerPrint',
icon = 'fas fa-fingerprint',
label = 'Open Fingerprint',
label = Lang:t('target.open_fingerprint'),
jobType = 'leo',
},
},
Expand All @@ -779,7 +780,7 @@ if Config.UseTarget then
type = 'client',
event = 'qb-police:client:openArmoury',
icon = 'fas fa-gun',
label = 'Open Armory',
label = Lang:t('target.open_armory'),
jobType = 'leo',
},
},
Expand All @@ -799,7 +800,7 @@ if Config.UseTarget then
type = 'client',
event = 'police:client:EvidenceStashDrawer',
icon = 'fas fa-dungeon',
label = 'Open Evidence Stash',
label = Lang:t('target.open_evidence_stash'),
jobType = 'leo',
},
},
Expand Down
16 changes: 13 additions & 3 deletions locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ local Translations = {
no_driver_license = 'No drivers license',
not_cuffed_dead = 'Civilian isn\'t cuffed or dead',
fine_yourself = 'You Cannot Fine Yourself',
not_online = "This person is not online"
not_online = 'This person is not online'
},
success = {
uncuffed = 'You have been uncuffed',
Expand All @@ -43,7 +43,7 @@ local Translations = {
vehicle_flagged = 'Vehicle %{plate} has been flagged for %{reason}',
impound_vehicle_removed = 'Vehicle taken out of impound!',
impounded = 'Vehicle impounded',
},
},
info = {
mr = 'Mr.',
mrs = 'Mrs.',
Expand Down Expand Up @@ -116,7 +116,9 @@ local Translations = {
new_call = 'New Call',
officer_down = 'Officer %{lastname} | %{callsign} Down',
fine_issued = 'Fine has been issued to offender succesfully',
received_fine = 'State Debt Recovery has automatically recovered the fines owed...'
received_fine = 'State Debt Recovery has automatically recovered the fines owed...',
camera_speed= 'Speed camera #%{radarid} - Marked vehicle'

},
evidence = {
red_hands = 'Red hands',
Expand Down Expand Up @@ -188,6 +190,14 @@ local Translations = {
remove_object = 'Removing object..',
impound = 'Impounding Vehicle..',
},
target = {
sign_in = 'Sign In/Out service',
open_personal_stash = 'Open Personal Stash',
open_trash = 'Open Trash',
open_fingerprint = 'Open Fingerprint',
open_armory = 'Open Armory',
open_evidence_stash = 'Open Evidence Stash',
}
}

Lang = Lang or Locale:new({
Expand Down
11 changes: 10 additions & 1 deletion locales/pt-br.lua
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ local Translations = {
new_call = 'Nova Chamada',
officer_down = 'Oficial %{lastname} | %{callsign} Ferido',
fine_issued = 'Multa foi emitida para o infrator com sucesso',
received_fine = 'A Central de Recuperação de Dívidas Estaduais recuperou automaticamente as multas pendentes...'
received_fine = 'A Central de Recuperação de Dívidas Estaduais recuperou automaticamente as multas pendentes...',
camera_speed= 'Camera do radar marcou o veículo #%{radarid}'
},
evidence = {
red_hands = 'Mãos vermelhas',
Expand Down Expand Up @@ -188,6 +189,14 @@ local Translations = {
remove_object = 'Removendo Objeto...',
impound = 'Apreendendo Veículo...',
},
target = {
sign_in = 'Entrada/Saída de serviço',
open_personal_stash = 'Abrir Compartimento Pessoal',
open_trash = 'Abrir Lixeira',
open_fingerprint = 'Abrir Impressão Digital',
open_armory = 'Abrir Arsenal',
open_evidence_stash = 'Abrir Esconderijo de Evidências',
}
}


Expand Down
4 changes: 1 addition & 3 deletions server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ QBCore.Commands.Add('unjail', Lang:t('commands.unjail_player'), { { name = 'id',
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if Player.PlayerData.job.type == 'leo' and Player.PlayerData.job.onduty then
local playerId = tonumber(args[1])
TriggerClientEvent('prison:client:UnjailPerson', playerId)
TriggerClientEvent('prison:client:UnjailPerson', tonumber(args[1]))
else
TriggerClientEvent('QBCore:Notify', src, Lang:t('error.on_duty_police_only'), 'error')
end
Expand Down Expand Up @@ -658,7 +657,6 @@ RegisterNetEvent('police:server:TakeOutImpound', function(plate, garage)
local playerCoords = GetEntityCoords(playerPed)
local targetCoords = Config.Locations['impound'][garage]
if #(playerCoords - targetCoords) > 10.0 then return DropPlayer(src, 'Attempted exploit abuse') end

MySQL.update('UPDATE player_vehicles SET state = ? WHERE plate = ?', { 0, plate })
TriggerClientEvent('QBCore:Notify', src, Lang:t('success.impound_vehicle_removed'), 'success')
end)
Expand Down

0 comments on commit 8a8ac7f

Please sign in to comment.