Skip to content
Snippets Groups Projects
Commit 729f223b authored by Jan Zerdik's avatar Jan Zerdik
Browse files

Comment explainin templates for babel mapping files.

(Redmine issue: #6222)
parent 1b1f06e9
No related branches found
No related tags found
No related merge requests found
......@@ -107,15 +107,10 @@ cpybabel-compile: FORCE
$(PYBABEL) compile -d $${class}translations; \
done
aaa:
@echo $(ESCAPED_DIR_TEMPLATES_INFORMANT)
@echo $(DIR_LIB) | sed 's/\//\\\//g'
@echo $(echo aaaaa)
@echo 's/{DIR_LIB}/'echo aaa'/g'
@echo 's/{DIR_LIB}/$(echo $(DIR_LIB) | sed -e 's/\//\\\//g')/g'
@cat $(DIR_TEMPLATES_REPORTER)/babel.cfg | sed 's,{DIR_LIB},$(DIR_LIB),g' | sed 's,{DIR_TEMPLATES_REPORTER},${DIR_TEMPLATES_REPORTER},g' > $(TMP_BABEL_CONF)
# Babel does not support paths containing parent directory (..) in mapping files.
# Because of that if you need path including directories higher in tree that your pwd you need the root.
# So babel.cfg located in mentat components are templates that are filled with absolute paths to its respective jinja files and python files in mentat packages.
# cut is used to remove slash from begging of path returned by realpath because babel needs path as relative to its input directory.
#
# Alternative solution that uses the hawat-cli utility:
# APP_ROOT_PATH=$(shell realpath ./chroot) hawat-cli intl init $(INIT_LOCALE)
......@@ -152,7 +147,6 @@ hpybabel-compile: cpybabel-compile
@$(PYBABEL) compile -d $(DIR_LIB_HAWAT)/translations
@$(PYBABEL) compile -d $(DIR_TEMPLATES_REPORTER)/translations
mpybabel-init: cpybabel-init
@echo "\n$(GREEN)*** Initializing translations for new locale for Mentat ***$(NC)\n"
@echo "Locale name: $(INIT_LOCALE)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment