]> git.evergreen-ils.org Git - working/Evergreen.git/blob - build/i18n/Makefile
Add fieldmapper IDL -> POT support to i18n Makefile
[working/Evergreen.git] / build / i18n / Makefile
1 POOUTDIR=po
2 POINDIR=po
3 LOCALE=fr-CA
4 DTDDIR=../../Open-ILS/web/opac/locale
5 PROPSDIR=../../Open-ILS/xul/staff_client/chrome/locale
6 FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml
7 FMIDLOUT=fm_IDL.pot
8 SQLSRC=../../Open-ILS/src/sql/Pg/950.data.seed-values.sql
9 SQLOUT=db.seed.pot
10 PROGRESS=--progress none
11
12 # This Makefile can be used to generate and update PO files for Evergreen,
13 # as well as generate updated SQL, fieldmapper IDL, DTD and JavaScript
14 # property files from the PO.
15 #
16 # Usage:
17 #
18 # To create a new set of untranslated PO files for locale ll-LL:
19 #   make LOCALE=ll-LL newpo
20 #
21 # To create a new set of POT files from the en-US source:
22 #   make LOCALE=ll-LL newpot
23 #
24 # To update a set of translated PO files with new or changed en-US strings:
25 #   make LOCALE=ll-LL updatepo
26
27 newpo: dtds2po props2po
28         @echo "Generated new PO files for locale $(LOCALE)"
29
30 newpot: dtds2pot fmidl2pot props2pot sql2pot
31         @echo "Generated new POT files"
32
33 newproject: po2dtds po2props
34         @echo "Generated newly translated project files for locale $(LOCALE)"
35
36 updatepo: 
37         @pot2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(POOUTDIR) -t $(POOUTDIR)/$(LOCALE) 2>&1
38         @echo "Updated PO files for locale $(LOCALE)"
39
40 updateproject: update_moz_dtds update_moz_props
41         @echo "Updated translated project files for locale $(LOCALE)"
42
43 dtds2po:
44         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(DTDDIR)/en-US/ 2>&1
45
46 props2po:
47         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(PROPSDIR)/en-US/ 2>&1
48
49 dtds2pot:
50         @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(DTDDIR)/en-US/ 2>&1
51
52 props2pot:
53         @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(PROPSDIR)/en-US/ 2>&1
54
55 po2dtds:
56         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
57
58 po2props:
59         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
60
61 sql2pot:
62         @scripts/db-seed-i18n.py --pot $(SQLSRC) --output $(POOUTDIR)/$(SQLOUT)
63
64 fmidl2pot:
65         @scripts/fieldmapper.py --pot $(FMIDLSRC) --output $(POOUTDIR)/$(FMIDLOUT)
66
67 update_moz_dtds:
68         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
69
70 update_moz_props:
71         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1