]> git.evergreen-ils.org Git - Evergreen.git/blob - build/i18n/Makefile
Enable translation of seed values stored in database.
[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 PROGRESS=--progress none
7
8 # This Makefile can be used to generate and update PO files for Evergreen,
9 # as well as generate updated DTD and JavaScript property files from the PO.
10 #
11 # Usage:
12 #
13 # To create a new set of untranslated PO files for locale ll-LL:
14 #   make LOCALE=ll-LL newpo
15 #
16 # To create a new set of POT files from the en-US source:
17 #   make LOCALE=ll-LL newpot
18 #
19 # To update a set of translated PO files with new or changed en-US strings:
20 #   make LOCALE=ll-LL updatepo
21
22 newpo: dtds2po props2po
23         @echo "Generated new PO files for locale $(LOCALE)"
24
25 newpot: dtds2pot props2pot sql2pot
26         @echo "Generated new POT files"
27
28 newproject: po2dtds po2props
29         @echo "Generated newly translated project files for locale $(LOCALE)"
30
31 updatepo: 
32         @pot2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(POOUTDIR) -t $(POOUTDIR)/$(LOCALE) 2>&1
33         @echo "Updated PO files for locale $(LOCALE)"
34
35 updateproject: update_moz_dtds update_moz_props
36         @echo "Updated translated project files for locale $(LOCALE)"
37
38 dtds2po:
39         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(DTDDIR)/en-US/ 2>&1
40
41 props2po:
42         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(PROPSDIR)/en-US/ 2>&1
43
44 dtds2pot:
45         @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(DTDDIR)/en-US/ 2>&1
46
47 props2pot:
48         @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(PROPSDIR)/en-US/ 2>&1
49
50 po2dtds:
51         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
52
53 po2props:
54         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
55
56 sql2pot:
57         @scripts/db-seed-i18n.py
58
59 update_moz_dtds:
60         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
61
62 update_moz_props:
63         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1