LNG: moved languages.json so weblate skips it

Signed-off-by: jokob-sk <jokob.sk@gmail.com>
This commit is contained in:
jokob-sk
2026-03-05 18:50:21 +11:00
parent a0048980b8
commit 5a6de6d832
6 changed files with 5 additions and 5 deletions

View File

@@ -8,7 +8,7 @@
$defaultLang = "en_us";
// Load the canonical language list from languages.json — do not hardcode here.
$_langJsonPath = dirname(__FILE__) . '/languages.json';
$_langJsonPath = dirname(__FILE__) . '/language_definitions/languages.json';
$_langJson = json_decode(file_get_contents($_langJsonPath), true);
$allLanguages = array_column($_langJson['languages'], 'code');

View File

@@ -46,7 +46,7 @@ def load_language_codes(languages_json_path):
if __name__ == "__main__":
current_path = os.path.dirname(os.path.abspath(__file__))
# language codes are loaded from languages.json — add a new language there
languages_json = os.path.join(current_path, "languages.json")
languages_json = os.path.join(current_path, "language_definitions/languages.json")
codes = load_language_codes(languages_json)
file_paths = [os.path.join(current_path, f"{code}.json") for code in codes]
merge_translations(file_paths[0], file_paths[1:])

View File

@@ -563,7 +563,7 @@ class Query(ObjectType):
langStrings = []
# --- CORE JSON FILES ---
language_folder = '/app/front/php/templates/language/'
language_folder = '/app/front/php/templates/language/language_definitions/'
if os.path.exists(language_folder):
for filename in os.listdir(language_folder):
if filename.endswith('.json') and filename != 'languages.json':

View File

@@ -7,7 +7,7 @@ from logger import mylog
INSTALL_PATH = os.getenv("NETALERTX_APP", "/app")
LANGUAGES_JSON_PATH = os.path.join(
INSTALL_PATH, "front", "php", "templates", "language", "languages.json"
INSTALL_PATH, "front", "php", "templates", "language", "language_definitions", "languages.json"
)

View File

@@ -27,7 +27,7 @@ from messaging.in_app import write_notification
# ===============================================================================
_LANGUAGES_JSON = os.path.join(
applicationPath, "front", "php", "templates", "language", "languages.json"
applicationPath, "front", "php", "templates", "language", "language_definitions" ,"languages.json"
)