initial structure

This commit is contained in:
Andrew
2025-10-28 19:17:37 +03:00
commit 5cac29f4bd
14 changed files with 192 additions and 0 deletions

1
translations/__init__.py Normal file
View File

@@ -0,0 +1 @@
from translations.helper import gls, load_strings

7
translations/en_US.py Normal file
View File

@@ -0,0 +1,7 @@
STRINGS = {
'welcome_win_title': 'Aegnux — Welcome',
'welcome_to_aegnux': 'Welcome to Aegnux!',
'subtitle_text': 'A simpler way to get After Effects running on GNU/Linux',
'install': 'Install',
'footer_text': 'Made with 💙 by Relative'
}

22
translations/helper.py Normal file
View File

@@ -0,0 +1,22 @@
import os
import importlib
from translations.en_US import STRINGS as EN_STRINGS
STRINGS = {}
def get_current_locale() -> str:
return os.getenv('LANG', 'en_US.UTF-8').split('.')[0]
def load_strings():
global STRINGS
locale = get_current_locale()
try:
mod = importlib.import_module(f'translations.{locale}')
STRINGS = mod.STRINGS
except:
STRINGS = EN_STRINGS
def gls(key: str) -> str:
return STRINGS.get(key, key)

7
translations/ru_RU.py Normal file
View File

@@ -0,0 +1,7 @@
STRINGS = {
'welcome_win_title': 'Aegnux — Добро пожаловать',
'welcome_to_aegnux': 'Добро пожаловать в Aegnux!',
'subtitle_text': 'Более простой способ заставить работать After Effects на GNU/Linux',
'install': 'Установить',
'footer_text': 'Сделано с любовью 💙 Relative'
}