Indefero

Indefero Commit Details


Date:2011-02-23 08:36:15 (13 years 9 months ago)
Author:William MARTIN
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.1, release-1.2, release-1.3
Commit:c2bf1bac381a166ea40022dd87688bf273a4eaa4
Parents: c2793130485542cede6b87c55cbafe0eeb328775
Message:Remove echo for printf Check if 'src/IDF/conf/path.php' exist before use it

Changes:

File differences

Makefile
2222
2323
2424
25
2625
27
28
26
27
28
29
2930
30
31
3132
32
33
34
35
36
37
33
34
35
36
37
38
3839
3940
4041
41
42
43
44
45
46
47
48
49
50
51
4252
43
53
4454
4555
4656
......
4959
5060
5161
52
62
5363
5464
5565
......
5767
5868
5969
60
70
6171
62
72
6373
64
74
6575
6676
6777
......
7282
7383
7484
75
76
77
78
79
80
81
85
86
87
88
89
90
91
8292
8393
8494
85
86
87
88
89
90
95
96
97
98
99
100
91101
92102
93103
# sudo apt-get install python-setuptools
# sudo easy_install -U transifex-client
PLUF_PATH=$(shell php -r "require_once('src/IDF/conf/path.php'); echo PLUF_PATH;")
all help:
@echo "Rules for generate tarball :"
.PHONY: help
help:
@printf "Rules for generate tarball :\n"
@for b in `git branch | sed "s/^. //g"`; do \
echo -e "\t"$$b"_tarball - Generate a zip archive of the "$$b" branch."; \
printf "\t"$$b"_tarball - Generate a zip archive of the "$$b" branch.\n"; \
done
@echo -e "\nRules for internationnalization :";
@echo -e "\tpot-update - Update the POT file from HTML template and PHP source, then merge it with PO file"
@echo -e "\tpot-push - Send the POT file on transifex server"
@echo -e "\tpo-update - Merge POT file into PO file. POT is not regenerated."
@echo -e "\tpo-push - Send the all PO file on transifex server"
@echo -e "\tpo-pull - Get all PO file from transifex server"
@printf "\nRules for internationnalization :\n";
@printf "\tpot-update - Update the POT file from HTML template and PHP source, then merge it with PO file.\n"
@printf "\tpot-push - Send the POT file on transifex server.\n"
@printf "\tpo-update - Merge POT file into PO file. POT is not regenerated.\n"
@printf "\tpo-push - Send the all PO file on transifex server.\n"
@printf "\tpo-pull - Get all PO file from transifex server.\n"
#
# Internationnalization rule, POT & PO file manipulation
#
#
.PHONY: pluf_path
pluf_path:
ifeq (src/IDF/conf/path.php, $(wildcard src/IDF/conf/path.php))
PLUF_PATH=$(shell php -r "require_once('src/IDF/conf/path.php'); echo PLUF_PATH;")
else
@printf "File 'src/IDF/conf/path.php' don't exist. Please configure it !\n"
@exit 1
endif
.PHONY: pot-update po-update
pot-update:
pot-update: pluf_path
# Backup pot file
@if [ -e src/IDF/locale/idf.pot ]; then \
mv -f src/IDF/locale/idf.pot src/IDF/locale/idf.pot.bak; \
# Extract string
@cd src; php $(PLUF_PATH)/extracttemplates.php IDF/conf/idf.php IDF/gettexttemplates
@cd src; for phpfile in `find . -iname "*.php"`; do \
echo "Parsing file : "$$phpfile; \
printf "Parsing file : "$$phpfile"\n"; \
xgettext -o idf.pot -p ./IDF/locale/ --from-code=UTF-8 -j --keyword --keyword=__ --keyword=_n:1,2 -L PHP $$phpfile ; \
done
#Remove tmp folder
# Update PO
@make po-update
po-update:
po-update: pluf_path
@for pofile in `ls src/IDF/locale/*/idf.po`; do \
echo "Updating file : "$$pofile; \
printf "Updating file : "$$pofile"\n"; \
msgmerge -v -U $$pofile src/IDF/locale/idf.pot; \
echo ; \
printf "\n"; \
done
#
@if [ ! -e .tx/config ]; then \
mkdir -p .tx; \
touch .tx/config; \
echo "[main]" >> .tx/config; \
echo "host = http://www.transifex.net" >> .tx/config; \
echo "" >> .tx/config; \
echo "[indefero.idfpot]" >> .tx/config; \
echo "file_filter = src/IDF/locale/<lang>/idf.po" >> .tx/config; \
echo "source_file = src/IDF/locale/idf.pot" >> .tx/config; \
echo "source_lang = en" >> .tx/config; \
printf "[main]\n" >> .tx/config; \
printf "host = http://www.transifex.net\n" >> .tx/config; \
printf "\n" >> .tx/config; \
printf "[indefero.idfpot]\n" >> .tx/config; \
printf "file_filter = src/IDF/locale/<lang>/idf.po\n" >> .tx/config; \
printf "source_file = src/IDF/locale/idf.pot\n" >> .tx/config; \
printf "source_lang = en\n" >> .tx/config; \
fi
@if [ ! -e $(HOME)/.transifexrc ]; then\
touch $(HOME)/.transifexrc;\
echo "[http://www.transifex.net]" >> $(HOME)/.transifexrc;\
echo "username = " >> $(HOME)/.transifexrc;\
echo "token = " >> $(HOME)/.transifexrc;\
echo "password = " >> $(HOME)/.transifexrc;\
echo "hostname = http://www.transifex.net" >> $(HOME)/.transifexrc;\
echo "You must edit the file ~/.transifexrc to setup your transifex account (login & password) !";\
printf "[http://www.transifex.net]\n" >> $(HOME)/.transifexrc;\
printf "username = \n" >> $(HOME)/.transifexrc;\
printf "token = \n" >> $(HOME)/.transifexrc;\
printf "password = \n" >> $(HOME)/.transifexrc;\
printf "hostname = http://www.transifex.net\n" >> $(HOME)/.transifexrc;\
printf "You must edit the file ~/.transifexrc to setup your transifex account (login & password) !\n";\
exit 1;\
fi

Archive Download the corresponding diff file

Page rendered in 0.07259s using 13 queries.