Commit 9961bb97 authored by Michal Čihař's avatar Michal Čihař

Export template filename to hooks

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 82918110
...@@ -258,6 +258,10 @@ Additionally following environment variables are available: ...@@ -258,6 +258,10 @@ Additionally following environment variables are available:
File mask for current component. File mask for current component.
.. envvar:: WL_TEMPLATE
File name of template for monolingual translations (can be empty).
.. envvar:: WL_FILE_FORMAT .. envvar:: WL_FILE_FORMAT
File format used in current component. File format used in current component.
......
...@@ -72,6 +72,7 @@ def run_hook(component, translation, script, *args): ...@@ -72,6 +72,7 @@ def run_hook(component, translation, script, *args):
environment['WL_REPO'] = target.repo environment['WL_REPO'] = target.repo
environment['WL_PATH'] = target.get_path() environment['WL_PATH'] = target.get_path()
environment['WL_FILEMASK'] = component.filemask environment['WL_FILEMASK'] = component.filemask
environment['WL_TEMPLATE'] = component.template
environment['WL_FILE_FORMAT'] = component.file_format environment['WL_FILE_FORMAT'] = component.file_format
if translation: if translation:
environment['WL_LANGUAGE'] = translation.language_code environment['WL_LANGUAGE'] = translation.language_code
......
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