Skip to content

Commit

Permalink
feat(gps): support "GPS" translations through locales (#123)
Browse files Browse the repository at this point in the history
Co-authored-by: Korioz <[email protected]>
  • Loading branch information
bitpredator and Korioz authored Nov 17, 2023
1 parent d5c6363 commit 3a65038
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 77 deletions.
30 changes: 15 additions & 15 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local Keys = {
Config = {}

-- LANGUAGE --
Config.Locale = 'fr'
Config.Locale = 'en'

-- GENERAL --
Config.MenuTitle = 'ServerName' -- change it to you're server name
Expand All @@ -33,16 +33,16 @@ Config.Controls = {

-- GPS --
Config.GPS = {
{label = 'Aucun', coords = nil},
{label = 'Poste de Police', coords = vector2(425.13, -979.55)},
{label = 'Garage Central', coords = vector2(-449.67, -340.83)},
{label = 'Hôpital', coords = vector2(-33.88, -1102.37)},
{label = 'Concessionnaire', coords = vector2(215.06, -791.56)},
{label = 'Benny\'s Custom', coords = vector2(-212.13, -1325.27)},
{label = 'Pôle Emploie', coords = vector2(-264.83, -964.54)},
{label = 'Auto école', coords = vector2(-829.22, -696.99)},
{label = 'Téquila-la', coords = vector2(-565.09, 273.45)},
{label = 'Bahama Mamas', coords = vector2(-1391.06, -590.34)}
{label = _U('none'), coords = nil},
{label = _U('police_station'), coords = vector2(425.13, -979.55)},
{label = _U('central_garage'), coords = vector2(-449.67, -340.83)},
{label = _U('hospital'), coords = vector2(-33.88, -1102.37)},
{label = _U('dealer'), coords = vector2(215.06, -791.56)},
{label = _U('bennys_custom'), coords = vector2(-212.13, -1325.27)},
{label = _U('job_center'), coords = vector2(-264.83, -964.54)},
{label = _U('driving_school'), coords = vector2(-829.22, -696.99)},
{label = _U('tequila-la'), coords = vector2(-565.09, 273.45)},
{label = _U('bahama_mamas'), coords = vector2(-1391.06, -590.34)}
}

-- VOICE --
Expand Down Expand Up @@ -220,7 +220,7 @@ Config.Admin = {

if plyId ~= nil then
plyId = tonumber(plyId)

if type(plyId) == 'number' then
TriggerServerEvent('krz_personalmenu:Admin_BringS', GetPlayerServerId(PlayerId()), plyId)
end
Expand All @@ -238,7 +238,7 @@ Config.Admin = {

if plyId ~= nil then
plyId = tonumber(plyId)

if type(plyId) == 'number' then
TriggerServerEvent('krz_personalmenu:Admin_BringS', plyId, GetPlayerServerId(PlayerId()))
end
Expand All @@ -256,7 +256,7 @@ Config.Admin = {

if pos ~= nil and pos ~= '' then
local _, _, x, y, z = string.find(pos, '([%d%.]+) ([%d%.]+) ([%d%.]+)')

if x ~= nil and y ~= nil and z ~= nil then
SetEntityCoords(plyPed, x + .0, y + .0, z + .0)
end
Expand Down Expand Up @@ -489,7 +489,7 @@ Config.Admin = {

if plyId ~= nil then
plyId = tonumber(plyId)

if type(plyId) == 'number' then
TriggerServerEvent('esx_ambulancejob:revive', plyId)
end
Expand Down
23 changes: 13 additions & 10 deletions locales/br.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ Locales['br'] = {
['gave_ammo'] = 'Você deu x%s munições para %s',
['no_ammo'] = 'Você não tem munição',
['not_enough_ammo'] = 'Você não tem tantas munições',

['accessories_no_ears'] = 'Vous ne possédez pas d\'Accessoire d\'Oreilles',
['accessories_no_glasses'] = 'Você não tem um óculos',
['accessories_no_helmet'] = 'Você não tem um capacete / chapéu',
['accessories_no_mask'] = 'Você não tem uma máscara',

['admin_noclipon'] = 'NoClip ~g~ativado',
['admin_noclipoff'] = 'NoClip ~r~desativado',
['admin_godmodeon'] = 'Godmod ~g~ativado',
Expand Down Expand Up @@ -114,14 +112,12 @@ Locales['br'] = {
['animation_party_rock'] = 'Rock\'n\'roll',
['animation_party_drunk'] = 'Bourré sur place',
['animation_party_vomit'] = 'Vômito de carro ',

['animation_salute_title'] = 'Saudações',
['animation_salute_saluate'] = 'Cumprimentar',
['animation_salute_serrer'] = 'Apertar as mãos',
['animation_salute_tchek'] = 'Eae mano!',
['animation_salute_bandit'] = 'Cumprimentar de Bandido',
['animation_salute_military'] = 'Cumprimentar de Militar',

['animation_work_title'] = 'Trabalhar',
['animation_work_suspect'] = 'Se render',
['animation_work_fisherman'] = 'Pescador',
Expand All @@ -141,7 +137,6 @@ Locales['br'] = {
['animation_work_hammer'] = 'Variados : Martelar paredes',
['animation_work_beg'] = 'SDF : Esmola',
['animation_work_statue'] = 'SDF : Estátua',

['animation_mood_title'] = 'Humor',
['animation_mood_felicitate'] = 'Palmas',
['animation_mood_nice'] = 'Joinha',
Expand All @@ -162,14 +157,12 @@ Locales['br'] = {
['animation_mood_fuckyou'] = 'Foda-se',
['animation_mood_wanker'] = 'Punheta',
['animation_mood_suicide'] = 'Suicídio',

['animation_sports_title'] = 'Esportes',
['animation_sports_muscle'] = 'Mostrar músculos',
['animation_sports_weightbar'] = 'Levantar barra de musculação',
['animation_sports_pushup'] = 'Faire des pompes',
['animation_sports_abs'] = 'Faire des abdos',
['animation_sports_yoga'] = 'Faire du yoga',

['animation_other_title'] = 'Variados',
['animation_other_sit'] = 'Sauce',
['animation_other_waitwall'] = 'Encostado fumando um cigarro',
Expand All @@ -180,7 +173,6 @@ Locales['br'] = {
['animation_other_search'] = 'Position de Fouille',
['animation_other_selfie'] = 'Tirar uma selfie',
['animation_other_door'] = 'Escutar uma porta',

['animation_pegi_title'] = 'PEGI 21',
['animation_pegi_hsuck'] = 'Boquete no carro',
['animation_pegi_fsuck'] = 'Femme suc** en voiture',
Expand All @@ -193,7 +185,6 @@ Locales['br'] = {
['animation_pegi_strip1'] = 'Strip Tease 1',
['animation_pegi_strip2'] = 'Strip Tease 2',
['animation_pegi_stripfloor'] = 'Strip Tease au sol',

['animation_attitudes_title'] = 'Estilo de andar',

-- Vehicle Menu
Expand Down Expand Up @@ -242,5 +233,17 @@ Locales['br'] = {
['admin_tpmarker_button'] = 'Teleporte para a localização marcada',
['admin_revive_button'] = 'Reviver jogador',
['admin_changeskin_button'] = 'Mudar aparência',
['admin_saveskin_button'] = 'Salvar aparência'
['admin_saveskin_button'] = 'Salvar aparência',

-- GPS
['none'] = 'No Location', -- No translated
['police_station'] = 'Police Station', -- No translated
['central_garage'] = 'Central garage', -- No translated
['hospital'] = 'Hospital', -- No translated
['dealer'] = 'Cardealer', -- No translated
['bennys_custom'] = 'Bennys Custom', -- No translated
['job_center'] = 'Employment center', -- No translated
['driving_school'] = 'Driving school', -- No translated
['tequila-la'] = 'tequila-la', -- No translated
['bahama_mamas'] = 'bahama_mamas' -- No translated
}
25 changes: 13 additions & 12 deletions locales/de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ Locales['de'] = {
['gave_ammo'] = 'Du hast x %s Munition an %s gegeben',
['no_ammo'] = 'Du hast keine Munition',
['not_enough_ammo'] = 'Du hast nicht so viel Munition',

['accessories_no_ears'] = 'Du hast kein Ohr Zubehör',
['accessories_no_glasses'] = 'Du hast keine Brille',
['accessories_no_helmet'] = 'Du hast keinen Helm/Hut',
['accessories_no_mask'] = 'Du hast keine Maske',

['admin_noclipon'] = 'NoClip ~g~ aktiviert',
['admin_noclipoff'] = 'NoClip ~r~ deaktiviert',
['admin_godmodeon'] = 'Invincible ~g~ aktiviert',
Expand Down Expand Up @@ -114,14 +112,12 @@ Locales['de'] = {
['animation_party_rock'] = 'Rock n roll',
['animation_party_drunk'] = 'Stuck on the spot',
['animation_party_vomit'] = 'Vomit by car',

['animation_salute_title'] = 'Greetings',
['animation_salute_saluate'] = 'Greet',
['animation_salute_serrer'] = 'Shake hands',
['animation_salute_tchek'] = 'Chek',
['animation_salute_bandit'] = 'Hi bandit',
['animation_salute_military'] = 'Hi Military',

['animation_work_title'] = 'Work',
['animation_work_suspect'] = 'surrender',
['animation_work_fisherman'] = 'Fisherman',
Expand All @@ -141,7 +137,6 @@ Locales['de'] = {
['animation_work_hammer'] = 'All: Hammer blow',
['animation_work_beg'] = 'SDF: Make the round',
['animation_work_statue'] = 'SDF: Make the statue',

['animation_mood_title'] = 'Moods',
['animation_mood_felicitate'] = 'Congratulate',
['animation_mood_nice'] = 'Super',
Expand All @@ -162,14 +157,12 @@ Locales['de'] = {
['animation_mood_fuckyou'] = 'Finger of Honor',
['animation_mood_wanker'] = 'Wanker',
['animation_mood_suicide'] = 'Ball in the head',

['animation_sports_title'] = 'Sports',
['animation_sports_muscle'] = 'Show your muscles',
['animation_sports_weightbar'] = 'Weight bar',
['animation_sports_pushup'] = 'Make pumps',
['animation_sports_abs'] = 'Make abs',
['animation_sports_yoga'] = 'Do yoga',

['animation_other_title'] = 'Miscellaneous',
['animation_other_sit'] = 'Sit ',
['animation_other_waitwall'] = 'Wait against a wall',
Expand All @@ -180,7 +173,6 @@ Locales['de'] = {
['animation_other_search'] = 'Search Position',
['animation_other_selfie'] = 'Take a selfie',
['animation_other_door'] = 'Listen to a door',

['animation_pegi_title'] = 'PEGI 21',
['animation_pegi_hsuck'] = 'Man getting sucked in the car',
['animation_pegi_fsuck'] = 'Woman sucks in the car',
Expand All @@ -193,7 +185,6 @@ Locales['de'] = {
['animation_pegi_strip1'] = 'Strip Tease 1',
['animation_pegi_strip2'] = 'Strip Tease 2',
['animation_pegi_stripfloor'] = 'Strip Tease on the ground',

['animation_attitudes_title'] = 'Approach',

-- Vehicle Menu
Expand All @@ -208,7 +199,6 @@ Locales['de'] = {
['vehicle_door_backright'] = 'Hinten Rechts',

-- Boss Management Menu

['bossmanagement_title'] = 'Firmen Managment',
['bossmanagement_chest_button'] = 'Tresor: ',
['bossmanagement_hire_button'] = 'Einstellen',
Expand All @@ -217,7 +207,6 @@ Locales['de'] = {
['bossmanagement_demote_button'] = 'Degradieren',

-- Boss Management 2 Menu

['bossmanagement2_title'] = 'Organisation Management',
['bossmanagement2_chest_button'] = 'Organisation Truhe:',
['bossmanagement2_hire_button'] = 'Einstellen',
Expand All @@ -244,5 +233,17 @@ Locales['de'] = {
['admin_tpmarker_button'] = 'Zur Markierung teleportieren',
['admin_revive_button'] = 'Spieler wiederbeleben',
['admin_changeskin_button'] = 'Aussehen ändern',
['admin_saveskin_button'] = 'Aussehen speichern'
['admin_saveskin_button'] = 'Aussehen speichern',

-- GPS
['none'] = 'No Location', -- No translated
['police_station'] = 'Police Station', -- No translated
['central_garage'] = 'Central garage', -- No translated
['hospital'] = 'Hospital', -- No translated
['dealer'] = 'Cardealer', -- No translated
['bennys_custom'] = 'Bennys Custom', -- No translated
['job_center'] = 'Employment center', -- No translated
['driving_school'] = 'Driving school', -- No translated
['tequila-la'] = 'tequila-la', -- No translated
['bahama_mamas'] = 'bahama_mamas' -- No translated
}
26 changes: 13 additions & 13 deletions locales/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@ Locales['en'] = {
['gave_ammo'] = 'You have given x %s ammo to %s',
['no_ammo'] = 'You do not have any ammo',
['not_enough_ammo'] = 'You do not have as many ammo',

['accessories_no_ears'] = 'You do not have an Ear Accessory',
['accessories_no_glasses'] = 'You do not have glasses',
['accessories_no_helmet'] = 'You do not have a Helmet / Hat',
['accessories_no_mask'] = 'You do not have a mask',

['admin_noclipon'] = 'NoClip ~g~ enabled',
['admin_noclipoff'] = 'NoClip ~r~ disabled',
['admin_godmodeon'] = 'Invincible ~g~ enabled',
Expand Down Expand Up @@ -102,7 +100,6 @@ Locales['en'] = {

-- Animation Menu
['animation_title'] = 'Animations',

['animation_party_title'] = 'Festivals',
['animation_party_smoke'] = 'Smoking a cigarette',
['animation_party_playsong'] = 'Play music',
Expand All @@ -114,14 +111,12 @@ Locales['en'] = {
['animation_party_rock'] = 'Rock n roll',
['animation_party_drunk'] = 'Stuck on the spot',
['animation_party_vomit'] = 'Vomit by car',

['animation_salute_title'] = 'Greetings',
['animation_salute_saluate'] = 'Greet',
['animation_salute_serrer'] = 'Shake hands',
['animation_salute_tchek'] = 'Chek',
['animation_salute_bandit'] = 'Hi bandit',
['animation_salute_military'] = 'Hi Military',

['animation_work_title'] = 'Work',
['animation_work_suspect'] = 'surrender',
['animation_work_fisherman'] = 'Fisherman',
Expand All @@ -141,7 +136,6 @@ Locales['en'] = {
['animation_work_hammer'] = 'All: Hammer blow',
['animation_work_beg'] = 'SDF: Make the round',
['animation_work_statue'] = 'SDF: Make the statue',

['animation_mood_title'] = 'Moods',
['animation_mood_felicitate'] = 'Congratulate',
['animation_mood_nice'] = 'Super',
Expand All @@ -162,14 +156,12 @@ Locales['en'] = {
['animation_mood_fuckyou'] = 'Finger of Honor',
['animation_mood_wanker'] = 'Wanker',
['animation_mood_suicide'] = 'Ball in the head',

['animation_sports_title'] = 'Sports',
['animation_sports_muscle'] = 'Show your muscles',
['animation_sports_weightbar'] = 'Weight bar',
['animation_sports_pushup'] = 'Make pumps',
['animation_sports_abs'] = 'Make abs',
['animation_sports_yoga'] = 'Do yoga',

['animation_other_title'] = 'Miscellaneous',
['animation_other_sit'] = 'Sit ',
['animation_other_waitwall'] = 'Wait against a wall',
Expand All @@ -180,7 +172,6 @@ Locales['en'] = {
['animation_other_search'] = 'Search Position',
['animation_other_selfie'] = 'Take a selfie',
['animation_other_door'] = 'Listen to a door',

['animation_pegi_title'] = 'PEGI 21',
['animation_pegi_hsuck'] = 'Man getting sucked in the car',
['animation_pegi_fsuck'] = 'Woman sucks in the car',
Expand All @@ -193,7 +184,6 @@ Locales['en'] = {
['animation_pegi_strip1'] = 'Strip Tease 1',
['animation_pegi_strip2'] = 'Strip Tease 2',
['animation_pegi_stripfloor'] = 'Strip Tease on the ground',

['animation_attitudes_title'] = 'Approach',

-- Vehicle Menu
Expand All @@ -208,7 +198,6 @@ Locales['en'] = {
['vehicle_door_backright'] = 'Rear Right',

-- Boss Management Menu

['bossmanagement_title'] = 'Company Management',
['bossmanagement_chest_button'] = 'Company Safe:',
['bossmanagement_hire_button'] = 'Recruit',
Expand All @@ -217,7 +206,6 @@ Locales['en'] = {
['bossmanagement_demote_button'] = 'Demote',

-- Boss Management 2 Menu

['bossmanagement2_title'] = 'Organization Management',
['bossmanagement2_chest_button'] = 'Organization Chest:',
['bossmanagement2_hire_button'] = 'Recruit',
Expand All @@ -244,5 +232,17 @@ Locales['en'] = {
['admin_tpmarker_button'] = 'TP on the Marker',
['admin_revive_button'] = 'Revive a Player',
['admin_changeskin_button'] = 'Change Appearance',
['admin_saveskin_button'] = 'Save Appearance'
['admin_saveskin_button'] = 'Save Appearance',

-- GPS
['none'] = 'No Location',
['police_station'] = 'Police Station',
['central_garage'] = 'Central garage',
['hospital'] = 'Hospital',
['dealer'] = 'Cardealer',
['bennys_custom'] = 'Bennys Custom',
['job_center'] = 'Employment center',
['driving_school'] = 'Driving school',
['tequila-la'] = 'tequila-la',
['bahama_mamas'] = 'bahama_mamas'
}
Loading

0 comments on commit 3a65038

Please sign in to comment.