]> git.evergreen-ils.org Git - working/Evergreen.git/blob - build/i18n/Makefile
Extend the translation framework to use a 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 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 update a set of translated PO files with new or changed en-US strings:
17 #   make LOCALE=ll-LL updatepo
18
19 newpo: dtds2po props2po
20         @echo "Generated new PO files for locale $(LOCALE)"
21
22 newproject: po2dtds po2props
23         @echo "Generated newly translated project files for locale $(LOCALE)"
24
25 updatepo: update_po_dtds update_po_props
26         @echo "Updated PO files for locale $(LOCALE)"
27
28 updatemoz: update_moz_dtds update_moz_props
29         @echo "Updated translated project files for locale $(LOCALE)"
30
31 dtds2po:
32         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(DTDDIR)/en-US/ 2>&1
33
34 props2po:
35         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(PROPSDIR)/en-US/ 2>&1
36
37 update_po_dtds:
38         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(DTDDIR)/$(LOCALE)/ 2>&1
39
40 update_po_props:
41         @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(PROPSDIR)/$(LOCALE)/ 2>&1
42
43 po2dtds:
44         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
45
46 po2props:
47         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
48
49 update_moz_dtds:
50         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
51
52 update_moz_props:
53         @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1