Commit 64d61235 authored by Georgios Dagkakis's avatar Georgios Dagkakis

erp5_web_renderjs_ui: Fixup in obtaining the translation source file list

previous version would keep only one file ending in 'translation_data.js'
which was buggy. The scope here is to return all files,
but put those ending with 'translation_data.js' first,
so that it is more user friendly for user following the convention.

Again for user friendliness, we sort the lists alphabetically also
parent 3707bc1e
Pipeline #8448 passed with stage
filename_list = context.WebSection_getPrecacheManifest()
file_list = []
translation_data_file = []
translation_data_file_list = []
for filename in filename_list:
if filename.endswith('.html'):
file_list.append(filename)
......@@ -9,7 +9,7 @@ for filename in filename_list:
if filename.endswith('.js') and not only_html:
if filename.endswith('translation_data.js'):
translation_data_file = [filename]
translation_data_file_list.append(filename)
continue
file_list.append(filename)
return translation_data_file + file_list
return sorted(translation_data_file_list) + sorted(file_list)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment