[63] translation update

This commit is contained in:
meisnate12 2022-09-30 11:56:13 -04:00
parent 901ec5a3aa
commit cd4b7b971c
22 changed files with 142 additions and 42 deletions

View file

@ -1 +1 @@
1.17.3-develop62
1.17.3-develop63

View file

@ -49,4 +49,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: bafta_year
translation_key:
default: bafta_year

View file

@ -75,4 +75,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: cannes_year
translation_key:
default: cannes_year

View file

@ -69,7 +69,8 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: choice_year
translation_key:
default: choice_year
url:
2019: critics
2018: critics

View file

@ -66,4 +66,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: emmy_year
translation_key:
default: emmy_year

View file

@ -81,4 +81,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: golden_year
translation_key:
default: golden_year

View file

@ -89,4 +89,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: oscars_year
translation_key:
default: oscars_year

View file

@ -59,4 +59,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: spirit_year
translation_key:
default: spirit_year

View file

@ -75,4 +75,5 @@ dynamic_collections:
- arr
- custom
template_variables:
translation_key: sundance_year
translation_key:
default: sundance_year

View file

@ -65,5 +65,6 @@ dynamic_collections:
- translation
- shared
template_variables:
translation_key: actor
translation_key:
default: actor

View file

@ -60,12 +60,14 @@ dynamic_collections:
- audio_language_dynamic
- translation
- shared
template_variables:
translation_key: audio_language
other_template:
- other_collection
- audio_language_dynamic
- shared
template_variables:
translation_key:
default: audio_language
other: audio_language_other
include:
- ab # Abkhazian
- aa # Afar

View file

@ -57,7 +57,7 @@ collections:
dynamic_collections:
UK Content Rating:
type: content_rating
title_format: <<key_name>>
title_format: <<key_name>> <<library_type>>s
other_name: Other Ratings
template:
- content_rating_dynamic
@ -69,7 +69,9 @@ dynamic_collections:
- content_rating_dynamic
- shared
template_variables:
translation_key: content_rating_uk
translation_key:
default: content_rating_uk
other: content_rating_uk_other
include:
- U
- PG

View file

@ -26,10 +26,13 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: "06"
translations:
pmm: translations
templates:
genre_dynamic:
default:
@ -49,10 +52,14 @@ collections:
dynamic_collections:
Genre:
type: genre
title_format: <<key_name>>
title_format: <<key_name>> <<library_type>>s
template:
- genre_dynamic
- translation
- shared
template_variables:
translation_key:
default: genre
title_override:
Biography: Biopic
addons:

View file

@ -26,10 +26,13 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: 15
translations:
pmm: translations
templates:
resolution_dynamic:
default:
@ -52,7 +55,11 @@ dynamic_collections:
title_format: <<key_name>> <<library_type>>s
template:
- resolution_dynamic
- translation
- shared
template_variables:
translation_key:
default: resolution
addons:
1080:
- 2k

View file

@ -28,10 +28,13 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: 15
translations:
pmm: translations
templates:
resolution_dynamic:
default:
@ -55,11 +58,16 @@ dynamic_collections:
other_name: Other Resolutions
template:
- resolution_dynamic
- translation
- shared
other_template:
- other_collection
- resolution_dynamic
- shared
template_variables:
translation_key:
default: resolution_standards
other: resolution_standards_other
include:
- 480
- 720

View file

@ -72,10 +72,14 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: "03"
translations:
pmm: translations
templates:
streaming:
default:
@ -112,9 +116,12 @@ dynamic_collections:
amazon: Prime Video
title_format: <<key_name>> <<library_type>>s
template_variables:
translation_key:
default: streaming
use:
hayu: show
template:
- streaming
- translation
- shared
- arr

View file

@ -26,10 +26,13 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: "07"
translations:
pmm: translations
templates:
studio_dynamic:
default:
@ -55,7 +58,13 @@ dynamic_collections:
title_format: <<key_name>>
template:
- studio_dynamic
- translation
- shared
template_variables:
translation_key:
default: studio
contains:
20th Century Studios: 20th Century
include:
- 20th Century Studios
- Amazon Studios
@ -167,7 +176,4 @@ dynamic_collections:
- Walt Disney Animation Studios
Warner Bros. Pictures:
- Warner
- Warner Animation Group
template_variables:
contains:
20th Century Studios: 20th Century
- Warner Animation Group

View file

@ -28,10 +28,13 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: 11
translations:
pmm: translations
templates:
subtitle_language_dynamic:
default:
@ -55,11 +58,17 @@ dynamic_collections:
other_name: Other Subtitles
template:
- subtitle_language_dynamic
- translation
- shared
other_template:
- other_collection
- subtitle_language_dynamic
- translation
- shared
template_variables:
translation_key:
default: subtitle_language
other: subtitle_language_other
include:
- ab # Abkhazian
- aa # Afar

View file

@ -30,10 +30,13 @@
#############################################################
external_templates:
git: PMM/templates
pmm: templates
template_variables:
collection_section: 13
translations:
pmm: translations
templates:
year_dynamic:
default:
@ -62,4 +65,8 @@ dynamic_collections:
ending: current_year
template:
- year_dynamic
- translation
- shared
template_variables:
translation_key:
default: year

View file

@ -3,25 +3,25 @@ translations:
bafta_best_summary: British Academy of Film and Television Arts Best Film Winners
bafta_year_name: BAFTA <<key_name>>
bafta_year_summary: <<key>> BAFTA Awards
bafta_year_summary: <<key_name>> BAFTA Awards
cannes_best_name: Cannes Golden Palm Winners
cannes_best_summary: Cannes Golden Palm Winners
cannes_year_name: Cannes <<key_name>>
cannes_year_summary: <<key>> Cannes Awards
cannes_year_summary: <<key_name>> Cannes Awards
choice_year_name: Critics Choice Awards <<key_name>>
choice_year_summary: <<key>> Critics Choice Awards
choice_year_summary: <<key_name>> Critics Choice Awards
emmy_year_name: Emmys <<key_name>>
emmy_year_summary: <<key>> Emmy Winners
emmy_year_summary: <<key_name>> Emmy Winners
golden_best_name: Golden Globe Best Motion Pictures
golden_best_summary: Golden Globe Best Motion Pictures
golden_year_name: Golden Globe <<key_name>>
golden_year_summary: <<key>> Golden Globe Winners
golden_year_summary: <<key_name>> Golden Globe Winners
oscars_picture_name: Oscars Best Picture Winners
oscars_picture_summary: The Academy Award for Best Picture is one of the Academy Awards presented annually by the Academy of Motion Picture Arts and Sciences since the awards debuted in 1929.
@ -30,7 +30,7 @@ translations:
oscars_director_summary: The Academy Award for Best Director is one of the Academy Awards presented annually by the Academy of Motion Picture Arts and Sciences since the awards debuted in 1929.
oscars_year_name: Oscars Winners <<key_name>>
oscars_year_summary: Academy Awards (Oscars) Winners for <<key>>
oscars_year_summary: Academy Awards (Oscars) Winners for <<key_name>>
berlinale_best_name: Berlinale Golden Bears
berlinale_best_summary: Up to 400 films are shown every year as part of the Berlinale's (Berlin International Film Festival) public programme, the vast majority of which are world or European premieres. Films of every genre, length and format can be submitted for consideration. The Golden Bear (German Goldener Bär) is the highest prize awarded for the best film shown during this festival.
@ -45,18 +45,52 @@ translations:
venice_best_summary: The Venice Film Festival is the oldest film festival in the world. Founded 1932, the festival has since taken place every year in Venice, Italy. It is part of the Venice Biennale, a major biennial exhibition and festival for contemporary art. The festival's Leone d'Oro (Golden Lion) prize is awarded to the best film screened at the festival.
spirit_year_name: Independent Spirit Awards <<key_name>>
spirit_year_summary: <<key>> Independent Spirit Awards
spirit_year_summary: <<key_name>> Independent Spirit Awards
sundance_best_name: Sundance Grand Jury Winners
sundance_best_summary: The Sundance Film Festival is a film festival that takes place annually in the state of Utah, in the United States. It is the largest independent cinema festival in the U.S. Held in January, the festival is the premier showcase for new work from American and international independent filmmakers. The festival comprises competitive sections for American and international dramatic and documentary films, both feature-length films and short films, and a group of non-competitive showcase sections.
sundance_year_name: Sundance Film Festival <<key_name>>
sundance_year_summary: Sundance Film Festival of <<key>>
sundance_year_summary: Sundance Film Festival of <<key_name>>
actor_name: <<key_name>>
actor_summary: <<library_type>>s with <<key_name>>
audio_language_name: <<key_name>> Audio
audio_language_summary: <<library_type>>s filmed in <<key_name>>
audio_language_summary: <<library_type>>s filmed in the <<key_name>> Language
audio_language_other_name: Other Audio
audio_language_other_summary: <<library_type>>s filmed in other uncommon Languages
content_rating_uk: <<key_name>> <<library_type>>s
content_rating_uk_summary: <<library_type>>s that are rated <<key_name>>
content_rating_uk_other_name: Other Ratings
content_rating_uk_other_summary: <<library_type>>s with other uncommon Ratings
genre_name: <<key_name>> <<library_type>>s
genre_summary: <<library_type>>s that have the genre <<key_name>>
resolution_name: <<key_name>> <<library_type>>s
resolution_summary: <<library_type>>s that have the resolution <<key_name>>
resolution_standards_name: <<key_name>> <<library_type>>s
resolution_standards_summary: <<library_type>>s that have the resolution <<key_name>>
resolution_standards_other_name: Other Resolutions
resolution_standards_other_summary: <<library_type>>s that have other uncommon resolutions
streaming_name: <<key_name>> <<library_type>>s
streaming_summary: <<library_type>>s streaming on <<key_name>>
studio_name: <<key_name>>
studio_summary: <<library_type>>s produced by <<key_name>>
subtitle_language_name: <<key_name>> Subtitles
subtitle_language_summary: <<library_type>>s with <<key_name>> Subtitles
subtitle_language_other_name: Other Subtitles
subtitle_language_other_summary: <<library_type>>s with other uncommon Subtitles
year_name: Best of <<key_name>>
year_summary: <<library_type>>s released in <<key_name>>

View file

@ -129,10 +129,12 @@ class DataFile:
raise Failed(f"File Error: File does not exist {content_path}")
yaml = YAML(path=content_path, check_empty=True)
if not translation:
logger.debug(f"File Loaded From: {content_path}")
return yaml.data
if "translations" not in yaml.data:
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"]}
logger.debug(f"Translations Loaded From: {dir_path}")
def add_translation(yaml_path, yaml_key, data=None):
yaml_content = YAML(input_data=data, path=yaml_path if data is None else None, check_empty=True)
@ -818,10 +820,10 @@ class MetadataFile(DataFile):
used_keys.extend(key_value)
og_call = {"value": key_value, auto_type: key_value, "key_name": key_name, "key": key}
for k, v in template_variables.items():
if not isinstance(v, dict):
og_call[k] = v
elif key in v:
if key in v:
og_call[k] = v[key]
elif "default" in v:
og_call[k] = v["default"]
template_call = []
for template_name in template_names:
new_call = og_call.copy()
@ -849,10 +851,10 @@ class MetadataFile(DataFile):
auto_type: other_keys, "key_name": other_name, "key": "other"
}
for k, v in template_variables.items():
if not isinstance(v, dict):
og_other[k] = v
elif "other" in v:
if "other" in v:
og_other[k] = v["other"]
elif "default" in v:
og_other[k] = v["default"]
other_call = []
for other_template in other_templates:
new_call = og_other.copy()

View file

@ -717,7 +717,7 @@ def parse(error, attribute, data, datatype=None, methods=None, parent=None, defa
new_data[str(dict_data_key)] = dict_data_data
final_dict[dict_key] = new_data
else:
final_dict[dict_key] = dict_data
raise Failed(f"{error} Warning: {display} {dict_key} is not a dictionary")
return final_dict
else:
raise Failed(f"{error} Error: {display} {value} is not a dictionary")