Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
9493837b
Commit
9493837b
authored
Feb 17, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_web_renderjs_ui: extract translatable file list
parent
78718f5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
32 deletions
+5
-32
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/Base_createTranslateData.py
...ortal_skins/erp5_web_renderjs/Base_createTranslateData.py
+3
-0
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/Base_getTranslationSourceFileList.py
...ns/erp5_web_renderjs/Base_getTranslationSourceFileList.py
+1
-31
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_getPrecacheManifest.py
...skins/erp5_web_renderjs/WebSection_getPrecacheManifest.py
+1
-1
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_getPrecacheManifest.xml
...kins/erp5_web_renderjs/WebSection_getPrecacheManifest.xml
+0
-0
No files found.
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/Base_createTranslateData.py
View file @
9493837b
...
@@ -45,6 +45,9 @@ content += ";\n}(window));"
...
@@ -45,6 +45,9 @@ content += ";\n}(window));"
translation_data_file
=
context
.
web_page_module
.
searchFolder
(
portal_type
=
'Web Script'
,
reference
=
translation_data_file
)[
0
]
translation_data_file
=
context
.
web_page_module
.
searchFolder
(
portal_type
=
'Web Script'
,
reference
=
translation_data_file
)[
0
]
translation_data_file
.
edit
(
text_content
=
content
)
translation_data_file
.
edit
(
text_content
=
content
)
# Edit web section modification date
context
.
edit
()
if
batch_mode
:
if
batch_mode
:
return
'done'
return
'done'
return
context
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
Base_translateString
(
"Translation Data Create"
)))
return
context
.
Base_redirect
(
'view'
,
keep_items
=
dict
(
portal_status_message
=
Base_translateString
(
"Translation Data Create"
)))
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/Base_getTranslationSourceFileList.py
View file @
9493837b
import
re
filename_list
=
context
.
WebSection_getPrecacheManifest
()
service_worker_reference
=
context
.
getLayoutProperty
(
"configuration_service_worker_url"
,
default
=
"gadget_erp5_serviceworker.js"
)
service_worker
=
context
.
getPortalObject
().
portal_catalog
.
getResultValue
(
portal_type
=
'Web Script'
,
reference
=
service_worker_reference
)
if
service_worker
is
None
:
text_content
=
''
else
:
text_content
=
service_worker
.
getTextContent
()
filename_pattern
=
re
.
compile
(
"'(?P<filename>[a-zA-Z0-9-_
\
.
\
?=]*)'"
)
filename_list
=
[]
start
=
False
for
line
in
text_content
.
split
(
'
\
n
'
):
if
start
is
False
and
'REQUIRED_FILES'
in
line
:
start
=
True
continue
if
not
line
:
continue
if
start
:
if
']'
in
line
:
break
matched
=
filename_pattern
.
search
(
line
)
if
matched
is
not
None
:
filename
=
matched
.
groupdict
().
get
(
'filename'
)
if
filename
:
filename_list
.
append
(
filename
)
file_list
=
[]
file_list
=
[]
translation_data_file
=
[]
translation_data_file
=
[]
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs
_ui
/WebSection_getPrecacheManifest.py
→
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_getPrecacheManifest.py
View file @
9493837b
...
@@ -145,7 +145,7 @@ url_list = [
...
@@ -145,7 +145,7 @@ url_list = [
'gadget_editor.js'
,
'gadget_editor.js'
,
'gadget_button_maximize.html'
,
'gadget_button_maximize.html'
,
'gadget_button_maximize.js'
,
'gadget_button_maximize.js'
,
'
handlebars
.js'
,
'
domsugar
.js'
,
'jiodev.js'
,
'jiodev.js'
,
'renderjs.js'
,
'renderjs.js'
,
'rsvp.js'
,
'rsvp.js'
,
...
...
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs
_ui
/WebSection_getPrecacheManifest.xml
→
bt5/erp5_web_renderjs_ui/SkinTemplateItem/portal_skins/erp5_web_renderjs/WebSection_getPrecacheManifest.xml
View file @
9493837b
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment