summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build_web_resources.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/build_web_resources.py b/scripts/build_web_resources.py
index e3e6eff..f90ce24 100644
--- a/scripts/build_web_resources.py
+++ b/scripts/build_web_resources.py
@@ -174,8 +174,14 @@ while row:
common_data['id'] = problem_id
common_data['identifier'] = problem_identifier
problems_map[problem_identifier] = common_data
- # load and dump translations, for the problem subdirectory's problem.json
- problem_data = {'id': problem_id, 'identifier': problem_identifier, 'translations': load_translation_data(problem_package, problem_props)}
+ # load translations, and copy only problem names to the common data
+ problem_translations = load_translation_data(problem_package, problem_props)
+ name_translations = {}
+ for key, value in problem_translations.items():
+ name_translations[key] = {'name': value.get('name')}
+ common_data['translations'] = name_translations
+ # dump translations, for the problem subdirectory's problem.json
+ problem_data = {'id': problem_id, 'identifier': problem_identifier, 'translations': problem_translations}
problem_output_path = os.path.join(group_output_path, problem_identifier)
if not os.path.exists(problem_output_path):
os.mkdir(problem_output_path)