diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2013-03-25 00:12:55 +0100 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2013-03-25 00:12:55 +0100 |
commit | 200910cb3f85d331bd6756ca845b3a70ed2028ce (patch) | |
tree | ea206d6a213906d4e24389bd007aff2da4d6f11b /crawl-ref/source/Makefile | |
parent | 973e247f8fc0ca8da65c7ce35b6493dc0cf421d4 (diff) | |
download | crawl-ref-200910cb3f85d331bd6756ca845b3a70ed2028ce.tar.gz crawl-ref-200910cb3f85d331bd6756ca845b3a70ed2028ce.zip |
Purge the old transifex interface.
Diffstat (limited to 'crawl-ref/source/Makefile')
-rw-r--r-- | crawl-ref/source/Makefile | 136 |
1 files changed, 0 insertions, 136 deletions
diff --git a/crawl-ref/source/Makefile b/crawl-ref/source/Makefile index 6daa0bb472..21f7fbc46c 100644 --- a/crawl-ref/source/Makefile +++ b/crawl-ref/source/Makefile @@ -153,8 +153,6 @@ DOXYGEN = doxygen DOXYGEN_SIMPLE_CONF = crawl_simple.doxy DOXYGEN_ALL_CONF = crawl_all.doxy DOXYGEN_HTML_GEN = html/ -TX-MKINI = util/tx-mkini.pl -TX-MKTXT = util/tx-mktxt.pl export AR export RANLIB @@ -1475,140 +1473,6 @@ l_moninf.o: mi-enum.h macro.o: cmd-name.h ############################################################################# -# Translation files -# -# Only support a single dir for now -TX = tx -TX-CONFIG = .tx/config -TX-SET = $(TX) set --auto-local --source-lang en_AU -t INI --execute -TX-DIR = dat/descript - -# List of languages -TX-LANG = $(filter-out en, $(notdir $(wildcard $(TX-DIR)/??))) - -# Text source files under git versioning -TX-TSOURCES = $(wildcard $(TX-DIR)/*.txt) -TX-TTRANS = $(foreach lang, $(TX-LANG), $(wildcard $(TX-DIR)/$(lang)/*.txt)) -TX-TXT = $(TX-TSOURCES) $(TX-TTRANS) - -# Files generated from the source. To be pushed to transifex -TX-SOURCES = $(TX-TSOURCES:.txt=.ini) -TX-TRANS = $(TX-TTRANS:.txt=.ini) -TX-INI = $(TX-SOURCES) $(TX-TRANS) - -# What file to used to generate the quote files to push to transifex -# We add placeholder entries in it to allow users to submit new quotes -TX-QUOTES = $(TX-DIR)/quotes.ini -TX-QUOTES-ALL = $(TX-DIR)/quotes-all.ini -TX-HAVE-QUOTES = $(foreach name, branches features items monsters unident, $(TX-DIR)/$(name).ini) - -# Files pulled from transifex. It is different than TX-TRANS, because it can -# contain new files for which we have no .txt yet -TX-NEW-TRANS = $(foreach lang, $(TX-LANG), $(wildcard $(TX-DIR)/$(lang)/*.ini)) -TX-NEW-QUOTES = $(TX-DIR)/en/quotes.ini -TX-NEW-TEXT = $(filter-out $(TX-NEW-QUOTES), $(wildcard $(TX-DIR)/en/*.ini)) -TX-NEW = $(TX-NEW-TRANS) $(TX-NEW-TEXT) $(TX-NEW-QUOTES) - -TX-COMMIT-AUTHOR = "Translators <crawl-ref-discuss@lists.sourceforge.net>" - -.PHONY: tx-clean tx-txt tx-init tx-setup tx-check tx-pull tx-push tx-sync - -tx-clean: - @echo "Removing transifex temporary files" - @$(RM) $(TX-INI) $(TX-QUOTES-ALL) $(TX-NEW) - -$(TX-QUOTES-ALL): $(TX-QUOTES) $(TX-HAVE-QUOTES) - util/tx-quotes.pl $(TX-QUOTES) $(TX-QUOTES-ALL) $(TX-HAVE-QUOTES) - -# XXX for database file, we'll need a conditional to remove the -u option. -%.ini: %.txt - $(TX-MKINI) -u $*.txt - -tx-txt: - -if [ "$(TX-NEW-TRANS)" != "" ]; then\ - $(TX-MKTXT) -w $(TX-NEW-TRANS);\ - fi - -if [ "$(TX-NEW-TEXT)" != "" ]; then\ - $(TX-MKTXT) -mw -d $(TX-DIR) $(TX-NEW-TEXT);\ - fi - -if [ "$(TX-NEW-QUOTES)" != "" ]; then\ - $(TX-MKTXT) -amw -d $(TX-DIR) $(TX-NEW-QUOTES);\ - fi - -tx-init: - $(RM) $(TX-CONFIG) - if [ -d .tx ]; then\ - rmdir --ignore-fail-on-non-empty .tx;\ - fi - $(MAKE) tx-setup - -tx-setup: $(TX-SOURCES) $(TX-QUOTES-ALL) - if [ ! -e $(TX-CONFIG) ]; then\ - $(TX) init;\ - fi - for FILE in $(TX-SOURCES); do\ - DIR=$$(dirname $$FILE);\ - RES=$$(basename $$FILE .ini);\ - grep -q dcss.$$RES .tx/config;\ - if [ $$? -ne 0 ]; then\ - if [ $$RES = quotes ]; then\ - SRC=$$DIR/quotes-all.ini;\ - else\ - SRC=$$DIR/$$RES.ini;\ - fi;\ - $(TX-SET) -r dcss.$$RES --source-file $$SRC "$$DIR/<lang>/$$RES.ini";\ - fi;\ - done - -tx-check: $(TX-INI) - @if $(TX-MKTXT) -mtw $(TX-SOURCES) && $(TX-MKTXT) -tw $(TX-TRANS); then\ - exit 0;\ - fi;\ - echo "Changes detected when converting to transifex format.";\ - git diff --quiet HEAD -- $(TX-TXT) || echo "Warning: some of the text files have uncommited changes!";\ - read -p "Attempt automatic fix? (Y/n) " RESP;\ - if [ "$$RESP" = n -o "$$RESP" = N ]; then\ - exit 1;\ - fi;\ - $(TX-MKTXT) -mw $(TX-SOURCES);\ - $(TX-MKTXT) -w $(TX-TRANS);\ - -tx-commit: - @if git diff HEAD --quiet $(TX-TXT); then\ - exit 0;\ - fi;\ - git diff HEAD $(TX-TXT);\ - read -p "Commit? (Y/n) " RESP;\ - if [ "$$RESP" = n -o "$$RESP" = N ]; then\ - exit 1;\ - fi;\ - if [ -z "$(TX-COMMIT-MSG)" ]; then\ - MSG="Transifex.";\ - else\ - MSG="$(TX-COMMIT-MSG)";\ - fi;\ - git add $(TX-TXT);\ - git commit -e -s -m "$$MSG" --author=$(TX-COMMIT-AUTHOR) - -tx-pull: - @echo "Cleaning up downloaded translations.";\ - $(RM) $(TX-NEW) - tx pull -a - -tx-push: $(TX-INI) $(TX-QUOTES-ALL) - $(TX-MKINI) -umd $(TX-DIR)/en $(TX-TSOURCES) - tx push -s - tx push -t --skip - -tx-sync: - $(MAKE) tx-check - @$(MAKE) tx-commit TX-COMMIT-MSG="Transifex format fix." - $(MAKE) tx-pull - $(MAKE) tx-txt - @$(MAKE) tx-commit TX-COMMIT-MSG="Transifex sync." - $(MAKE) tx-push - -############################################################################# # RLTiles # |