diff --git a/imenu.xml b/imenu.xml index 0417b56..7145c43 100644 --- a/imenu.xml +++ b/imenu.xml @@ -691,7 +691,7 @@ {0} kan niet ~r~{1} ~s~meer ~r~{2} ~s~dragen. {0} taşıyamaz ~r~{1} ~s~daha fazlasını ~r~{2}~s~. {0} kann nicht ~r~{1} ~s~weitere/n ~r~{2}~s~ halten. - {0} non può contenere altri ~r~{1} ~r~{2}~s~. + {0} non può contenere altri ~r~{1}~s~ ~r~{2}~s~. {0} ne peut pas porter plus de ~r~{1} {2}~s~. {0} 無法攜帶 ~r~{1} ~s~個或以上的 ~r~{2}~s~. {0} 无法携带 ~r~{1} ~s~个或以上的 ~r~{2}~s~. diff --git a/jobs.xml b/jobs.xml index 108c1e9..01d1e08 100644 --- a/jobs.xml +++ b/jobs.xml @@ -326,7 +326,7 @@ You purchased ~p~{0}g ~s~of ~p~{1} ~s~for ~r~{2}~s~ Hai comprato ~p~{0}g ~s~di ~p~{1} ~s~per ~r~{2}~s~ Je hebt ~p~{0}g ~s~van ~p~{1} ~s~gekocht voor ~r~{2}~s~ - Du hast ~p~{0}g ~p~{1} ~s~für ~r~{2}~s~ gekauft + Du hast ~p~{0}g~s~ ~p~{1} ~s~für ~r~{2}~s~ gekauft Satın aldın ~p~{0}g ~s~ile ilgili ~p~{1} ~s~için ~r~{2}~s~ Compraste ~p~{0}g ~s~de ~p~{1} ~s~por ~r~{2}~s~ Kupiłeś ~p~{0}g ~s~~p~{1} ~s~za ~r~{2}~s~ diff --git a/player.xml b/player.xml index 615eb12..1d79b8e 100644 --- a/player.xml +++ b/player.xml @@ -483,7 +483,7 @@ Questo giocatore ha ~r~recentemente ~s~ricevuto denaro. Per favore, prova ~r~più tardi~s~. Ten gracz otrzymał ~r~przed chwilą ~s~pieniądze. Proszę, spróbuj ponownie ~r~później~s~. Este jugador ha ~r~recientemente ~s~recibido dinero. Por favor, inténtelo de nuevo ~r~más tarde~s~. - Este jogador ~r~recebeu dinheiro recentemente~s~. Por favor, tente novamente ~r~mais tarde ~r~mais tarde~s~. + Este jogador ~r~recebeu dinheiro recentemente~s~. Por favor, tente novamente ~r~mais tarde~s~. diff --git a/validator.py b/validator.py index 6f9922e..d1c4fc4 100644 --- a/validator.py +++ b/validator.py @@ -282,10 +282,11 @@ def regex_replace_multiple(text: str, replacement_table: list[list[str]]) -> str text = re.sub(replacement[0], replacement[1], text) return text -def get_consecutive_duplicate(lst: list): +def get_consecutive_duplicate(lst: list, exceptions: list = []): for i in range(len(lst) - 1): - if lst[i] == lst[i + 1]: - return lst[i] + if lst[i] not in exceptions: + if lst[i] == lst[i + 1]: + return lst[i] return None @@ -589,7 +590,7 @@ def check_entries(entry: xml.dom.minidom.Element, path: list[str]): found_formats_set = set(found_formats) invalid_text_formatting = found_formats_set.difference(required_text_formatting) missing_text_formatting = required_text_formatting.difference(found_formats_set) - formatting_duplicate = get_consecutive_duplicate(found_formats) + formatting_duplicate = get_consecutive_duplicate(found_formats, exceptions=["~h~","~n~","~s~"]) if invalid_text_formatting: Validator.print_error(f"Found invalid text formatting: {', '.join(invalid_text_formatting)}", path1, string_entry.parse_position) if missing_text_formatting: