Skip to content

Commit 2be9a16

Browse files
Lukas Geigerclaude
andcommitted
fix: use Path(__file__).parent instead of Path.cwd() in TranslationSystem
Default app_dir in TranslationSystem.__init__ was Path.cwd(), which breaks when the app is launched from a different working directory (e.g. double-click, compiled EXE, or other CWD). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 48863fb commit 2be9a16

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

translator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ def __init__(self, default_lang: str = 'de', app_dir: Path = None):
2828
2929
Args:
3030
default_lang: Standard-Sprache ('de' oder 'en')
31-
app_dir: Verzeichnis der Anwendung (default: aktuelles Verzeichnis)
31+
app_dir: Verzeichnis der Anwendung (default: Verzeichnis dieser Datei)
3232
"""
3333
self.current_lang = default_lang
3434

3535
if app_dir is None:
36-
app_dir = Path.cwd()
36+
app_dir = Path(__file__).parent
3737
self.app_dir = Path(app_dir)
3838

3939
self.translations_file = self.app_dir / "locales" / "translations.json"

0 commit comments

Comments
 (0)