Skip to content

Commit

Permalink
added punctuation marks validation, fixed errors
Browse files Browse the repository at this point in the history
piterson05 committed Sep 9, 2023
1 parent aa6a402 commit 9b58f5c
Showing 8 changed files with 96 additions and 93 deletions.
16 changes: 8 additions & 8 deletions banking.xml
Original file line number Diff line number Diff line change
@@ -284,9 +284,9 @@
<String xml:lang="tr-TR">Sahip değilsin ~r~yeterli ~s~paraya!</String>
<String xml:lang="zh-Hant">您的~r~存款不足~s~.</String>
<String xml:lang="zh-Hans">您的~r~存款不足~s~.</String>
<String xml:lang="es-ES">!No tienes saldo ~r~suficientes ~s~!</String>
<String xml:lang="es-ES">!No tienes saldo ~r~suficientes~s~!</String>
<String xml:lang="ar-001">ليس لديك ~r~كافيه ~s~نقود!</String>
<String xml:lang="pt-BR">Você não tem saldos ~r~suficientes ~s~!</String>
<String xml:lang="pt-BR">Você não tem saldos ~r~suficientes~s~!</String>
</Entry>

<Entry Id="atm_invalid_amount">
@@ -299,9 +299,9 @@
<String xml:lang="tr-TR">Girdin ~r~geçersiz ~s~miktar!</String>
<String xml:lang="zh-Hant">您輸入的金額~r~無效~s~!</String>
<String xml:lang="zh-Hans">您输入的金额~r~无效~s~!</String>
<String xml:lang="es-ES">¡Has ingresado una ~s~cantidad ~r~inválida ~s~!</String>
<String xml:lang="es-ES">¡Has ingresado una ~s~cantidad ~r~inválida~s~!</String>
<String xml:lang="ar-001">قمت بإدخال ~r~غير صالح ~s~مبلغ!</String>
<String xml:lang="pt-BR">Você digitou um valor ~r~inválido ~s~!</String>
<String xml:lang="pt-BR">Você digitou um valor ~r~inválido~s~!</String>
</Entry>

<Entry Id="atm_cant_pay_fee">
@@ -357,8 +357,8 @@
<String xml:lang="fr-FR">~r~Tu ne peux pas déposer moins de ~s~{0} ~r~par transaction.</String>
<String xml:lang="pl-PL">~r~Nie możesz wpłacić mniej niż ~s~{0} ~r~na transakcję.</String>
<String xml:lang="tr-TR">~r~Şundan daha az para yatıramazsınız ~s~{0} ~r~işlem başına.</String>
<String xml:lang="zh-Hant">~r~您一次存入的金額不能少於 ~s~{0} ~r~.</String>
<String xml:lang="zh-Hans">~r~您一次存入的金额不能少于 ~s~{0} ~r~.</String>
<String xml:lang="zh-Hant">~r~您一次存入的金額不能少於 ~s~{0}~r~.</String>
<String xml:lang="zh-Hans">~r~您一次存入的金额不能少于 ~s~{0}~r~.</String>
<String xml:lang="es-ES">~r~No puedes depositar menos de ~s~{0} ~r~a la vez.</String>
<String xml:lang="ar-001">~r~لا يمكنك إيداع أقل من ~s~{0} ~r~في المره الواحده.</String>
<String xml:lang="pt-BR">~r~Você não pode depositar menos de ~s~{0} ~r~de uma só vez.</String>
@@ -372,8 +372,8 @@
<String xml:lang="fr-FR">~r~Tu ne peux déposer que ~s~{0} ~r~par transaction.</String>
<String xml:lang="pl-PL">~r~Nie możesz wpłacić więcej niż ~s~{0} ~r~na transakcję.</String>
<String xml:lang="tr-TR">~r~Şundan fazla para yatıramazsınız ~s~{0} ~r~işlem başına.</String>
<String xml:lang="zh-Hant">~r~一次只能存入~s~{0} ~r~.</String>
<String xml:lang="zh-Hans">~r~一次只能存入~s~{0} ~r~.</String>
<String xml:lang="zh-Hant">~r~一次只能存入~s~{0}~r~.</String>
<String xml:lang="zh-Hans">~r~一次只能存入~s~{0}~r~.</String>
<String xml:lang="es-ES">~r~Solo puedes depositar ~s~{0} ~r~a la vez.</String>
<String xml:lang="ar-001">~r~يمكنك إيداع فقط ~s~{0} ~r~في المره الواحده.</String>
<String xml:lang="pt-BR">~r~Você só pode depositar ~s~{0} ~r~por vez.</String>
10 changes: 5 additions & 5 deletions chatnotifications.xml
Original file line number Diff line number Diff line change
@@ -44,8 +44,8 @@
<String xml:lang="fr-FR">Visite notre wiki communautaire sur ~b~gtacnr.fandom.com ~s~pour un ~y~dguide complet ~s~du jeu.</String>
<String xml:lang="pl-PL">Zobacz nasz Fandom na ~b~gtacnr.fandom.com ~s~dla ~y~zdetalowanego poradnika ~s~po grze.</String>
<String xml:lang="ar-001">قم بزيارة موقع wiki الخاص بمجتمعنا علي ~b~gtacnr.fandom.com ~s~ل ~y~دليل مفصل ~s~لشرح اللعبه.</String>
<String xml:lang="zh-Hant">請訪問我們的維基百科 ~b~gtacnr.fandom.com ~s~獲取遊戲的 ~y~詳細指南 ~s~.</String>
<String xml:lang="zh-Hans">请访问我们的维基百科 ~b~gtacnr.fandom.com ~s~获取游戏的 ~y~详细指南 ~s~.</String>
<String xml:lang="zh-Hant">請訪問我們的維基百科 ~b~gtacnr.fandom.com ~s~獲取遊戲的 ~y~詳細指南~s~.</String>
<String xml:lang="zh-Hans">请访问我们的维基百科 ~b~gtacnr.fandom.com ~s~获取游戏的 ~y~详细指南~s~.</String>
<String xml:lang="pt-BR">Visite nossa comunidade Wiki em ~b~gtacnr.fandom.com ~s~para obter um ~y~guia detalhado ~s~do nosso jogo.</String>
</Entry>

@@ -89,13 +89,13 @@
<String xml:lang="nl-NL">~y~~h~Let op~h~~s~: Je had {0} wapens verloren, mogelijk door een hacker, maar (C)GTA CnR Shield(/C) heeft ze voor je ~g~hersteld~s~.</String>
<String xml:lang="tr-TR">~y~~h~Uyarı~h~~s~: Kaybetmiştin {0} silahları, muhtemelen bir dolandırıcı tarafından yapılmıştır, ancak (C)GTA CnR Shield(/C) ~g~restore edildi ~s~senin için.</String>
<String xml:lang="de-DE">~y~~h~Achtung~h~~s~: Du hast {0} Waffen verloren, möglicherweise durch einen Cheater, aber das (C)GTA CnR Shield(/C) hat sie für dich ~g~wiederhergestellt~s~.</String>
<String xml:lang="es-ES">~y~~h~Advertencia~h~~s~: Habías perdido {0} armas, posiblemente por culpa de un hacker, pero (C)GTA CnR Shield(/C) ~g~te las devolvio ~s~!.</String>
<String xml:lang="es-ES">~y~~h~Advertencia~h~~s~: Habías perdido {0} armas, posiblemente por culpa de un hacker, pero (C)GTA CnR Shield(/C) ~g~te las devolvio~s~.</String>
<String xml:lang="fr-FR">~y~~h~Avertissement~h~~s~: Tu as perdu {0} armes, possiblement à cause d'un cheater, mais notre (C)GTA CnR Shield(/C) ~g~a restauré ~s~tes armes perdues.</String>
<String xml:lang="pl-PL">~y~~h~Uwaga~h~~s~: Utraciłeś {0} broni, prawdopodobnie usunął je oszust, ale (C)GTA CnR Shield(/C) ~g~przywróciła ~s~je dla ciebie.</String>
<String xml:lang="ar-001">~y~~h~تحذير~h~~s~: لقد خسرت {0} أسلحة, ربما قام بغشاش أضافتهم الي حسابك ، و لكن (C)GTA CnR Shield(/C) ~g~رجعها ~s~لك.</String>
<String xml:lang="zh-Hant">~y~~h~警告~h~~s~:你丟失了{0} 個武器,可能是作弊者所為,但是(C)GTA CnR Shield(/C) ~g~為你恢復了~s~ 它們.</String>
<String xml:lang="zh-Hans">~y~~h~警告~h~~s~:你丢失了{0} 个武器,可能是作弊者所为,但是(C)GTA CnR Shield(/C) ~g~为你恢复了~s~ 它们.</String>
<String xml:lang="pt-BR">~y~~h~Advertência~h~~s~: Você havia perdido {0} armas , possivelmente por culpa de um hacker, mas (C)GTA CnR Shield(/C) ~g~ele os devolveu a você ~s~!.</String>
<String xml:lang="pt-BR">~y~~h~Advertência~h~~s~: Você havia perdido {0} armas, possivelmente por culpa de um hacker, mas (C)GTA CnR Shield(/C) ~g~ele os devolveu a você~s~.</String>
</Entry>

<!-- {0} = Removed weapons -->
@@ -105,7 +105,7 @@
<String xml:lang="nl-NL">~y~~h~Let op~h~~s~: Je had {0} ongeautoriseerde wapens, mogelijk ingespawnt door een hacker om je in problemen te krigen, maar (C)GTA CnR Shield(/C) heeft ze voor je ~r~weggehaald~s~.</String>
<String xml:lang="tr-TR">~y~~h~Uyarı~h~~s~: Sende vardı {0} yetkisiz silahlar, muhtemelen başınızı belaya sokmak için bir dolandırıcı tarafından yaratılmıştır, ancak (C)GTA CnR Shield(/C) ~r~kaldırıldı ~s~senin için.</String>
<String xml:lang="de-DE">~y~~h~Achtung~h~~s~: Du hast {0} unerlaubte Waffe, möglicherweise durch einen Cheater, um dich in Schwierigkeiten zu bringen, aber das (C)GTA CnR Shield(/C) hat sie für dich ~r~entfernt~s~.</String>
<String xml:lang="es-ES">~y~~h~Advertencia~h~~s~: Usted tenia {0} armas que no estan permitidas en el servidor, posiblemente un hacker te las a puesto para meterte en problemas, pero (C)GTA CnR Shield(/C) ~r~las a retirado ~s~de tu inventario .</String>
<String xml:lang="es-ES">~y~~h~Advertencia~h~~s~: Usted tenia {0} armas que no estan permitidas en el servidor, posiblemente un hacker te las a puesto para meterte en problemas, pero (C)GTA CnR Shield(/C) ~r~las a retirado ~s~de tu inventario.</String>
<String xml:lang="fr-FR">~y~~h~Avertissement~h~~s~: Tu avais {0} armes interdites, possiblement à cause d'un cheater pour te causer du tord, mais notre (C)GTA CnR Shield(/C) les a ~r~retirées ~s~pour toi.</String>
<String xml:lang="pl-PL">~y~~h~Uwaga~h~~s~: Miałeś {0} nieautoryzowanych broni, prawdopodobnie dał ci je oszust, ale (C)GTA CnR Shield(/C) ~r~usunęła ~s~je dla ciebie.</String>
<String xml:lang="ar-001">~y~~h~تحذير~h~~s~: كان معك {0} أسلحة غير مصرح بها, ربما قام بغشاش أضافتهم الي حسابك ليوقعك في مشكلة, و لكن (C)GTA CnR Shield(/C) ~r~ازالهم ~s~من حسابك.</String>
12 changes: 6 additions & 6 deletions death.xml
Original file line number Diff line number Diff line change
@@ -87,8 +87,8 @@
<String xml:lang="fr-FR">Il n'y avait pas d'~p~EMS ~s~à proximité et tu as été automatiquement transferré vers un ~r~hôpital~s~.</String>
<String xml:lang="nl-NL">Er zijn geen ~p~ambulanciers ~s~in de buurt en je bent automatisch doorgestuurd naar een ~r~ziekenhuis~s~.</String>
<String xml:lang="it-IT">Non era presente alcun ~p~paramedico ~s~nelle vicinanze quindi sei stato trasferito automaticamente a un ~r~ospedale~s~.</String>
<String xml:lang="pl-PL">W pobliżu nie było ~p~medyków ~s~, a ty zostałeś przetransportowany do ~r~szpitala~s~.</String>
<String xml:lang="tr-TR">Yakınlarda ~p~sağlık görevlileri ~s~, yoktu ve otomatik olarak bir yere nakledildin ~r~hastane~s~.</String>
<String xml:lang="pl-PL">W pobliżu nie było ~p~medyków~s~, a ty zostałeś przetransportowany do ~r~szpitala~s~.</String>
<String xml:lang="tr-TR">Yakınlarda ~p~sağlık görevlileri~s~, yoktu ve otomatik olarak bir yere nakledildin ~r~hastane~s~.</String>
<String xml:lang="zh-Hant">附近沒有~p~醫護~s~,你被自動轉移到~r~醫院~s~.</String>
<String xml:lang="zh-Hans">附近没有~p~医护~s~,你被自动转移到~r~医院~s~.</String>
<String xml:lang="es-ES">No había ~p~paramédicos ~s~cerca y te trasladaron automáticamente a un ~r~hospital~s~.</String>
@@ -778,12 +778,12 @@
<String xml:lang="fr-FR">Liste des joueurs sur lesquels tu as une ~r~revanche~s~.</String>
<String xml:lang="nl-NL">Lijst van spelers waar je ~r~revenge ~s~op kan nemen.</String>
<String xml:lang="it-IT">Lista di giocatori che puoi uccidere per ~r~vendetta~s~.</String>
<String xml:lang="pl-PL">Lista graczy na których możesz się ~r~zemścić ~s~</String>
<String xml:lang="tr-TR">Alabileceğiniz oyuncuların listesi ~r~intikam ~s~.</String>
<String xml:lang="pl-PL">Lista graczy na których możesz się ~r~zemścić~s~.</String>
<String xml:lang="tr-TR">Alabileceğiniz oyuncuların listesi ~r~intikam~s~.</String>
<String xml:lang="zh-Hant">你可以~r~復仇~s~的玩家列表.</String>
<String xml:lang="zh-Hans">你可以~r~复仇~s~的玩家列表.</String>
<String xml:lang="es-ES">Lista de jugadores de los que puedes ~r~vengarte ~s~</String>
<String xml:lang="pt-BR">Lista de jogadores dos quais você pode se ~r~vingar ~s~.</String>
<String xml:lang="es-ES">Lista de jugadores de los que puedes ~r~vengarte~s~.</String>
<String xml:lang="pt-BR">Lista de jogadores dos quais você pode se ~r~vingar~s~.</String>
</Entry>

<Entry Id="menu_revenge_claimants_text">
8 changes: 4 additions & 4 deletions imenu.xml
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
<String xml:lang="pl-PL">Podejrzyj oraz zarządzaj swoimi przedmiotemi. ~p~Czy wiedziałeś że ~s~możesz też~y~kliknąć F2 ~s~by otworzyć to menu?</String>
<String xml:lang="nl-NL">Bekijk en beheer je voorwerpen. ~p~Wist je dat? ~s~Je kan ook ~y~op F2 drukken ~s~om dit menu te openen.</String>
<String xml:lang="tr-TR">Öğelerinizi görüntüleyin ve yönetin. ~p~Biliyor musun? ~s~Ayrıca yapabilirsin ~y~F2'ye basın ~s~menüyü açmak</String>
<String xml:lang="de-DE">Zeige und verwalte deine Gegenstände. ~p~Schon gewusst? ~s~Du kannst ~y~F2 drücken ~s~,um das Menü zu öffnen.</String>
<String xml:lang="de-DE">Zeige und verwalte deine Gegenstände. ~p~Schon gewusst? ~s~Du kannst ~y~F2 drücken~s~, um das Menü zu öffnen.</String>
<String xml:lang="it-IT">Visualizza e gestisci i tuoi oggetti. ~p~Lo sapevi? ~s~Puoi accedere a questo menu anche ~y~premendo F2~s~.</String>
<String xml:lang="fr-FR">Gestion des objets. ~p~Le savais-tu? ~s~Tu peux aussi ~y~appuyer sur F2 ~s~pour ouvrir ce menu.</String>
<String xml:lang="zh-Hant">查看和管理您的項目. ~p~你知道嗎? ~s~您也可以 ~y~按 F2 ~s~打開選單.</String>
@@ -254,7 +254,7 @@
<String xml:lang="fr-FR">Gestion de compte et configuration des options spécifiques à GTA ~b~Cops ~s~and ~r~Robbers~s~.</String>
<String xml:lang="zh-Hant">管理你的帳戶和調整 GTA ~b~Cops ~s~and ~r~Robbers ~s~的特殊設定</String>
<String xml:lang="zh-Hans">管理你的帐户和调整 GTA ~b~Cops ~s~and ~r~Robbers ~s~的特殊设定</String>
<String xml:lang="es-ES">Gestiona tu cuenta y configura las opciones específicas de GTA ~b~Cops ~s~y ~r~Robbers ~s~.</String>
<String xml:lang="es-ES">Gestiona tu cuenta y configura las opciones específicas de GTA ~b~Cops ~s~y ~r~Robbers~s~.</String>
<String xml:lang="pt-BR">Gerencie sua conta e defina as configurações específicas do GTA~b~Cops ~s~and ~r~Robbers ~s~specific options.</String>
</Entry>

@@ -721,8 +721,8 @@
<Entry Id="imenu_inventory_no_items_in_category">
<String xml:lang="en-US">No items in this category :(</String>
<String xml:lang="nl-NL">Geen voorwerpen in deze categorie :(</String>
<String xml:lang="it-IT">Non ci sono oggetti in questa categoria. :(</String>
<String xml:lang="de-DE">Keine Gegenstände in dieser Kategorie .:(</String>
<String xml:lang="it-IT">Non ci sono oggetti in questa categoria :(</String>
<String xml:lang="de-DE">Keine Gegenstände in dieser Kategorie :(</String>
<String xml:lang="es-ES">No hay artículos en esta categoría :(</String>
<String xml:lang="pl-PL">Brak przedmiotów w tej kategorii :(</String>
<String xml:lang="fr-FR">Pas d'objets dans cette catégorie :(</String>
136 changes: 68 additions & 68 deletions jobs.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion player.xml
Original file line number Diff line number Diff line change
@@ -159,7 +159,7 @@
<String xml:lang="en-US">{0} account not found. Make sure your {0} desktop app is running, then restart FiveM and retry.</String>
<String xml:lang="nl-NL">{0} account niet gevonden. Zorg ervoor dat de {0} desktop app aan staat, herstart FiveM en probeer opnieuw.</String>
<String xml:lang="it-IT">Account {0} non trovato. Assicurati che l'applicazione {0} sia in esecuzione sul desktop, poi riavvia FiveM e riprova.</String>
<String xml:lang="pl-PL">{0} konto nie znalezione. Upewnij się że aplikacja {0} jest uruchomiona , a potem zrestartuj FiveM i spróbuj ponownie.</String>
<String xml:lang="pl-PL">{0} konto nie znalezione. Upewnij się że aplikacja {0} jest uruchomiona, a potem zrestartuj FiveM i spróbuj ponownie.</String>
</Entry>

<Entry Id="service_account_not_found_disconnect">
2 changes: 1 addition & 1 deletion specialitems.xml
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@
<String xml:lang="nl-NL">Je moet 30 seconden ~r~wachten ~s~tussen gebruik van de ~p~verbandkit~s~.</String>
<String xml:lang="it-IT">Devi ~r~aspetare ~s~30 secondi prima di poter usare un altro ~p~kit medico~s~.</String>
<String xml:lang="pl-PL">Musisz ~r~poczekać ~s~30 sekund zanim użyjesz ~p~apteczkę ~s~ponownie.</String>
<String xml:lang="es-ES">Tienes que ~r~esperar ~s~30 segundos entre usos de ~p~botiquínes ~s~.</String>
<String xml:lang="es-ES">Tienes que ~r~esperar ~s~30 segundos entre usos de ~p~botiquínes~s~.</String>
<String xml:lang="de-DE">Du musst zwischen der Verwendung von ~p~Verbandskästen~s~ 30 Sekunden ~r~warten~s~.</String>
</Entry>

3 changes: 3 additions & 0 deletions validator.py
Original file line number Diff line number Diff line change
@@ -186,6 +186,7 @@ def check_entries(entry: xml.dom.minidom.Element, path: list[str]):
good_string_entries = []
FORMAT_REGEX = r"~.~"
VARIABLE_REGEX = r"{[0-9]+}"
WRONG_PUNCTUATION_REGEX = r"\s[.,?,!]"
for string_entry in entry.childNodes:
if isinstance(string_entry, xml.dom.minidom.Text):
continue
@@ -224,6 +225,8 @@ def check_entries(entry: xml.dom.minidom.Element, path: list[str]):
Validator.print_error(f"Found invalid text formatting (~)", path, string_entry.parse_position)
if re.findall(r"\s\s+", text_without_formatting):
Validator.print_error(f"Found too many spaces between words", path, string_entry.parse_position)
if re.findall(WRONG_PUNCTUATION_REGEX, text_without_formatting):
Validator.print_error(f"Found invalid punctuation mark placement", path, string_entry.parse_position)
if (Validator.show_lang is not None) and (Validator.show_lang not in found_langs):
if Validator.found_missing_lang <= Validator.display_limit:
Validator.print_warning(f"Missing translation for {repr(Validator.show_lang)}!", path, element_location)

0 comments on commit 9b58f5c

Please sign in to comment.