4 DTDDIR=../../Open-ILS/web/opac/locale
5 PROPSDIR=../../Open-ILS/xul/staff_client/chrome/locale
6 FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml
9 FMIDLENTITY=fm_IDL.xml.ent
11 SQLSRC=../../Open-ILS/src/sql/Pg/950.data.seed-values.sql
14 PROGRESS=--progress none
16 # This Makefile can be used to generate and update PO files for Evergreen,
17 # as well as generate updated SQL, fieldmapper IDL, DTD and JavaScript
18 # property files from the PO.
22 # To create a new set of untranslated PO files for locale ll-LL:
23 # make LOCALE=ll-LL newpo
25 # To create a new set of POT files from the en-US source:
26 # make LOCALE=ll-LL newpot
28 # To update a set of translated PO files with new or changed en-US strings:
29 # make LOCALE=ll-LL updatepo
31 # To create a new set of project files (DTDs, JavaScript message catalogs):
32 # make LOCALE=ll-LL updatepo
34 # Generate PO files from all POT files in POOUTDIR for locale LOCALE
36 @pot2po $(PROGRESS) -i $(POOUTDIR) -o $(POOUTDIR)/$(LOCALE)
37 @echo "Generated new PO files for locale $(LOCALE)"
39 # Generate a new set of POT files and entityized fieldmapper IDL
40 newpot: dtds2pot fmidl2pot fmidl2ent props2pot sql2pot
41 @echo "Generated new POT files"
43 # Generate DTD, JavaScript message catalogs, fieldmapper IDL,
44 # and SQL insert files from PO for locale LOCALE
45 newproject: po2dtds po2props po2sql fmidlpo2entity
46 @echo "Generated project files for locale $(LOCALE)"
48 # Update PO files with new and changed strings from POT files
50 @pot2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(POOUTDIR) -t $(POOUTDIR)/$(LOCALE) 2>&1
51 @echo "Updated PO files for locale $(LOCALE)"
54 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(DTDDIR)/en-US/ 2>&1
57 @moz2po $(PROGRESS) -o $(POOUTDIR)/$(LOCALE) -i $(PROPSDIR)/en-US/ 2>&1
60 @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(DTDDIR)/en-US/ 2>&1
63 @moz2po -P $(PROGRESS) -o $(POOUTDIR) -i $(PROPSDIR)/en-US/ 2>&1
66 @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(DTDDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
69 @po2moz $(PROGRESS) -o locale/$(LOCALE) -t $(PROPSDIR)/en-US/ -i $(POINDIR)/$(LOCALE) 2>&1
72 @scripts/db-seed-i18n.py --pot $(SQLSRC) --output $(POOUTDIR)/$(SQLOUT)
75 @scripts/db-seed-i18n.py --sql $(POINDIR)/$(LOCALE)/$(SQLPO) --locale $(LOCALE) --output locale/$(LOCALE)/$(SQLOUT)
77 # Generate a fieldmapper IDL file that uses entities instead of hard-coded strings
79 @scripts/fieldmapper.py --convert $(FMIDLSRC) --output $(POOUTDIR)/$(FMIDLENT)
81 # Generate a POT file for translating the entity values
83 @scripts/fieldmapper.py --pot $(FMIDLSRC) --output $(POOUTDIR)/$(FMIDLOUT)
85 # Generate a set of entity declarations from a PO file
87 @scripts/fieldmapper.py --entity $(POINDIR)/$(LOCALE)/$(FMIDLOUT) --output locale/$(LOCALE)/$(FMIDLENTITY)