Skip to content

Commit

Permalink
Localization : Fixed Issues With Some Edgecases (#1543)
Browse files Browse the repository at this point in the history
Closes #1008
  • Loading branch information
TimGoll authored Jun 1, 2024
1 parent 30cfce6 commit b649673
Show file tree
Hide file tree
Showing 17 changed files with 29 additions and 21 deletions.
4 changes: 2 additions & 2 deletions gamemodes/terrortown/gamemode/client/cl_eventpopup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ local TryT = LANG.TryTranslation

local defaultMessage = {
title = {
text = LANG.TryTranslation("testpopup_title"),
text = "testpopup_title",
},
subtitle = {
text = LANG.TryTranslation("testpopup_subtitle"),
text = "testpopup_subtitle",
},
iconTable = {},
time = CurTime() + 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,20 @@ if CLIENT then
local pad2 = 2 * self.pad

-- wrap title if needed
item.wrappedTitle, width_title, height_title =
draw.GetWrappedText(item.title.text, size.w - pad2, titlefont, self.scale)
item.wrappedTitle, width_title, height_title = draw.GetWrappedText(
LANG.TryTranslation(item.title.text),
size.w - pad2,
titlefont,
self.scale
)

-- wrap text if needed
item.wrappedSubtitle, width_text, height_text =
draw.GetWrappedText(item.subtitle.text, size.w - pad2, textfont, self.scale)
item.wrappedSubtitle, width_text, height_text = draw.GetWrappedText(
LANG.TryTranslation(item.subtitle.text),
size.w - pad2,
textfont,
self.scale
)

item.size = {}
item.size.w = ((width_title > width_text) and width_title or width_text) + pad2
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/de.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Du hebst bereits eine Waffe auf, warte bis du sie erhältst"
L.tbut_help_admin = "Bearbeite Knopfeinstellungen"
L.tbut_role_toggle = "[{walkkey} + {usekey}] zum Umschalten dieses Knopfes für {role}"
L.tbut_role_config = "Rolle: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] zum Umschalten dieses Knopfes für Team {team}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] zum Umschalten dieses Knopfes für {team}"
L.tbut_team_config = "Team: {current}"
L.tbut_current_config = "Aktuelle Einstellung:"
L.tbut_intended_config = "Voreinstellung des Maperstellers:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/en.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "You already picked up a weapon, wait until you receive it."
L.tbut_help_admin = "Edit traitor button settings"
L.tbut_role_toggle = "[{walkkey} + {usekey}] to toggle this button for {role}"
L.tbut_role_config = "Role: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for team {team}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
L.tbut_team_config = "Team: {current}"
L.tbut_current_config = "Current config:"
L.tbut_intended_config = "Intended config by map creator:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/es.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Ya has recogido un arma, espera a recibirla"
L.tbut_help_admin = "Editar configuración de teclas para el Traidor"
L.tbut_role_toggle = "[{walkkey} + {usekey}] para activar y desactivar esto para {role}"
L.tbut_role_config = "Rol: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] para activar este botón para el equipo {team}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] para activar este botón para el {team}"
L.tbut_team_config = "Equipo: {current}"
L.tbut_current_config = "Configuración actual:"
L.tbut_intended_config = "Configuración recomendada por el creador del mapa:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/fr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Vous avez déjà pris une arme, attendez de la recevoir"
L.tbut_help_admin = "Éditer les paramètres du traître"
L.tbut_role_toggle = " Appuyez sur [{walkkey} + {usekey}] pour basculer ce bouton pour {role}"
L.tbut_role_config = "Rôle: {current}"
L.tbut_team_toggle = "Appuyez sur [SHIFT + {walkkey} + {usekey}] pour basculer ce bouton pour la team {team}"
L.tbut_team_toggle = "Appuyez sur [SHIFT + {walkkey} + {usekey}] pour basculer ce bouton pour la {team}"
L.tbut_team_config = "Team: {current}"
L.tbut_current_config = "Configuration actuelle:"
L.tbut_intended_config = "Configuration prévue par le créateur de la carte:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/it.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Hai gia preso un arma, aspetta finche non la ricevi"
L.tbut_help_admin = "Modifica le impostazioni per i bottoni dei traditori"
L.tbut_role_toggle = "[{walkkey} + {usekey}] to toggle this button for {role}"
L.tbut_role_config = "Ruolo: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] per rimuovere questo bottone per il team {team}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] per rimuovere questo bottone per il {team}"
L.tbut_team_config = "Team: {current}"
L.tbut_current_config = "Configurazione corrente:"
L.tbut_intended_config = "Configurazione voluta dal creatore della mappa:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/ja.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "既に武器を拾っている、受け取りまで少し待
L.tbut_help_admin = "Traitorトラップ設定を編集する"
L.tbut_role_toggle = "[{walkkey} + {usekey}]で{role}に切り替える"
L.tbut_role_config = "役職:{current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}]{team}に切り替える"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
L.tbut_team_config = "陣営:{current}"
L.tbut_current_config = "現在の設定:"
L.tbut_intended_config = "マップ制作者による意図された設定:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/pl.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Podniosłeś już broń! Poczekaj, aż ją otrzymasz!"
L.tbut_help_admin = "Edytuj ustawienia guzika zdrajcy"
L.tbut_role_toggle = "[{walkkey} + {usekey}] aby włączyć ten przycisk dla roli {role}"
L.tbut_role_config = "Rola: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] aby włączyć ten guzik dla teamu {team}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] aby włączyć ten guzik dla {team}"
L.tbut_team_config = "Team: {current}"
L.tbut_current_config = "Obecne ustawienia:"
L.tbut_intended_config = "Domyślny config twórcy mapy:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/pt_br.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Você já pegou uma arma, espere alguns segundos."
L.tbut_help_admin = "Configurar botão de traidor"
L.tbut_role_toggle = "[{walkkey} + {usekey}] para ocultar este botão para {role}"
L.tbut_role_config = "Papel: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] para ocultar o botão do time {team}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] para ocultar o botão do {team}"
L.tbut_team_config = "Time: {current}"
L.tbut_current_config = "Configuração padrão:"
L.tbut_intended_config = "Configuração padrão do padrão do criador do mapa:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/ru.lua
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ L.pickup_pending = "Вы уже подобрали оружие. Дождите
L.tbut_help_admin = "Изменение настроек кнопки предателей"
L.tbut_role_toggle = "[{walkkey} + {usekey}] Включить или выключить эту кнопку для роли {role}."
L.tbut_role_config = "Роль: {current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] Включить или выключить эту кнопку для команды {team}."
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
L.tbut_team_config = "Команда: {current}"
L.tbut_current_config = "Текущие настройки:"
L.tbut_intended_config = "Настройки, задуманные создателем карты:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/sv.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.hat_retrieve = "Du plockade upp hatten av en detektiv."
--L.tbut_help_admin = "Edit traitor button settings"
--L.tbut_role_toggle = "[{walkkey} + {usekey}] to toggle this button for {role}"
--L.tbut_role_config = "Role: {current}"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for team {team}"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
--L.tbut_team_config = "Team: {current}"
--L.tbut_current_config = "Current config:"
--L.tbut_intended_config = "Intended config by map creator:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/tr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "Zaten bir silah aldın, alana kadar bekle."
L.tbut_help_admin = "Hain düğmesi ayarlarını düzenle"
L.tbut_role_toggle = "[{walkkey} + {usekey}] düğmesi {role} için"
L.tbut_role_config = "Rol {current}"
L.tbut_team_toggle = "{team} takımı için bu düğmeyi değiştirmek için [SHIFT + {walkkey} + {usekey}]"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
L.tbut_team_config = "Takım {current}"
L.tbut_current_config = "Geçerli yapılandırma"
L.tbut_intended_config = "Harita oluşturucu tarafından tasarlanan yapılandırma"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/uk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.idle_popup_title = "Бездіяльність"
--L.tbut_help_admin = "Edit traitor button settings"
--L.tbut_role_toggle = "[{walkkey} + {usekey}] to toggle this button for {role}"
--L.tbut_role_config = "Role: {current}"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for team {team}"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
--L.tbut_team_config = "Team: {current}"
--L.tbut_current_config = "Current config:"
--L.tbut_intended_config = "Intended config by map creator:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/zh_hans.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "你已经捡起这个武器,请等捡起完成"
L.tbut_help_admin = "编辑叛徒按钮设定"
L.tbut_role_toggle = "[{walkkey} + {usekey}] 切换 {role} 的按钮权限"
L.tbut_role_config = "身份:{current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] 切换 {team} 的按钮权限"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
L.tbut_team_config = "阵营:{current}"
L.tbut_current_config = "当前设定:"
L.tbut_intended_config = "地图默认设定:"
Expand Down
2 changes: 1 addition & 1 deletion lua/terrortown/lang/zh_tw.lua
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,7 @@ L.pickup_pending = "你已經撿起這個武器,請等撿起完成"
L.tbut_help_admin = "編輯叛徒按鈕設定"
L.tbut_role_toggle = "[{walkkey} + {usekey}] 切換 {role} 的按鈕權限"
L.tbut_role_config = "身份:{current}"
L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] 切換 {team} 的按鈕權限"
--L.tbut_team_toggle = "[SHIFT + {walkkey} + {usekey}] to toggle this button for {team}"
L.tbut_team_config = "陣營:{current}"
L.tbut_current_config = "當前設定:"
L.tbut_intended_config = "地圖默認設定:"
Expand Down
2 changes: 1 addition & 1 deletion lua/ttt2/libraries/targetid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ function targetid.HUDDrawTargetIDTButtons(tData)
ParT("tbut_team_toggle", {
usekey = key_params.usekey,
walkkey = key_params.walkkey,
team = client:GetTeam():gsub("^%l", string.upper),
team = TryT(client:GetTeam()),
}),
COLOR_WHITE
)
Expand Down

0 comments on commit b649673

Please sign in to comment.