Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed May 16, 2022
1 parent acacbb6 commit 69715b1
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,6 @@ jobs:
retention-days: 5
if: failure()

- name: Regenerate the source file
run: rm locales/en/app.json; make locales/en/app.json
- run: make transifex-send
if: env.HAS_SECRETS == 'HAS_SECRETS' && github.ref == format('refs/heads/{0}', env.MAIN_BRANCH)
- run: buildtools/npm-publish
Expand Down
8 changes: 0 additions & 8 deletions .tx/config.mako
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ type = PO
trans.${lang} = .build/locale/${lang}/LC_MESSAGES/ngeo.po
% endfor

[ngeo.gmf-${tx_version.strip()}]
source_file = .build/locale/gmf.pot
source_lang = en
type = PO
% for lang in languages.split():
trans.${lang} = .build/locale/${lang}/LC_MESSAGES/gmf.po
% endfor

[ngeo.webcomponent-${tx_version.strip()}]
source_file = locales/en/app.json
source_lang = en
Expand Down
10 changes: 0 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export GIT_REMOTE_NAME
L10N_LANGUAGES = fr de it
L10N_PO_FILES = \
$(addprefix .build/locale/,$(addsuffix /LC_MESSAGES/ngeo.po, $(L10N_LANGUAGES))) \
$(addprefix .build/locale/,$(addsuffix /LC_MESSAGES/gmf.po, $(L10N_LANGUAGES))) \
$(addprefix .build/locale/,$(addsuffix /LC_MESSAGES/demo.po, $(L10N_LANGUAGES)))
LANGUAGES = en $(L10N_LANGUAGES)
ANGULAR_LOCALES_FILES = $(addprefix contribs/gmf/build/angular-locale_, $(addsuffix .js, $(LANGUAGES)))
Expand Down Expand Up @@ -383,7 +382,6 @@ locales/en/app.json:
.PHONY: transifex-get
transifex-get: $(L10N_PO_FILES) \
.build/locale/ngeo.pot \
.build/locale/gmf.pot \
$(addprefix .build/locale/,$(addsuffix /LC_MESSAGES/apps.po, $(L10N_LANGUAGES)))

.PHONY: transifex-send
Expand All @@ -393,7 +391,6 @@ transifex-send: \
$(HOME)/.transifexrc \
contribs/gmf/apps/.tx/config \
.build/locale/ngeo.pot \
.build/locale/gmf.pot \
.build/locale/apps.pot
$(PY_VENV_BIN)/tx push --source
cd contribs/gmf/apps/; ../../../$(PY_VENV_BIN)/tx push --source
Expand All @@ -404,7 +401,6 @@ transifex-init: .build/python-venv.timestamp \
$(HOME)/.transifexrc \
contribs/gmf/apps/.tx/config \
.build/locale/ngeo.pot \
.build/locale/gmf.pot \
.build/locale/apps.pot
$(PY_VENV_BIN)/tx push --source --force --no-interactive
$(PY_VENV_BIN)/tx push --translations --force --no-interactive
Expand All @@ -416,10 +412,6 @@ transifex-init: .build/python-venv.timestamp \
$(PY_VENV_BIN)/tx pull --resource=ngeo.ngeo-$(TX_VERSION) --language=$* --force --mode=reviewed
$(TOUCHBACK_TXRC)

.build/locale/%/LC_MESSAGES/gmf.po: .tx/config $(HOME)/.transifexrc .build/python-venv.timestamp
$(PY_VENV_BIN)/tx pull --resource=ngeo.gmf-$(TX_VERSION) --language=$* --force --mode=reviewed
$(TOUCHBACK_TXRC)

locales/%/app.json: .tx/config $(HOME)/.transifexrc .build/python-venv.timestamp
mkdir -p $(dir $@)
$(PY_VENV_BIN)/tx pull --resource=ngeo.webcomponent-$(TX_VERSION) --language=$* --force --mode=reviewed
Expand All @@ -438,7 +430,6 @@ locales/%/app.json: .tx/config $(HOME)/.transifexrc .build/python-venv.timestamp

contribs/gmf/build/gmf-%.json: \
.build/locale/%/LC_MESSAGES/ngeo.po \
.build/locale/%/LC_MESSAGES/gmf.po \
.build/locale/%/LC_MESSAGES/demo.po \
.build/node_modules.timestamp
mkdir -p $(dir $@)
Expand Down Expand Up @@ -469,7 +460,6 @@ clean:
rm -rf .build/examples-hosted
rm -rf .build/contribs
rm -f .build/locale/ngeo.pot
rm -f .build/locale/gmf.pot
rm -f .build/locale/demo.pot
rm -rf contribs/gmf/build
rm -f $(ANGULAR_LOCALES_FILES)
Expand Down
2 changes: 1 addition & 1 deletion buildtools/convert-translations
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Existing app.json files are overwritten
""",
epilog="""
To convert one (or more) specific file:
buildtools/convert-translations .build/locale/gmf.pot
buildtools/convert-translations .build/locale/ngeo.pot
To convert all .po and .pot files in the project:
buildtools/convert-translations `find .build -name "*.po*"`
""",
Expand Down

0 comments on commit 69715b1

Please sign in to comment.