Remove orphaned translations

Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>
This commit is contained in:
PanteraPolnocy
2026-06-20 22:13:36 +02:00
parent 4528779541
commit 5eb3c11bb8
11 changed files with 88 additions and 589 deletions
+88
View File
@@ -0,0 +1,88 @@
#!/usr/bin/env python3
from __future__ import annotations
import argparse
from pathlib import Path
REPO = Path(__file__).resolve().parent.parent
SKINS_ROOT = REPO / "indra/newview/skins"
def relative_files(base: Path) -> set[str]:
if not base.is_dir():
return set()
return {
path.relative_to(base).as_posix()
for path in base.rglob("*")
if path.is_file()
}
def prune_skin(skin_dir: Path, *, delete: bool) -> int:
en_dir = skin_dir / "xui" / "en"
if not en_dir.is_dir():
return 0
en_files = relative_files(en_dir)
removed = 0
xui = skin_dir / "xui"
for locale_dir in sorted(xui.iterdir()):
if not locale_dir.is_dir() or locale_dir.name == "en":
continue
for path in sorted(locale_dir.rglob("*")):
if not path.is_file():
continue
rel = path.relative_to(locale_dir).as_posix()
if rel in en_files:
continue
print(f"{'delete' if delete else 'would delete'}: {skin_dir.name}/xui/{locale_dir.name}/{rel}")
if delete:
path.unlink()
removed += 1
if delete:
for path in sorted(locale_dir.rglob("*"), reverse=True):
if path.is_dir() and not any(path.iterdir()):
path.rmdir()
return removed
def main() -> int:
parser = argparse.ArgumentParser(
description="Delete translation files not present in each skin's xui/en/ folder.",
)
parser.add_argument(
"--delete",
action="store_true",
help="Actually delete files (default is dry run).",
)
parser.add_argument(
"--skin",
action="append",
metavar="NAME",
help="Only process named skin(s); repeatable.",
)
args = parser.parse_args()
wanted = set(args.skin) if args.skin else None
total = 0
for skin_dir in sorted(SKINS_ROOT.iterdir()):
if not skin_dir.is_dir():
continue
if wanted and skin_dir.name not in wanted:
continue
total += prune_skin(skin_dir, delete=args.delete)
mode = "deleted" if args.delete else "would delete"
print(f"\n{total} file(s) {mode}")
return 0
if __name__ == "__main__":
raise SystemExit(main())
@@ -1,54 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="Post-Process Floater" title="Sonradan becərilmə seçimləri">
<tab_container name="Post-Process Tabs">
<panel label="Rəng filtri" name="wmiColorFilterPanel">
<check_box label="Aktiv" name="wmiColorFilterToggle"/>
<text name="wmiColorFilterBrightnessText">
Işıqlılıq
</text>
<text name="wmiColorFilterSaturationText">
Doyulma
</text>
<text name="wmiColorFilterContrastText">
Kontrast
</text>
<text name="wmiColorFilterBaseText">
Kontrastın əsas rəngi
</text>
<slider label="Q" name="wmiColorFilterBaseR"/>
<slider label="Y" name="wmiColorFilterBaseG"/>
<slider label="G" name="wmiColorFilterBaseB"/>
<slider label="İ" name="wmiColorFilterBaseI"/>
</panel>
<panel label="Gecə görüşü" name="wmiNightVisionPanel">
<check_box label="Aktiv" name="wmiNightVisionToggle"/>
<text name="wmiNightVisionBrightMultText">
Işığın qüvvət dərəcəsi
</text>
<text name="wmiNightVisionNoiseSizeText">
Pozulma ölçüsü
</text>
<text name="wmiNightVisionNoiseStrengthText">
Pozulma gücü
</text>
</panel>
<panel label="Şəfəq" name="wmiBloomPanel">
<check_box label="Aktiv" name="wmiBloomToggle"/>
<text name="wmiBloomExtractText">
Işığın şiddəti
</text>
<text name="wmiBloomSizeText">
Şəfəqin ölçüsü
</text>
<text name="wmiBloomStrengthText">
Şəfəqin gücü
</text>
</panel>
<panel label="Əlavə" name="Extras">
<button label="Effekti yüklə" label_selected="Effekti yüklə" name="PPLoadEffect" width="120"/>
<button label="Effekti saxla" label_selected="Effekti saxla" name="PPSaveEffect" width="120"/>
<combo_box left_delta="130" name="PPEffectsCombo"/>
<line_editor label="Effektin adı" name="PPEffectNameEditor"/>
</panel>
</tab_container>
</floater>
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_sound_devices" title="Səs cihazları">
<text name="voice_label" width="90">Səsli söhbət</text>
<check_box label="Aktiv" name="enable_voice" left="100"/>
</floater>
@@ -1,159 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater label="Yerlər" name="voice_effects" title="Səs dəyişimi">
<string name="no_voice_effect">
(Səs dəyişimi yoxdur)
</string>
<string name="active_voice_effect">
(Aktiv)
</string>
<string name="unsubscribed_voice_effect">
(Abunə yoxdur)
</string>
<string name="new_voice_effect">
(Yeni!)
</string>
<string name="effect_Arena">
Aerna
</string>
<string name="effect_Beast">
Beast
</string>
<string name="effect_Buff">
Buff
</string>
<string name="effect_Buzz">
Buzz
</string>
<string name="effect_Camille">
Camille
</string>
<string name="effect_Creepy">
Creepy
</string>
<string name="effect_CreepyBot">
CreepyBot
</string>
<string name="effect_Cyber">
Cyber
</string>
<string name="effect_DeepBot">
DeepBot
</string>
<string name="effect_Demon">
Demon
</string>
<string name="effect_Female Elf">
Pəri
</string>
<string name="effect_Flirty">
Flirty
</string>
<string name="effect_Foxy">
Foxy
</string>
<string name="effect_Halloween 2010 Bonus">
Hellouin_2010_bonus
</string>
<string name="effect_Helium">
Helium
</string>
<string name="effect_Husky">
Husky
</string>
<string name="effect_Husky Whisper">
Boğuq pıçıltı
</string>
<string name="effect_Intercom">
Daxili şəbəkə
</string>
<string name="effect_Julia">
Julia
</string>
<string name="effect_Lo Lilt">
Tərənnüm
</string>
<string name="effect_Macho">
Macho
</string>
<string name="effect_Micro">
Micro
</string>
<string name="effect_Mini">
Mini
</string>
<string name="effect_Model">
Model
</string>
<string name="effect_Nano">
Nano
</string>
<string name="effect_Nightmare">
Nightmare
</string>
<string name="effect_PopBot">
PopBot
</string>
<string name="effect_Rachel">
Rachel
</string>
<string name="effect_Radio">
Radio
</string>
<string name="effect_Robot">
Robot
</string>
<string name="effect_Roxanne">
Roxanne
</string>
<string name="effect_Rumble">
Bozarma
</string>
<string name="effect_Sabrina">
Sabrina
</string>
<string name="effect_Samantha">
Samantha
</string>
<string name="effect_Sexy">
Sexy
</string>
<string name="effect_Shorty">
Shorty
</string>
<string name="effect_Smaller">
Az
</string>
<string name="effect_Sneaky">
Sneaky
</string>
<string name="effect_Stallion">
Stallion
</string>
<string name="effect_Sultry">
Sultry
</string>
<string name="effect_Thunder">
Thunder
</string>
<string name="effect_Vixen">
Vixen
</string>
<string name="effect_WhinyBot">
WhinyBot
</string>
<text name="preview_text">
Dinləmək
</text>
<text name="status_text">
Nümunəni yazın, sonra səsin necə səslənəcəyini eşitmək üçün basın.
</text>
<button label="Yaz" name="record_btn" tool_tip="Səsinizin nümunəsini yazın."/>
<button label="Dayandır" name="record_stop_btn"/>
<text name="voice_morphing_link">
[[URL] Abunə ol]
</text>
<scroll_list name="voice_effect_list" tool_tip="Səsinizin nümunəsini yazın, sonra effekti dinləmək üçün basın.">
<scroll_list.columns label="Səs adı" name="name"/>
<scroll_list.columns label="Müddəti bitir" name="expires"/>
</scroll_list>
</floater>
@@ -1,20 +0,0 @@
<panel name="panel_login">
<layout_stack name="logo_stack">
<layout_panel name="parent_panel2">
<layout_stack name="widget_stack">
<layout_panel name="widget_container">
<combo_box label="İstifadəçi"
tool_tip="Qeydiyyatdan keçərkən seçdiyiniz istifadəçi adı, məsələn: dabandashi50 və ya Ertogrul Khazarli"
name="username_combo"/>
<line_editor name="password_edit" label="Şifrə"/>
<button label="Daxil ol" name="connect_btn"/>
<text name="sign_up_text">Qeydiyyat</text>
<check_box label="Yadda saxla" name="remember_name"
tool_tip="Yadda saxlanılmış istifadəçi Avatar &gt; Seçimlər &gt; Əlavə&gt; Yadda saxlanılmış istifadəçi adları menyusunda silinə bilər."/>
<check_box label="Şifrəni yadda saxla" name="remember_password"/>
<text name="forgot_password_text">Şifrəni unutdunuz</text>
</layout_panel>
</layout_stack>
</layout_panel>
</layout_stack>
</panel>
@@ -1,53 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="Post-Process Floater" title="Configurações de pós-processamento">
<tab_container name="Post-Process Tabs">
<panel label="Filtro de cor" name="wmiColorFilterPanel">
<check_box label="Ativar" name="wmiColorFilterToggle" />
<text name="wmiColorFilterBrightnessText">
Brilho
</text>
<text name="wmiColorFilterSaturationText">
Saturação
</text>
<text name="wmiColorFilterContrastText">
Contraste
</text>
<text name="wmiColorFilterBaseText">
Cor base do contraste
</text>
<slider label="R" name="wmiColorFilterBaseR" />
<slider label="G" name="wmiColorFilterBaseG" />
<slider label="B" name="wmiColorFilterBaseB" />
<slider label="I" name="wmiColorFilterBaseI" />
</panel>
<panel label="Visão noturna" name="wmiNightVisionPanel">
<check_box label="Ativar" name="wmiNightVisionToggle" />
<text name="wmiNightVisionBrightMultText">
Multiplicador de amplificação de luz
</text>
<text name="wmiNightVisionNoiseSizeText">
Tamanho do ruído
</text>
<text name="wmiNightVisionNoiseStrengthText">
Intensidade do ruído
</text>
</panel>
<panel label="Bloom" name="wmiBloomPanel">
<check_box label="Ativar" name="wmiBloomToggle" />
<text name="wmiBloomExtractText">
Extração de luminosidade
</text>
<text name="wmiBloomSizeText">
Tamanho do bloom
</text>
<text name="wmiBloomStrengthText">
Intensidade do bloom
</text>
</panel>
<panel label="Extras" name="Extras">
<button label="Carregar efeito" label_selected="Carregar efeito" name="PPLoadEffect" />
<button label="Salvar efeito" label_selected="Salvar efeito" name="PPSaveEffect" />
<line_editor label="Nome do efeito" name="PPEffectNameEditor" />
</panel>
</tab_container>
</floater>
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="floater_sound_devices" title="Dispositivos de som">
<text name="voice_label">
Chat por voz
</text>
<check_box label="Ativado" name="enable_voice"/>
</floater>
@@ -1,159 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater label="Locais" name="voice_effects" title="Pré-visualização de modulação de voz">
<string name="no_voice_effect">
(Sem modulação de voz)
</string>
<string name="active_voice_effect">
(Ativo)
</string>
<string name="unsubscribed_voice_effect">
(não assinado)
</string>
<string name="new_voice_effect">
(Novo!)
</string>
<string name="effect_Arena">
Arena
</string>
<string name="effect_Beast">
Besta
</string>
<string name="effect_Buff">
Musculoso
</string>
<string name="effect_Buzz">
Buzz
</string>
<string name="effect_Camille">
Camille
</string>
<string name="effect_Creepy">
Assustador
</string>
<string name="effect_CreepyBot">
Bot assustador
</string>
<string name="effect_Cyber">
Cyber
</string>
<string name="effect_DeepBot">
Bot grave
</string>
<string name="effect_Demon">
Demônio
</string>
<string name="effect_Female Elf">
Elfa
</string>
<string name="effect_Flirty">
Sedutor
</string>
<string name="effect_Foxy">
Sensual
</string>
<string name="effect_Halloween 2010 Bonus">
Bonus_Halloween_2010
</string>
<string name="effect_Helium">
Hélio
</string>
<string name="effect_Husky">
Rouco
</string>
<string name="effect_Husky Whisper">
Sussurro rouco
</string>
<string name="effect_Intercom">
Interfone
</string>
<string name="effect_Julia">
Julia
</string>
<string name="effect_Lo Lilt">
Canto suave
</string>
<string name="effect_Macho">
Macho
</string>
<string name="effect_Micro">
Micro
</string>
<string name="effect_Mini">
Pequeno
</string>
<string name="effect_Model">
Modelo
</string>
<string name="effect_Nano">
Nano
</string>
<string name="effect_Nightmare">
Pesadelo
</string>
<string name="effect_PopBot">
PopBot
</string>
<string name="effect_Rachel">
Rachel
</string>
<string name="effect_Radio">
Rádio
</string>
<string name="effect_Robot">
Robô
</string>
<string name="effect_Roxanne">
Roxanne
</string>
<string name="effect_Rumble">
Tremor
</string>
<string name="effect_Sabrina">
Sabrina
</string>
<string name="effect_Samantha">
Samantha
</string>
<string name="effect_Sexy">
Sexy
</string>
<string name="effect_Shorty">
Shorty
</string>
<string name="effect_Smaller">
Menor
</string>
<string name="effect_Sneaky">
Sorrateiro
</string>
<string name="effect_Stallion">
Garanhão
</string>
<string name="effect_Sultry">
Sedutor
</string>
<string name="effect_Thunder">
Trovão
</string>
<string name="effect_Vixen">
Sedutora
</string>
<string name="effect_WhinyBot">
Bot reclamador
</string>
<text name="preview_text">
Para pré-visualizar
</text>
<text name="status_text">
Grave um exemplo e clique em um efeito para aplicá-lo à sua voz.
</text>
<button label="Gravar" name="record_btn" tool_tip="Grave um exemplo da sua voz."/>
<button label="Parar" name="record_stop_btn"/>
<text name="voice_morphing_link">
[[URL] Assinar agora]
</text>
<scroll_list name="voice_effect_list" tool_tip="Grave um exemplo da sua voz e clique em um efeito para testá-lo.">
<scroll_list.columns label="Nome" name="name"/>
<scroll_list.columns label="Expira em" name="expires"/>
</scroll_list>
</floater>
@@ -1,39 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="panel_login">
<panel.string name="forgot_password_url">
https://accounts.secondlife.com/forgot_password/?lang=pt-BR
</panel.string>
<panel.string name="sign_up_url">
https://join.secondlife.com/?lang=pt-BR
</panel.string>
<layout_stack name="logo_stack">
<layout_panel name="parent_panel2">
<layout_stack name="widget_stack">
<layout_panel name="widget_container">
<combo_box label="Nome de usuário" name="username_combo" tool_tip="O nome de usuário escolhido no cadastro, como &quot;berndschmidt12&quot; ou &quot;Liebe Sonne&quot;"/>
<line_editor label="Senha" name="password_edit"/>
<button label="Entrar" name="connect_btn"/>
<check_box label="Lembrar de mim" name="remember_check"/>
<text name="forgot_password_text">
Esqueceu a senha
</text>
<text name="sign_up_text">
Cadastre-se
</text>
</layout_panel>
</layout_stack>
</layout_panel>
<layout_panel name="parent_panel3">
<layout_stack name="images_stack">
<layout_panel name="images_container">
<text name="image_caption_left">
Seu primeiro passo é na Learning Island. Procure o portal!
</text>
<text name="image_caption_right">
Depois, explore a Social Island e conheça outros residentes!
</text>
</layout_panel>
</layout_stack>
</layout_panel>
</layout_stack>
</panel>
@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<panel name="panel_voice_effect">
<string name="no_voice_effect">
Voice Morph desativado
</string>
<string name="preview_voice_effects">
Experimentar Voice Morph ▶
</string>
<string name="get_voice_effects">
Assinar Voice Morph ▶
</string>
<combo_box name="voice_effect" tool_tip="Selecione um efeito Voice Morph para alterar sua voz.">
<combo_box.item label="Voice Morph desativado" name="no_voice_effect"/>
</combo_box>
</panel>
@@ -1,78 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="TexFetchDebugger" title="紋理取得除錯器">
<text name="total_num_fetched_label">
1. 已取得紋理總數:[NUM]
</text>
<text name="total_num_fetching_requests_label">
2. 總取得請求數:[NUM]
</text>
<text name="total_num_cache_hits_label">
3. 快取總讀取數:[NUM]
</text>
<text name="total_num_visible_tex_label">
4. 可見紋理總數:[NUM]
</text>
<text name="total_num_visible_tex_fetch_req_label">
5. 可見紋理取得總請求數:[NUM]
</text>
<text name="total_fetched_data_label">
6. 總取得資料量:[SIZE1] KB,解碼資料量:[SIZE2] KB[PIXEL] 百萬畫素
</text>
<text name="total_fetched_vis_data_label">
7. 可見資料總量:[SIZE1] KB,解碼資料量:[SIZE2] KB
</text>
<text name="total_fetched_rendered_data_label">
8. 總彩現資料量:[SIZE1] KB,解碼資料量:[SIZE2] KB[PIXEL] 百萬畫素
</text>
<text name="total_time_cache_read_label">
9. 快取讀取總時間:[TIME] 秒
</text>
<text name="total_time_cache_write_label">
10. 快取寫入總時間:[TIME] 秒
</text>
<text name="total_time_decode_label">
11. 解碼總時間:[TIME] 秒
</text>
<text name="total_time_gl_label">
12. 建立 gl 紋理總時間:[TIME] 秒
</text>
<text name="total_time_http_label">
13. HTTP 取得總時間:[TIME] 秒
</text>
<text name="total_time_fetch_label">
14. 所有取得操作總時間:[TIME] 秒
</text>
<text name="total_time_refetch_vis_cache_label">
15. 自快取重新取得可見紋理,時間:[TIME] 秒,取得量:[SIZE] KB[PIXEL] 百萬畫素
</text>
<text name="total_time_refetch_all_cache_label">
16. 從快取重新取得所有紋理,時間:[TIME] 秒,取得量:[SIZE] KB[PIXEL] 百萬畫素
</text>
<text name="total_time_refetch_vis_http_label">
17. 自 HTTP 重新取得可見紋理,時間:[TIME] 秒,取得量:[SIZE] KB[PIXEL] 百萬畫素
</text>
<text name="total_time_refetch_all_http_label">
18. 自 HTTP 重新取得所有紋理,時間:[TIME] 秒,取得量:[SIZE] KB[PIXEL] 百萬畫素
</text>
<spinner label="19. 紋理/畫素比率:" name="texel_pixel_ratio" />
<text name="texture_source_label">
20. 紋理來源:
</text>
<radio_group name="texture_source">
<radio_item label="快取 + HTTP" name="0" />
<radio_item label="僅限 HTTP" name="1" />
</radio_group>
<button label="開始" name="start_btn" />
<button label="重設" name="clear_btn" />
<button label="關閉" name="close_btn" />
<button label="重設讀取時間" name="reset_time_btn" />
<button label="快取讀取" name="cacheread_btn" />
<button label="快取寫入" name="cachewrite_btn" />
<button label="HTTP" name="http_btn" />
<button label="解碼" name="decode_btn" />
<button label="GL 紋理" name="gl_btn" />
<button label="重新取得可見快取紋理" name="refetchviscache_btn" />
<button label="重新取得所有快取" name="refetchallcache_btn" />
<button label="重新取得可見HTTP紋理" name="refetchvishttp_btn" />
<button label="重新取得所有HTTP" name="refetchallhttp_btn" />
</floater>