6 DTDDIR=../../Open-ILS/web/opac/locale
7 CHROME_PROPSDIR=../../Open-ILS/xul/staff_client/chrome/locale
8 SERVER_PROPSDIR=../../Open-ILS/xul/staff_client/server/locale
9 FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml
12 FMIDLENTITY=fm_IDL.xml.ent
14 EVTSRC=../../Open-ILS/src/extras/ils_events.xml
15 EVTOUT=ils_events.xml.pot
16 EVTPO=ils_events.xml.po
18 SQLSRC=../../Open-ILS/src/sql/Pg/950.data.seed-values.sql
21 SQLOUT=950.data.seed-values.sql
22 PROGRESS=--progress none
24 # This Makefile can be used to generate and update PO files for Evergreen,
25 # as well as generate updated SQL, fieldmapper IDL, DTD and JavaScript
26 # property files from the PO.
30 # To create a new set of untranslated PO files for locale ll-LL:
31 # make LOCALE=ll-LL newpo
33 # To create a new set of POT files from the en-US source:
34 # make LOCALE=ll-LL newpot
36 # To update a set of translated PO files with new or changed en-US strings:
37 # make LOCALE=ll-LL updatepo
39 # To create a new set of project files (DTDs, JavaScript message catalogs):
40 # make LOCALE=ll-LL updatepo
42 # Generate PO files from all POT files in POOUTDIR for locale LOCALE
44 @pot2po $(PROGRESS) -i $(POTSRC) -o $(POOUTDIR)/$(LOCALE)
45 @echo "Generated new PO files for locale $(LOCALE)"
47 # Generate a new set of POT files and entityized fieldmapper IDL
48 newpot: dtds2pot fmidl2pot fmidl2fmidlent ils2pot props2pot sql2pot
49 @echo "Generated new POT files"
51 # Generate DTD, JavaScript message catalogs, fieldmapper IDL,
52 # and SQL insert files from PO for locale LOCALE
53 newproject: po2dtds po2props po2sql fmidlpo2entity po2ils
54 @echo "Generated project files for locale $(LOCALE)"
56 # Update PO files with new and changed strings from POT files
58 pot2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(POTSRC) -t $(POOUTDIR)/$(LOCALE) 2>&1
59 @echo "Updated PO files for locale $(LOCALE)"
61 # Update PO files with new and changed strings from POT files
63 @msgmerge -U $(POOUTDIR)/$(LOCALE)/opac.dtd.po $(POTSRC)/opac.dtd.pot 2>&1
64 @echo "Updated PO file opac.dtd.po for locale $(LOCALE)"
67 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(DTDDIR)/en-US/ 2>&1
70 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(CHROME_PROPSDIR)/en-US/ 2>&1
71 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(SERVER_PROPSDIR)/en-US/ 2>&1
74 @moz2po -P $(PROGRESS) -o $(POTSRC) -i $(DTDDIR)/en-US/ 2>&1
77 @scripts/ils_events.py --pot $(EVTSRC) --output $(POTSRC)/$(EVTOUT)
80 @scripts/ils_events.py --create $(POINDIR)/$(LOCALE)/$(EVTPO) --locale $(LOCALE) --output $(PROJECT)/$(LOCALE)/$(EVTXML)
83 @moz2po -P $(PROGRESS) -o $(POTSRC) -i $(CHROME_PROPSDIR)/en-US/ 2>&1
84 @moz2po -P $(PROGRESS) -o $(POTSRC) -i $(SERVER_PROPSDIR)/en-US/ 2>&1
87 @po2moz $(PROGRESS) -o $(PROJECT)/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
90 @po2moz $(PROGRESS) -o $(PROJECT)/$(LOCALE) -t $(CHROME_PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
91 @po2moz $(PROGRESS) -o $(PROJECT)/$(LOCALE) -t $(SERVER_PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
94 @scripts/db-seed-i18n.py --pot $(SQLSRC) --output $(POTSRC)/$(SQLPOT)
97 scripts/db-seed-i18n.py --sql $(POINDIR)/$(LOCALE)/$(SQLPO) --locale $(LOCALE) --output $(PROJECT)/$(LOCALE)/$(SQLOUT)
99 # Generate a fieldmapper IDL file that uses entities instead of hard-coded strings
101 @scripts/fieldmapper.py --convert $(FMIDLSRC) --output $(POOUTDIR)/$(FMIDLENT)
103 # Generate a POT file for translating the entity values
105 @scripts/fieldmapper.py --pot $(FMIDLSRC) --output $(POTSRC)/$(FMIDLOUT)
107 # Generate a set of entity declarations from a PO file
109 @scripts/fieldmapper.py --entity $(POINDIR)/$(LOCALE)/$(FMIDLPO) --output $(PROJECT)/$(LOCALE)/$(FMIDLENTITY)