From 99a0d07adf12f0bbdb0440dc53cc82e5d9b1f999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Wed, 5 Dec 2018 13:05:31 +0100 Subject: [PATCH] Adding i18n-extract task to the Makefile (#2416) --- Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index f4bb9bd6d..229156021 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ POD := $(shell which pod 2> /dev/null) OS := $(shell sh -c 'uname -s 2>/dev/null') BASE_ASSETS = $(shell find assets/base -type d) $(shell find assets/base -type f -name '*') OVERRIDE_ASSETS = $(shell find assets/override -type d 2> /dev/null) $(shell find assets/override -type f -name '*' 2> /dev/null) +MM_UTILITIES_DIR = ../mattermost-utilities node_modules: package.json @if ! [ $(shell which npm 2> /dev/null) ]; then \ @@ -249,6 +250,11 @@ can-build-pr: exit 1; \ fi +i18n-extract: ## Extract strings for translation from the source code + @[[ -d $(MM_UTILITIES_DIR) ]] || echo "You must clone github.com/mattermost/mattermost-utilities repo in .. to use this command" + @[[ -d $(MM_UTILITIES_DIR) ]] && cd $(MM_UTILITIES_DIR) && npm install && npm run babel && node mmjstool/build/index.js i18n extract-mobile + + ## Help documentation https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'