From 1180a20486676d191be146706cd31fceda6800bf Mon Sep 17 00:00:00 2001 From: Cory Francis Myers Date: Tue, 23 Nov 2021 12:43:35 -0800 Subject: [PATCH] remove targets whose functions can be deferred to Weblate add-ons --- Makefile | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/Makefile b/Makefile index 385869793..d236e1716 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,6 @@ version: ############## LOCALE_DIR=securedrop_client/locale -LOCALES=$(shell find ${LOCALE_DIR} -name "*.po") POT=${LOCALE_DIR}/messages.pot SUPPORTED_LOCALES_LIST=l10n.txt VERSION=$(shell python -c "import securedrop_client; print(securedrop_client.__version__)") @@ -208,12 +207,6 @@ check-strings: ## Check that the translation catalog is up to date with source c .PHONY: extract-strings extract-strings: ## Extract translatable strings from source code @make --always-make ${POT} - @for catalog in $$(find ${LOCALE_DIR} -name "*.po"); do make $${catalog}; done - -# Compile loadable/packageable MOs. -.PHONY: compile-translation-catalogs -compile-translation-catalogs: ${LOCALE_DIR}/*/LC_MESSAGES/messages.mo - @for locale in $^; do make $${locale}; done # Derive POT from sources. $(POT): securedrop_client @@ -233,34 +226,6 @@ $(POT): securedrop_client $^ @sed -i -e '/^"POT-Creation-Date/d' ${POT} -# Merge current POT with a locale's PO. -# -# NB. freedomofpress/securedrop/securedrop/i18n_tool.py updates via -# msgmerge even though pybabel.update() is available. Here we use -# "pybabel update" for consistency with "pybabel extract". -${LOCALE_DIR}/%/LC_MESSAGES/messages.po: ${POT} -ifeq ($(strip $(LOCALES)),) - @echo "no translation catalogs to update" -else - @pybabel update \ - --locale $$(echo $@ | grep -Eio "[a-zA-Z_]+/LC_MESSAGES/messages.po" | sed 's/\/LC_MESSAGES\/messages.po//') \ - --input-file ${POT} \ - --output-file $@ \ - --no-wrap \ - --previous - @sed -i -e '/^"POT-Creation-Date/d' $@ -endif - -# Compile a locale's PO to MO for (a) development runtime or (b) packaging. -${LOCALE_DIR}/%/LC_MESSAGES/messages.mo: ${LOCALE_DIR}/%/LC_MESSAGES/messages.po -ifeq ($(strip $(LOCALES)),) - @echo "no translation catalogs to compile" -else - @pybabel compile \ - --directory ${LOCALE_DIR} \ - --statistics -endif - # List languages 100% translated in Weblate. .PHONY: supported-languages supported-languages: