Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MBS-13740: Split report strings into reports translation component #3364

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintrc.unfixed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ rules:
"l_relationships",
"ln_relationships",
"lp_relationships",
"l_reports",
"l_scripts",
"ln_scripts",
"lp_scripts",
Expand All @@ -34,6 +35,7 @@ rules:
"N_l",
"N_ln",
"N_lp",
"N_l_reports",
"N_l_statistics",
"N_lp_statistics",
"__webpack_public_path__",
Expand Down
4 changes: 4 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default [
l_languages: 'readonly',
ln_languages: 'readonly',
lp_languages: 'readonly',
l_reports: 'readonly',
l_relationships: 'readonly',
ln_relationships: 'readonly',
lp_relationships: 'readonly',
Expand All @@ -103,6 +104,7 @@ export default [
l_statistics: 'readonly',
ln_statistics: 'readonly',
lp_statistics: 'readonly',
N_l_reports: 'readonly',
N_l_statistics: 'readonly',
N_lp_statistics: 'readonly',
},
Expand Down Expand Up @@ -223,6 +225,7 @@ export default [
'l_languages',
'ln_languages',
'lp_languages',
'l_reports',
'l_relationships',
'ln_relationships',
'lp_relationships',
Expand All @@ -235,6 +238,7 @@ export default [
'N_l',
'N_ln',
'N_lp',
'N_l_reports',
'N_l_statistics',
'N_lp_statistics',
'__webpack_public_path__',
Expand Down
13 changes: 12 additions & 1 deletion po/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GIT_LS_PERL:=git ls-files -- \
GIT_LS_JS:=git ls-files -- \
':(top,glob)root/**/*.js' \
':(top,glob,exclude)root/admin/**/*.js' \
':(top,glob,exclude)root/report/**/*.js' \
':(top,glob,exclude)root/static/scripts/tests/**/*.js' \
':(top,glob,exclude)root/static/build/**/*.js' \
':(top,glob,exclude)root/static/lib/**/*.js' \
Expand All @@ -28,6 +29,10 @@ GIT_LS_STATTT:=git ls-files -- \
':(top,glob)root/statistics/**/*.tt' \
| $(SED_ESCAPE_SPACES)

GIT_LS_REPORTJS:=git ls-files -- \
':(top,glob)root/report/**/*.js' \
| $(SED_ESCAPE_SPACES)

GIT_LS_STATJS:=git ls-files -- \
':(top,glob)root/statistics/**/*.js' \
| $(SED_ESCAPE_SPACES)
Expand All @@ -37,6 +42,7 @@ JSFILES=$(shell $(GIT_LS_JS))
TT=$(shell $(GIT_LS_TT))
STATTT=$(shell $(GIT_LS_STATTT))
STATJS=$(shell $(GIT_LS_STATJS))
REPORTJS=$(shell $(GIT_LS_REPORTJS))

POFILES=$(wildcard *.po)
MOFILES=$(POFILES:.po=.mo)
Expand All @@ -62,7 +68,7 @@ install: $(MOFILES)
install -m 0644 $$file ../lib/LocaleData/$$lang/LC_MESSAGES/$$catalog.mo; \
done

pot: mb_server.pot statistics.pot countries.pot languages.pot languages_notrim.pot scripts.pot relationships.pot attributes.pot instruments.pot instrument_descriptions.pot history.pot
pot: mb_server.pot statistics.pot countries.pot languages.pot languages_notrim.pot scripts.pot relationships.pot attributes.pot instruments.pot instrument_descriptions.pot history.pot reports.pot

mb_server.pot: $(POTFILES) $(JSFILES) $(TT) $(wildcard extract_pot_templates)
@echo "Rebuilding the mb_server.pot file";
Expand All @@ -85,6 +91,11 @@ statistics.pot: $(STATTT) $(STATJS) $(wildcard extract_pot_db) $(wildcard extrac
@msgcat -w $(MSGWRAP) -o statistics.pot statistics_db.pot statistics_tmpl.pot statistics_js.pot
@rm statistics_db.pot statistics_tmpl.pot statistics_js.pot

reports.pot: $(REPORTJS)
@echo "Rebuilding the reports.pot file";
@echo "- Update templates .pot";
@$(GIT_LS_REPORTJS) | xargs ../script/xgettext.js > reports.pot

countries.pot: $(wildcard extract_pot_db)
@echo "Rebuilding the countries.pot file";
@echo "- Update database .pot";
Expand Down
Loading