Skip to content

Commit

Permalink
feat: standardize make extract_translations
Browse files Browse the repository at this point in the history
Refs: FC-0012 OEP-58
  • Loading branch information
shadinaif committed May 8, 2023
1 parent 4ed8b53 commit 004609d
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ ifeq ($(strip $(po_files)),)
endif
mo_files := $(patsubst %.po,%.mo,$(po_files))

WORKING_DIR := $(module_root)
EXTRACT_DIR := $(WORKING_DIR)/conf/locale/en/LC_MESSAGES
EXTRACTED_DJANGO_PARTIAL := $(EXTRACT_DIR)/django-partial.po
EXTRACTED_DJANGO := $(EXTRACT_DIR)/django.po

.PHONY: help
help: ## This.
@perl -ne 'print if /^[a-zA-Z_-]+:.*## .*$$/' $(MAKEFILE_LIST) \
Expand Down Expand Up @@ -133,3 +138,7 @@ docker_shell:
docker_static: ; make build_docker; $(run-in-docker) ## Compile static assets in docker container
docker_translations: ; make build_docker; $(run-in-docker) ## Update translation files in docker container
docker_test: ; make build_docker; $(run-in-docker) ## Run tests in docker container

extract_translations: ## extract strings to be translated, outputting .po files
cd $(WORKING_DIR) && i18n_tool extract
mv $(EXTRACTED_DJANGO_PARTIAL) $(EXTRACTED_DJANGO)
1 change: 0 additions & 1 deletion freetextresponse/conf/locale

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions freetextresponse/conf/locale/en/LC_MESSAGES/text.po
1 change: 1 addition & 0 deletions freetextresponse/translations

0 comments on commit 004609d

Please sign in to comment.