Skip to content

Commit 4501811

Browse files
committed
re enable last condition
1 parent c9fc280 commit 4501811

File tree

4 files changed

+8
-32
lines changed

4 files changed

+8
-32
lines changed

config/maps/plugins/standard_actions/language_translator/de-DE/FUZZY_MAP_pre.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,6 @@
185185
# ANCHOR: The following line is controlled by the toggle script.
186186
# best disable before run self-tester rules like: match all to nothing. like: .+ -> or .* -> ''
187187
# TRANSLATION_RULE
188-
('', r'.+', 5, {'flags': re.IGNORECASE,'on_match_exec': [CONFIG_DIR / 'translate_from_to.py']}),
188+
#('', r'.+', 5, {'flags': re.IGNORECASE,'on_match_exec': [CONFIG_DIR / 'translate_from_to.py']}),
189189

190190
]

config/maps/plugins/standard_actions/language_translator/de-DE/translate_from_to.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616

1717
from config.settings import LANGUAGE_PREFIXES, SIGNATURE_MAPPING # signatur_ar,signatur_en,signatur_pt_br,signatur_ja
18-
from scripts.py.func.handle_trigger import text_detected
18+
# from scripts.py.func.handle_trigger import text_detected
1919

2020
from scripts.py.func.simple_plugin_cache import get_cached_result, set_cached_result
2121

@@ -31,9 +31,9 @@
3131

3232
# config/maps/plugins/standard_actions/language_translator/de-DE/translate_from_to.py
3333

34-
import time
35-
import re
36-
from scripts.py.func.global_state import SIGNATURE_TIMES, SEQUENCE_LOCK
34+
# import time
35+
# import re
36+
# from scripts.py.func.global_state import SEQUENCE_LOCK
3737

3838

3939
def get_current_signature(lang_target, window_title):
@@ -231,6 +231,7 @@ def execute(match_data):
231231
cache_key_args,
232232
translated_text # Speichere nur die erfolgreiche menschenlesbare Antwort
233233
)
234+
# config/maps/plugins/standard_actions/language_translator/de-DE/translate_from_to.py:234
234235
return translated_text
235236

236237

config/settings.py

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import re
21

32
# config/settings.py
43
# Central configuration for the application
@@ -48,12 +47,6 @@
4847
signatur=''
4948
signatur='🗣SL5net ⟫ Aura'
5049
signatur1=f'{signatur}' # (Powered by
51-
signatur_pt_br=f'Tradução de Voz{signatur}'
52-
signatur_en=f'Voice Translation{signatur}'
53-
signatur_en=f'{signatur}'
54-
signatur_ar=f"تحدثت الترجمة{signatur} "
55-
signatur_ja=f"話し言葉の翻訳{signatur} "
56-
5750

5851
LANGUAGE_PREFIXES = {
5952
"pt-br": "Tradução de Voz",
@@ -69,32 +62,13 @@
6962

7063
# Format: { "Regex-Pattern": ( "Signatur-Text", Cooldown_in_Sekunden ) }
7164
SIGNATURE_MAPPING = {
72-
r"0 a\.a\.": ("SL5net >> Aura", 14400), # 4 Stunden für Spiele
65+
r"0 a\.d\.": ("SL5net >> Aura", 14400), # 4 Stunden für Spiele
7366
r"Matrix|Discord": ("🗣SL5net ⟫ Aura", 3600), # 1 Stunde für Chat
7467
r"Outlook|Mail": ("-- Sent via Aura --", 86400), # 1 Tag für E-Mails
7568
"Konsole|kate": ("", 86400),
7669
r".*": ("🗣[ SL5net Aura ]", 1800) # 30 Min Fallback
7770
}
7871

79-
SIGNATURE_MAPPING_202601301653 = {
80-
r"0 a\.a\.": "SL5net >> Aura", # Regex für 0 A.D.
81-
r"Matrix|Element|Discord": "🗣SL5net ⟫ Aura", # Mehrere Apps gleichzeitig
82-
"DEFAULT": "🗣SL5net ⟫ Aura", # Fallback
83-
"Konsole": "",
84-
r".*": "🗣[ SL5net Aura ]" # Fallback (entspricht DEFAULT)
85-
}
86-
87-
SIGNATURE_MAPPING_old = {
88-
"0 a.d.": "SL5net >> Aura 0 A.D.", # Rein ASCII für das Spiel
89-
"Matrix": "🗣SL5net ⟫ Aura", # Mit Unicode für moderne Chats
90-
"Discord": "🗣SL5net ⟫ Aura",
91-
"DEFAULT": "🗣SL5net ⟫ Aura" # Fallback
92-
}
93-
94-
95-
96-
97-
9872

9973
# --- Language Model Preloading ---
10074
# A list of Vosk model folder names to preload at startup if memory allows.

scripts/py/func/process_text_in_background.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,6 +1894,7 @@ def apply_all_rules_until_stable(text, rules_map, logger_instance):
18941894
'rule_options': options_dict
18951895
}
18961896

1897+
# scripts/py/func/process_text_in_background.py:1897
18971898
on_match_exec_list = options_dict.get('on_match_exec', [])
18981899
for script_path in on_match_exec_list:
18991900
module = load_module_from_path(script_path)

0 commit comments

Comments
 (0)