5 DTDDIR=../../Open-ILS/web/opac/locale
6 PROPSDIR=../../Open-ILS/xul/staff_client/chrome/locale
7 FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml
10 FMIDLENTITY=fm_IDL.xml.ent
12 SQLSRC=../../Open-ILS/src/sql/Pg/950.data.seed-values.sql
15 PROGRESS=--progress none
17 # This Makefile can be used to generate and update PO files for Evergreen,
18 # as well as generate updated SQL, fieldmapper IDL, DTD and JavaScript
19 # property files from the PO.
23 # To create a new set of untranslated PO files for locale ll-LL:
24 # make LOCALE=ll-LL newpo
26 # To create a new set of POT files from the en-US source:
27 # make LOCALE=ll-LL newpot
29 # To update a set of translated PO files with new or changed en-US strings:
30 # make LOCALE=ll-LL updatepo
32 # To create a new set of project files (DTDs, JavaScript message catalogs):
33 # make LOCALE=ll-LL updatepo
35 # Generate PO files from all POT files in POOUTDIR for locale LOCALE
37 @pot2po $(PROGRESS) -i $(POOUTDIR) -o $(POOUTDIR)/$(LOCALE)
38 @echo "Generated new PO files for locale $(LOCALE)"
40 # Generate a new set of POT files and entityized fieldmapper IDL
41 newpot: dtds2pot fmidl2pot fmidl2fmidlent props2pot sql2pot
42 @echo "Generated new POT files"
44 # Generate DTD, JavaScript message catalogs, fieldmapper IDL,
45 # and SQL insert files from PO for locale LOCALE
46 newproject: po2dtds po2props po2sql fmidlpo2entity
47 @echo "Generated project files for locale $(LOCALE)"
49 # Update PO files with new and changed strings from POT files
51 @pot2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(POOUTDIR) -t $(POOUTDIR)/$(LOCALE) 2>&1
52 @echo "Updated PO files for locale $(LOCALE)"
55 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(DTDDIR)/en-US/ 2>&1
58 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(PROPSDIR)/en-US/ 2>&1
61 @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(DTDDIR)/en-US/ 2>&1
64 @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(PROPSDIR)/en-US/ 2>&1
67 @po2moz $(PROGRESS) -o $(PROJECT)/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
70 @po2moz $(PROGRESS) -o $(PROJECT)/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
73 @scripts/db-seed-i18n.py --pot $(SQLSRC) --output $(POOUTDIR)/$(SQLOUT)
76 scripts/db-seed-i18n.py --sql $(POINDIR)/$(LOCALE)/$(SQLPO) --locale $(LOCALE) --output $(PROJECT)/$(LOCALE)/$(SQLOUT)
78 # Generate a fieldmapper IDL file that uses entities instead of hard-coded strings
80 @scripts/fieldmapper.py --convert $(FMIDLSRC) --output $(POOUTDIR)/$(FMIDLENT)
82 # Generate a POT file for translating the entity values
84 @scripts/fieldmapper.py --pot $(FMIDLSRC) --output $(POOUTDIR)/$(FMIDLOUT)
86 # Generate a set of entity declarations from a PO file
88 @scripts/fieldmapper.py --entity $(POINDIR)/$(FMIDLOUT) --output $(PROJECT)/$(LOCALE)/$(FMIDLENTITY)