Merge pull request #579 from TonybynMp4/TonybynMp4-Translations

Add Joining Server Translations
This commit is contained in:
Kakarot
2022-04-13 05:31:20 -07:00
committed by GitHub
3 changed files with 23 additions and 10 deletions
+8 -2
View File
@@ -7,7 +7,10 @@ local Translations = {
no_access = 'No access to this command',
company_too_poor = 'Your employer is broke',
item_not_exist = 'Item does not exist',
too_heavy = 'Inventory too full'
too_heavy = 'Inventory too full',
duplicate_license = 'Duplicate Rockstar License Found',
no_valid_license = 'No Valid Rockstar License Found',
not_whitelisted = 'You\'re not whitelisted for this server'
},
success = {},
info = {
@@ -15,7 +18,10 @@ local Translations = {
job_info = 'Job: %{value} | Grade: %{value2} | Duty: %{value3}',
gang_info = 'Gang: %{value} | Grade: %{value2}',
on_duty = 'You are now on duty!',
off_duty = 'You are now off duty!'
off_duty = 'You are now off duty!',
checking_ban = 'Hello %s. We are checking if you are banned.',
join_server = 'Welcome %s to {Server Name}.',
checking_whitelisted = 'Hello %s. We are checking your allowance.'
}
}
+9 -2
View File
@@ -7,7 +7,10 @@ local Translations = {
no_access = 'Vous n\'avez pas accès à cette commande',
company_too_poor = 'Votre entreprise n\'a pas suffisamment d\'argent',
item_not_exist = 'L\'objet n\'existe pas',
too_heavy = 'L\'inventaire est plein'
too_heavy = 'L\'inventaire est plein',
duplicate_license = 'License Rockstar Dupliquée trouvée',
no_valid_license = 'Aucune License Rockstar trouvée',
not_whitelisted = "Vous n'êtes pas whitelist sur ce serveur"
},
success = {},
info = {
@@ -15,7 +18,11 @@ local Translations = {
job_info = 'Emplois: %{value} | Grade: %{value2} | Service: %{value3}',
gang_info = 'Gang: %{value} | Grade: %{value2}',
on_duty = 'Vous êtes désormais en service!',
off_duty = 'Vous n\'êtes plus en service!'
off_duty = 'Vous n\'êtes plus en service!',
checking_ban = 'Bonjour %s. Nous verifions si vous êtes banni.',
validatin_license = 'bonjour %s. Nous validons votre License Rockstar.',
join_server = 'Bienvenue %s sur {Server Name}.',
checking_whitelisted = 'Bonjour %s. Nous vérifions si vous êtes Whitelist.'
}
}
+6 -6
View File
@@ -34,7 +34,7 @@ local function onPlayerConnecting(name, setKickReason, deferrals)
end
end
deferrals.update(string.format('Hello %s. Validating Your Rockstar License', name))
deferrals.update(string.format(Lang:t('info.checking_ban'), name))
for _, v in pairs(identifiers) do
if string.find(v, 'license') then
@@ -46,7 +46,7 @@ local function onPlayerConnecting(name, setKickReason, deferrals)
-- Mandatory wait
Wait(2500)
deferrals.update(string.format('Hello %s. We are checking your allowance.', name))
deferrals.update(string.format(Lang:t('info.checking_whitelisted'), name))
local isBanned, Reason = QBCore.Functions.IsPlayerBanned(src)
local isLicenseAlreadyInUse = QBCore.Functions.IsLicenseInUse(license)
@@ -54,16 +54,16 @@ local function onPlayerConnecting(name, setKickReason, deferrals)
Wait(2500)
deferrals.update(string.format('Welcome %s to {Server Name}.', name))
deferrals.update(Lang:t('info.join_server'), name))
if not license then
deferrals.done('No Valid Rockstar License Found')
deferrals.done(Lang:t('error.no_valid_license'))
elseif isBanned then
deferrals.done(Reason)
elseif isLicenseAlreadyInUse and QBCore.Config.Server.CheckDuplicateLicense then
deferrals.done('Duplicate Rockstar License Found')
deferrals.done(Lang:t('error.duplicate_license'))
elseif isWhitelist and not whitelisted then
deferrals.done('You\'re not whitelisted for this server')
deferrals.done(Lang:t('error.not_whitelisted'))
else
deferrals.done()
if QBCore.Config.Server.UseConnectQueue then