Skip to content

Commit

Permalink
[20] fix translations
Browse files Browse the repository at this point in the history
  • Loading branch information
meisnate12 committed Jan 16, 2023
1 parent 17f7208 commit d4d3628
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.2-develop19
1.18.2-develop20
9 changes: 6 additions & 3 deletions defaults/translations/it.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 1.18.0.7
version: 1.18.2.1
variables:
library_translation:
# For Movie Libraries
Expand Down Expand Up @@ -265,8 +265,11 @@ translations:
emmy_year_name: Emmys <<translated_key_name>>
emmy_year_summary: Vincitori Emmy <<translated_key_name>>.

golden_best_name: Golden Globe Miglior Film
golden_best_summary: Golden Globe Miglior Film.
golden_picture_name: Vincitori dei Golden Globes per il Miglior Film
golden_picture_summary: Vincitori dei Golden Globes per il Miglior Film.

golden_director_name: Vincitori dei Golden Globes per il Miglior Regista
golden_director_summary: Vincitori dei Golden Globes come Miglior Regista.

# example key_name: 2022
golden_year_name: Golden Globe <<translated_key_name>>
Expand Down
7 changes: 5 additions & 2 deletions defaults/translations/pt-br.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,11 @@ translations:
emmy_year_name: Emmys <<translated_key_name>>
emmy_year_summary: <<translated_key_name>> Vencedores do Emmy.

golden_best_name: Globo de Ouro de Melhores Filmes
golden_best_summary: Globo de Ouro de Melhores Filmes.
golden_picture_name: Globos de Ouro Melhores Vencedores
golden_picture_summary: Golden Globes Best Picture Winners.

golden_director_name: Globos de Dourado Melhores Vencedores Directores
golden_director_summary: Golden Globes Best Director Winners.

# example key_name: 2022
golden_year_name: Globo de Ouro <<translated_key_name>>
Expand Down
6 changes: 3 additions & 3 deletions modules/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def load_file(self, file_type, file_path, overlay=False, translation=False):
raise Failed(f"URL Error: Top Level translations attribute not found in {content_path}")
translations = {k: {"default": v} for k, v in yaml.data["translations"].items()}
lib_type = self.library.type.lower() if self.library else "item"
logger.debug(f"Translations Loaded From: {dir_path}")
logger.trace(f"Translations Loaded From: {dir_path}")
key_names = {}
variables = {k: {"default": v[lib_type]} for k, v in yaml.data["variables"].items()}

Expand All @@ -165,9 +165,9 @@ def add_translation(yaml_path, yaml_key, data=None):
if translation_key in yaml_content.data["translations"]:
translations[translation_key][yaml_key] = yaml_content.data["translations"][translation_key]
else:
logger.error(f"Translation Error: translations attribute {translation_key} not found in {yaml_path}")
logger.trace(f"Translation Error: translations attribute {translation_key} not found in {yaml_path}")
else:
logger.error(f"Config Error: Top Level translations attribute not found in {yaml_path}")
logger.trace(f"Config Error: Top Level translations attribute not found in {yaml_path}")

if "key_names" in yaml_content.data and yaml_content.data["key_names"]:
for kn, vn in yaml_content.data["key_names"].items():
Expand Down

0 comments on commit d4d3628

Please sign in to comment.