5 POTLIST=$(shell ls -d po/*)
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 TT2_DATA_DIR=../../Open-ILS/src/data/locale
10 DOJO_LOCALE := $(shell echo ${LOCALE} | tr '[:upper:]' '[:lower:]')
11 DOJO_ACQ_SRC=../../Open-ILS/web/js/dojo/openils/acq/nls
12 DOJO_ACTOR_SRC=../../Open-ILS/web/js/dojo/openils/actor/nls
13 DOJO_AUTHORITY_SRC=../../Open-ILS/web/js/dojo/openils/authority/nls
14 DOJO_BOOKING_SRC=../../Open-ILS/web/js/dojo/openils/booking/nls
15 DOJO_CIRC_SRC=../../Open-ILS/web/js/dojo/openils/circ/nls
16 DOJO_CON_SRC=../../Open-ILS/web/js/dojo/openils/conify/nls
17 DOJO_OPAC_SRC=../../Open-ILS/web/js/dojo/openils/opac/nls
18 DOJO_RPT_SRC=../../Open-ILS/web/js/dojo/openils/reports/nls
19 DOJO_SERIAL_SRC=../../Open-ILS/web/js/dojo/openils/serial/nls
20 DOJO_URLVERIFY_SRC=../../Open-ILS/web/js/dojo/openils/URLVerify/nls
21 DOJO_USER_SRC=../../Open-ILS/web/js/dojo/openils/User/nls
22 DOJO_VANDELAY_SRC=../../Open-ILS/web/js/dojo/openils/vandelay/nls
23 DOJO_WIDGET_SRC=../../Open-ILS/web/js/dojo/openils/widget/nls
24 FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml
25 FMIDLOUT=fm_IDL.dtd.pot
27 FMIDLENTITY=fm_IDL.dtd
28 EVTSRC=../../Open-ILS/src/extras/ils_events.xml
29 EVTOUT=ils_events.xml.pot
30 EVTPO=ils_events.xml.po
32 REPORTDIR=../../Open-ILS/web/reports/
33 SQLSRCDIR=../../Open-ILS/src/sql/Pg/
34 SQLSRCFILE=950.data.seed-values.sql
37 SQLOUT=950.data.seed-values
38 TPAC_SRC=../../Open-ILS/src/templates/opac/
39 TT_LOCALE=../../Open-ILS/src/templates/locale/
40 PROGRESS=--progress none
42 # This Makefile can be used to generate and update PO files for Evergreen,
43 # as well as generate updated SQL, fieldmapper IDL, DTD and JavaScript
44 # property files from the PO.
48 # To create a new set of untranslated PO files for locale ll-LL:
49 # make LOCALE=ll-LL newpo
51 # To create a new set of POT files from the en-US source:
52 # make LOCALE=ll-LL newpot
54 # To update a set of translated PO files with new or changed en-US strings:
55 # make LOCALE=ll-LL updatepo
57 # To create a set of translated project files (DTDs, JavaScript message catalogs):
58 # make LOCALE=ll-LL project
60 # To install a set of translated project files:
61 # make LOCALE=ll-LL install
63 # Generate PO files from all POT files in PO for locale LOCALE
65 # The template for the standard GNU gettext format is
66 # template1/template1.pot
68 # template2/template2.pot
71 # So, iterate over the list of POT directories and
72 # generate / update the specified locale PO file
74 @pot2po $(PROGRESS) -i po/acq.js/acq.js.pot -o $(PO)/acq.js/$(LOCALE).po
75 @pot2po $(PROGRESS) -i po/admin.properties/admin.properties.pot -o $(PO)/admin.properties/$(LOCALE).po
76 @pot2po $(PROGRESS) -i po/auth.properties/auth.properties.pot -o $(PO)/auth.properties/$(LOCALE).po
77 @pot2po $(PROGRESS) -i po/authority.js/authority.js.pot -o $(PO)/authority.js/$(LOCALE).po
78 @pot2po $(PROGRESS) -i po/capture.js/capture.js.pot -o $(PO)/capture.js/$(LOCALE).po
79 @pot2po $(PROGRESS) -i po/cat.properties/cat.properties.pot -o $(PO)/cat.properties/$(LOCALE).po
80 @pot2po $(PROGRESS) -i po/circ.properties/circ.properties.pot -o $(PO)/circ.properties/$(LOCALE).po
81 @pot2po $(PROGRESS) -i po/common.properties/common.properties.pot -o $(PO)/common.properties/$(LOCALE).po
82 @pot2po $(PROGRESS) -i po/conify.dtd/conify.dtd.pot -o $(PO)/conify.dtd/$(LOCALE).po
83 @pot2po $(PROGRESS) -i po/conify.js/conify.js.pot -o $(PO)/conify.js/$(LOCALE).po
84 @pot2po $(PROGRESS) -i po/db.seed/db.seed.pot -o $(PO)/db.seed/$(LOCALE).po
85 @pot2po $(PROGRESS) -i po/fm_IDL.dtd/fm_IDL.dtd.pot -o $(PO)/fm_IDL.dtd/$(LOCALE).po
86 @pot2po $(PROGRESS) -i po/ils_events.xml/ils_events.xml.pot -o $(PO)/ils_events.xml/$(LOCALE).po
87 @pot2po $(PROGRESS) -i po/lang.dtd/lang.dtd.pot -o $(PO)/lang.dtd/$(LOCALE).po
88 @pot2po $(PROGRESS) -i po/multiclass_search_help.html/multiclass_search_help.html.pot -o $(PO)/multiclass_search_help.html/$(LOCALE).po
89 @pot2po $(PROGRESS) -i po/offline.properties/offline.properties.pot -o $(PO)/offline.properties/$(LOCALE).po
90 @pot2po $(PROGRESS) -i po/opac.dtd/opac.dtd.pot -o $(PO)/opac.dtd/$(LOCALE).po
91 @pot2po $(PROGRESS) -i po/opac.js/opac.js.pot -o $(PO)/opac.js/$(LOCALE).po
92 @pot2po $(PROGRESS) -i po/patron.properties/patron.properties.pot -o $(PO)/patron.properties/$(LOCALE).po
93 @pot2po $(PROGRESS) -i po/pickup_and_return.js/pickup_and_return.js.pot -o $(PO)/pickup_and_return.js/$(LOCALE).po
94 @pot2po $(PROGRESS) -i po/pull_list.js/pull_list.js.pot -o $(PO)/pull_list.js/$(LOCALE).po
95 @pot2po $(PROGRESS) -i po/register.js/register.js.pot -o $(PO)/register.js/$(LOCALE).po
96 @pot2po $(PROGRESS) -i po/reports.dtd/reports.dtd.pot -o $(PO)/reports.dtd/$(LOCALE).po
97 @pot2po $(PROGRESS) -i po/reports.js/reports.js.pot -o $(PO)/reports.js/$(LOCALE).po
98 @pot2po $(PROGRESS) -i po/reservation.js/reservation.js.pot -o $(PO)/reservation.js/$(LOCALE).po
99 @pot2po $(PROGRESS) -i po/selfcheck.js/selfcheck.js.pot -o $(PO)/selfcheck.js/$(LOCALE).po
100 @pot2po $(PROGRESS) -i po/serial.properties/serial.properties.pot -o $(PO)/serial.properties/$(LOCALE).po
101 @pot2po $(PROGRESS) -i po/tpac/tpac.pot -o $(PO)/tpac/$(LOCALE).po
102 @pot2po $(PROGRESS) -i po/AutoFieldWidget.js/AutoFieldWidget.js.pot -o $(PO)/AutoFieldWidget.js/$(LOCALE).po
103 @pot2po $(PROGRESS) -i po/Searcher.js/Searcher.js.pot -o $(PO)/Searcher.js/$(LOCALE).po
104 @pot2po $(PROGRESS) -i po/TranslatorPopup.js/TranslatorPopup.js.pot -o $(PO)/TranslatorPopup.js/$(LOCALE).po
105 @pot2po $(PROGRESS) -i po/XULTermLoader.js/XULTermLoader.js.pot -o $(PO)/XULTermLoader.js/$(LOCALE).po
106 @pot2po $(PROGRESS) -i po/User.js/User.js.pot -o $(PO)/User.js/$(LOCALE).po
107 @pot2po $(PROGRESS) -i po/serial.js/serial.js.pot -o $(PO)/serial.js/$(LOCALE).po
108 @pot2po $(PROGRESS) -i po/URLVerify.js/URLVerify.js.pot -o $(PO)/URLVerify.js/$(LOCALE).po
109 @pot2po $(PROGRESS) -i po/match_set.js/match_set.js.pot -o $(PO)/match_set.js/$(LOCALE).po
110 @pot2po $(PROGRESS) -i po/vandelay.js/vandelay.js.pot -o $(PO)/vandelay.js/$(LOCALE).po
111 @echo "Generated new PO files for locale $(LOCALE)"
113 # Generate a new set of POT files and entityized fieldmapper IDL
114 newpot: dtds2pot fmidl2pot fmidl2fmidlent ils2pot props2pot sql2pot dojo2pot tpac2pot
115 @echo "Generated new POT files"
117 # Generate DTD, JavaScript message catalogs, fieldmapper IDL,
118 # and SQL insert files from PO for locale LOCALE
119 project: prep_output po2dtds po2props po2sql fmidlpo2entity po2ils po2dojo
120 @echo "Generated project files for locale $(LOCALE)"
122 # Update PO files with new and changed strings from POT files
123 updatepo: prep_output
124 @pot2po $(PROGRESS) -i po/acq.js/acq.js.pot -o $(PO)/acq.js/$(LOCALE).po -t $(PO)/acq.js/$(LOCALE).po
125 @pot2po $(PROGRESS) -i po/admin.properties/admin.properties.pot -o $(PO)/admin.properties/$(LOCALE).po -t $(PO)/admin.properties/$(LOCALE).po
126 @pot2po $(PROGRESS) -i po/auth.properties/auth.properties.pot -o $(PO)/auth.properties/$(LOCALE).po -t $(PO)/auth.properties/$(LOCALE).po
127 @pot2po $(PROGRESS) -i po/authority.js/authority.js.pot -o $(PO)/authority.js/$(LOCALE).po -t $(PO)/authority.js/$(LOCALE).po
128 @pot2po $(PROGRESS) -i po/capture.js/capture.js.pot -o $(PO)/capture.js/$(LOCALE).po -t $(PO)/capture.js/$(LOCALE).po
129 @pot2po $(PROGRESS) -i po/cat.properties/cat.properties.pot -o $(PO)/cat.properties/$(LOCALE).po -t $(PO)/cat.properties/$(LOCALE).po
130 @pot2po $(PROGRESS) -i po/circ.properties/circ.properties.pot -o $(PO)/circ.properties/$(LOCALE).po -t $(PO)/circ.properties/$(LOCALE).po
131 @pot2po $(PROGRESS) -i po/common.properties/common.properties.pot -o $(PO)/common.properties/$(LOCALE).po -t $(PO)/common.properties/$(LOCALE).po
132 @pot2po $(PROGRESS) -i po/conify.dtd/conify.dtd.pot -o $(PO)/conify.dtd/$(LOCALE).po -t $(PO)/conify.dtd/$(LOCALE).po
133 @pot2po $(PROGRESS) -i po/conify.js/conify.js.pot -o $(PO)/conify.js/$(LOCALE).po -t $(PO)/conify.js/$(LOCALE).po
134 @pot2po $(PROGRESS) -i po/db.seed/db.seed.pot -o $(PO)/db.seed/$(LOCALE).po -t $(PO)/db.seed/$(LOCALE).po
135 @pot2po $(PROGRESS) -i po/fm_IDL.dtd/fm_IDL.dtd.pot -o $(PO)/fm_IDL.dtd/$(LOCALE).po -t $(PO)/fm_IDL.dtd/$(LOCALE).po
136 @pot2po $(PROGRESS) -i po/ils_events.xml/ils_events.xml.pot -o $(PO)/ils_events.xml/$(LOCALE).po -t $(PO)/ils_events.xml/$(LOCALE).po
137 @pot2po $(PROGRESS) -i po/lang.dtd/lang.dtd.pot -o $(PO)/lang.dtd/$(LOCALE).po -t $(PO)/lang.dtd/$(LOCALE).po
138 @pot2po $(PROGRESS) -i po/multiclass_search_help.html/multiclass_search_help.html.pot -o $(PO)/multiclass_search_help.html/$(LOCALE).po -t $(PO)/multiclass_search_help.html/$(LOCALE).po
139 @pot2po $(PROGRESS) -i po/offline.properties/offline.properties.pot -o $(PO)/offline.properties/$(LOCALE).po -t $(PO)/offline.properties/$(LOCALE).po
140 @pot2po $(PROGRESS) -i po/opac.dtd/opac.dtd.pot -o $(PO)/opac.dtd/$(LOCALE).po -t $(PO)/opac.dtd/$(LOCALE).po
141 @pot2po $(PROGRESS) -i po/opac.js/opac.js.pot -o $(PO)/opac.js/$(LOCALE).po -t $(PO)/opac.js/$(LOCALE).po
142 @pot2po $(PROGRESS) -i po/patron.properties/patron.properties.pot -o $(PO)/patron.properties/$(LOCALE).po -t $(PO)/patron.properties/$(LOCALE).po
143 @pot2po $(PROGRESS) -i po/pickup_and_return.js/pickup_and_return.js.pot -o $(PO)/pickup_and_return.js/$(LOCALE).po -t $(PO)/pickup_and_return.js/$(LOCALE).po
144 @pot2po $(PROGRESS) -i po/pull_list.js/pull_list.js.pot -o $(PO)/pull_list.js/$(LOCALE).po -t $(PO)/pull_list.js/$(LOCALE).po
145 @pot2po $(PROGRESS) -i po/register.js/register.js.pot -o $(PO)/register.js/$(LOCALE).po -t $(PO)/register.js/$(LOCALE).po
146 @pot2po $(PROGRESS) -i po/reports.dtd/reports.dtd.pot -o $(PO)/reports.dtd/$(LOCALE).po -t $(PO)/reports.dtd/$(LOCALE).po
147 @pot2po $(PROGRESS) -i po/reports.js/reports.js.pot -o $(PO)/reports.js/$(LOCALE).po -t $(PO)/reports.js/$(LOCALE).po
148 @pot2po $(PROGRESS) -i po/reservation.js/reservation.js.pot -o $(PO)/reservation.js/$(LOCALE).po -t $(PO)/reservation.js/$(LOCALE).po
149 @pot2po $(PROGRESS) -i po/selfcheck.js/selfcheck.js.pot -o $(PO)/selfcheck.js/$(LOCALE).po -t $(PO)/selfcheck.js/$(LOCALE).po
150 @pot2po $(PROGRESS) -i po/serial.properties/serial.properties.pot -o $(PO)/serial.properties/$(LOCALE).po -t $(PO)/serial.properties/$(LOCALE).po
151 @pot2po $(PROGRESS) -i po/tpac/tpac.pot -o $(PO)/tpac/$(LOCALE).po -t $(PO)/tpac/$(LOCALE).po
152 @pot2po $(PROGRESS) -i po/AutoFieldWidget.js/AutoFieldWidget.js.pot -o $(PO)/AutoFieldWidget.js/$(LOCALE).po -t $(PO)/AutoFieldWidget.js/$(LOCALE).po
153 @pot2po $(PROGRESS) -i po/Searcher.js/Searcher.js.pot -o $(PO)/Searcher.js/$(LOCALE).po -t $(PO)/Searcher.js/$(LOCALE).po
154 @pot2po $(PROGRESS) -i po/TranslatorPopup.js/TranslatorPopup.js.pot -o $(PO)/TranslatorPopup.js/$(LOCALE).po -t $(PO)/TranslatorPopup.js/$(LOCALE).po
155 @pot2po $(PROGRESS) -i po/User.js/User.js.pot -o $(PO)/User.js/$(LOCALE).po -t $(PO)/User.js/$(LOCALE).po
156 @pot2po $(PROGRESS) -i po/XULTermLoader.js/XULTermLoader.js.pot -o $(PO)/XULTermLoader.js/$(LOCALE).po -t $(PO)/XULTermLoader.js/$(LOCALE).po
157 @pot2po $(PROGRESS) -i po/serial.js/serial.js.pot -o $(PO)/serial.js/$(LOCALE).po -t $(PO)/serial.js/$(LOCALE).po
158 @pot2po $(PROGRESS) -i po/URLVerify.js/URLVerify.js.pot -o $(PO)/URLVerify.js/$(LOCALE).po -t $(PO)/URLVerify.js/$(LOCALE).po
159 @pot2po $(PROGRESS) -i po/match_set.js/match_set.js.pot -o $(PO)/match_set.js/$(LOCALE).po -t $(PO)/match_set.js/$(LOCALE).po
160 @pot2po $(PROGRESS) -i po/vandelay.js/vandelay.js.pot -o $(PO)/vandelay.js/$(LOCALE).po -t $(PO)/vandelay.js/$(LOCALE).po
161 @echo "Updated PO files for locale $(LOCALE)"
164 @moz2po -P $(PROGRESS) -o $(PO)/conify.dtd/conify.dtd.pot -i $(DTDDIR)/en-US/conify.dtd 2>&1
165 @moz2po -P $(PROGRESS) -o $(PO)/lang.dtd/lang.dtd.pot -i $(DTDDIR)/en-US/lang.dtd 2>&1
166 @moz2po -P $(PROGRESS) -o $(PO)/opac.dtd/opac.dtd.pot -i $(DTDDIR)/en-US/opac.dtd 2>&1
167 @moz2po -P $(PROGRESS) -o $(PO)/reports.dtd/reports.dtd.pot -i $(DTDDIR)/en-US/reports.dtd 2>&1
170 @scripts/dojo_resource.py --pot $(DOJO_ACQ_SRC)/acq.js --output $(PO)/acq.js/acq.js.pot
171 @scripts/dojo_resource.py --pot $(DOJO_ACTOR_SRC)/register.js --output $(PO)/register.js/register.js.pot
172 @scripts/dojo_resource.py --pot $(DOJO_AUTHORITY_SRC)/authority.js --output $(PO)/authority.js/authority.js.pot
173 @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/capture.js --output $(PO)/capture.js/capture.js.pot
174 @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/pickup_and_return.js --output $(PO)/pickup_and_return.js/pickup_and_return.js.pot
175 @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/pull_list.js --output $(PO)/pull_list.js/pull_list.js.pot
176 @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/reservation.js --output $(PO)/reservation.js/reservation.js.pot
177 @scripts/dojo_resource.py --pot $(DOJO_CIRC_SRC)/selfcheck.js --output $(PO)/selfcheck.js/selfcheck.js.pot
178 @scripts/dojo_resource.py --pot $(DOJO_CON_SRC)/conify.js --output $(PO)/conify.js/conify.js.pot
179 @scripts/dojo_resource.py --pot $(DOJO_OPAC_SRC)/opac.js --output $(PO)/opac.js/opac.js.pot
180 @scripts/dojo_resource.py --pot $(DOJO_RPT_SRC)/reports.js --output $(PO)/reports.js/reports.js.pot
181 @scripts/dojo_resource.py --pot $(DOJO_SERIAL_SRC)/serial.js --output $(PO)/serial.js/serial.js.pot
182 @scripts/dojo_resource.py --pot $(DOJO_URLVERIFY_SRC)/URLVerify.js --output $(PO)/URLVerify.js/URLVerify.js.pot
183 @scripts/dojo_resource.py --pot $(DOJO_USER_SRC)/User.js --output $(PO)/User.js/User.js.pot
184 @scripts/dojo_resource.py --pot $(DOJO_VANDELAY_SRC)/match_set.js --output $(PO)/match_set.js/match_set.js.pot
185 @scripts/dojo_resource.py --pot $(DOJO_VANDELAY_SRC)/vandelay.js --output $(PO)/vandelay.js/vandelay.js.pot
186 @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/AutoFieldWidget.js --output $(PO)/AutoFieldWidget.js/AutoFieldWidget.js.pot
187 @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/Searcher.js --output $(PO)/Searcher.js/Searcher.js.pot
188 @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/TranslatorPopup.js --output $(PO)/TranslatorPopup.js/TranslatorPopup.js.pot
189 @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/XULTermLoader.js --output $(PO)/XULTermLoader.js/XULTermLoader.js.pot
192 @scripts/dojo_resource.py --create $(PO)/acq.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/acq.js
193 @scripts/dojo_resource.py --create $(PO)/authority.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/authority.js
194 @scripts/dojo_resource.py --create $(PO)/capture.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/capture.js
195 @scripts/dojo_resource.py --create $(PO)/conify.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/conify.js
196 @scripts/dojo_resource.py --create $(PO)/opac.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/opac.js
197 @scripts/dojo_resource.py --create $(PO)/pickup_and_return.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/pickup_and_return.js
198 @scripts/dojo_resource.py --create $(PO)/pull_list.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/pull_list.js
199 @scripts/dojo_resource.py --create $(PO)/register.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/register.js
200 @scripts/dojo_resource.py --create $(PO)/reservation.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/reservation.js
201 @scripts/dojo_resource.py --create $(PO)/reports.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/reports.js
202 @scripts/dojo_resource.py --create $(PO)/selfcheck.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/selfcheck.js
203 @scripts/dojo_resource.py --create $(PO)/AutoFieldWidget.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/AutoFieldWidget.js
204 @scripts/dojo_resource.py --create $(PO)/Searcher.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/Searcher.js
205 @scripts/dojo_resource.py --create $(PO)/TranslatorPopup.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/TranslatorPopup.js
206 @scripts/dojo_resource.py --create $(PO)/User.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/User.js
207 @scripts/dojo_resource.py --create $(PO)/XULTermLoader.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/XULTermLoader.js
208 @scripts/dojo_resource.py --create $(PO)/serial.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/serial.js
209 @scripts/dojo_resource.py --create $(PO)/URLVerify.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/URLVerify.js
210 @scripts/dojo_resource.py --create $(PO)/match_set.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/match_set.js
211 @scripts/dojo_resource.py --create $(PO)/vandelay.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/vandelay.js
214 @scripts/ils_events.py --pot $(EVTSRC) --output $(PO)/ils_events.xml/$(EVTOUT)
217 @scripts/ils_events.py --create $(PO)/ils_events.xml/$(LOCALE).po --locale $(LOCALE) --output $(PROJECT)/$(LOCALE)/$(EVTXML)
220 @moz2po -P $(PROGRESS) -o $(PO)/auth.properties/auth.properties.pot -i $(CHROME_PROPSDIR)/en-US/auth.properties 2>&1
221 @moz2po -P $(PROGRESS) -o $(PO)/offline.properties/offline.properties.pot -i $(CHROME_PROPSDIR)/en-US/offline.properties 2>&1
222 @moz2po -P $(PROGRESS) -o $(PO)/admin.properties/admin.properties.pot -i $(SERVER_PROPSDIR)/en-US/admin.properties 2>&1
223 @moz2po -P $(PROGRESS) -o $(PO)/cat.properties/cat.properties.pot -i $(SERVER_PROPSDIR)/en-US/cat.properties 2>&1
224 @moz2po -P $(PROGRESS) -o $(PO)/circ.properties/circ.properties.pot -i $(SERVER_PROPSDIR)/en-US/circ.properties 2>&1
225 @moz2po -P $(PROGRESS) -o $(PO)/common.properties/common.properties.pot -i $(SERVER_PROPSDIR)/en-US/common.properties 2>&1
226 @moz2po -P $(PROGRESS) -o $(PO)/multiclass_search_help.html/multiclass_search_help.html.pot -i $(SERVER_PROPSDIR)/en-US/multiclass_search_help.html 2>&1
227 @moz2po -P $(PROGRESS) -o $(PO)/patron.properties/patron.properties.pot -i $(SERVER_PROPSDIR)/en-US/patron.properties 2>&1
228 @moz2po -P $(PROGRESS) -o $(PO)/serial.properties/serial.properties.pot -i $(SERVER_PROPSDIR)/en-US/serial.properties 2>&1
232 @xgettext.pl --plugin=tt2 --directory=$(TPAC_SRC) --output-dir=po/tpac/ --output=tpac.pot
235 @mkdir -p locale/$(LOCALE)
237 # There are some hacky things we need to do to make po2moz happy,
238 # like ensure that the .po file has either ".dtd" or ".properties" in
239 # the name to generate the appropriate output, even though that breaks
240 # GNU gettext recommended layout of foo.dtd/ll-LL.po
241 prep_output: mklocale
242 @for i in `ls -d $(PO)/*.dtd`; do cd $(STARTDIR)/$$i && ln -sf $(LOCALE).po $(LOCALE).dtd.po; done
243 @for i in `ls -d $(PO)/*.properties`; do cd $(STARTDIR)/$$i && ln -sf $(LOCALE).po $(LOCALE).properties.po; done
244 @for i in `ls -d $(PO)/*.html`; do cd $(STARTDIR)/$$i && ln -sf $(LOCALE).po $(LOCALE).html.po; done
248 @po2moz $(PROGRESS) -i $(PO)/conify.dtd/$(LOCALE).dtd.po -o $(PROJECT)/$(LOCALE)/conify.dtd -t $(DTDDIR)/en-US/conify.dtd 2>&1
249 @po2moz $(PROGRESS) -i $(PO)/lang.dtd/$(LOCALE).dtd.po -o $(PROJECT)/$(LOCALE)/lang.dtd -t $(DTDDIR)/en-US/lang.dtd 2>&1
250 @po2moz $(PROGRESS) -i $(PO)/opac.dtd/$(LOCALE).dtd.po -o $(PROJECT)/$(LOCALE)/opac.dtd -t $(DTDDIR)/en-US/opac.dtd 2>&1
251 @po2moz $(PROGRESS) -i $(PO)/reports.dtd/$(LOCALE).dtd.po -o $(PROJECT)/$(LOCALE)/reports.dtd -t $(DTDDIR)/en-US/reports.dtd 2>&1
254 @po2moz $(PROGRESS) -i $(PO)/auth.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/auth.properties -t $(CHROME_PROPSDIR)/en-US/auth.properties 2>&1
255 @po2moz $(PROGRESS) -i $(PO)/offline.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/offline.properties -t $(CHROME_PROPSDIR)/en-US/offline.properties 2>&1
256 @po2moz $(PROGRESS) -i $(PO)/admin.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/admin.properties -t $(SERVER_PROPSDIR)/en-US/admin.properties 2>&1
257 @po2moz $(PROGRESS) -i $(PO)/cat.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/cat.properties -t $(SERVER_PROPSDIR)/en-US/cat.properties 2>&1
258 @po2moz $(PROGRESS) -i $(PO)/circ.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/circ.properties -t $(SERVER_PROPSDIR)/en-US/circ.properties 2>&1
259 @po2moz $(PROGRESS) -i $(PO)/common.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/common.properties -t $(SERVER_PROPSDIR)/en-US/common.properties 2>&1
260 @po2moz $(PROGRESS) -i $(PO)/multiclass_search_help.html/$(LOCALE).html.po -o $(PROJECT)/$(LOCALE)/multiclass_search_help.html -t $(SERVER_PROPSDIR)/en-US/multiclass_search_help.html 2>&1
261 @po2moz $(PROGRESS) -i $(PO)/patron.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/patron.properties -t $(SERVER_PROPSDIR)/en-US/patron.properties 2>&1
262 @po2moz $(PROGRESS) -i $(PO)/serial.properties/$(LOCALE).properties.po -o $(PROJECT)/$(LOCALE)/serial.properties -t $(SERVER_PROPSDIR)/en-US/serial.properties 2>&1
265 @scripts/db-seed-i18n.py --pot $(SQLSRCDIR)/$(SQLSRCFILE) --output $(PO)/db.seed/$(SQLPOT)
266 # @msghack --empty -o $(PO)/$(SQLPOT) $(PO)/$(SQLPOT)
269 @scripts/db-seed-i18n.py --sql $(PO)/db.seed/$(LOCALE).po --locale $(LOCALE) --output $(PROJECT)/$(LOCALE)/$(SQLOUT).sql
271 # Generate a fieldmapper IDL file that uses entities instead of hard-coded strings
273 @scripts/fieldmapper.py --convert $(FMIDLSRC) --output $(PO)/$(FMIDLENT)
275 # Generate a POT file for translating the entity values
277 @scripts/fieldmapper.py --pot $(FMIDLSRC) --output $(PO)/fm_IDL.dtd/$(FMIDLOUT)
279 # Generate a set of entity declarations from a PO file
280 fmidlpo2entity: mklocale
281 @scripts/fieldmapper.py --entity $(PO)/fm_IDL.dtd/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/$(FMIDLENTITY)
283 # Generate en-US DTD from a POT file; required if any other locale is installed
285 mkdir -p $(PROJECT)/en-US
286 @scripts/fieldmapper.py --entity $(PO)/fm_IDL.dtd/$(FMIDLOUT) --output $(PROJECT)/en-US/$(FMIDLENTITY)
287 cp $(PROJECT)/en-US/$(FMIDLENTITY) $(DTDDIR)/en-US/
289 # Install updated project files to their corresponding location in the source tree
290 install: updatepo project fmidl2fmidlent fmidlpo2entity-en
291 mkdir -p $(CHROME_PROPSDIR)/$(LOCALE)
292 cp $(PROJECT)/$(LOCALE)/auth.properties $(CHROME_PROPSDIR)/$(LOCALE)/.
293 cp $(PROJECT)/$(LOCALE)/offline.properties $(CHROME_PROPSDIR)/$(LOCALE)/.
294 mkdir -p $(SERVER_PROPSDIR)/$(LOCALE)
295 cp $(PROJECT)/$(LOCALE)/admin.properties $(SERVER_PROPSDIR)/$(LOCALE)/.
296 cp $(PROJECT)/$(LOCALE)/cat.properties $(SERVER_PROPSDIR)/$(LOCALE)/.
297 cp $(PROJECT)/$(LOCALE)/circ.properties $(SERVER_PROPSDIR)/$(LOCALE)/.
298 cp $(PROJECT)/$(LOCALE)/common.properties $(SERVER_PROPSDIR)/$(LOCALE)/.
299 cp $(PROJECT)/$(LOCALE)/multiclass_search_help.html $(SERVER_PROPSDIR)/$(LOCALE)/.
300 cp $(PROJECT)/$(LOCALE)/patron.properties $(SERVER_PROPSDIR)/$(LOCALE)/.
301 mkdir -p $(DTDDIR)/$(LOCALE)
302 cp $(PROJECT)/$(LOCALE)/conify.dtd $(DTDDIR)/$(LOCALE)/
303 cp $(PROJECT)/$(LOCALE)/lang.dtd $(CHROME_PROPSDIR)/$(LOCALE)/
304 cp $(PROJECT)/$(LOCALE)/lang.dtd $(DTDDIR)/$(LOCALE)/
305 cp $(PROJECT)/$(LOCALE)/opac.dtd $(DTDDIR)/$(LOCALE)/
306 cp $(PROJECT)/$(LOCALE)/reports.dtd $(DTDDIR)/$(LOCALE)/
307 cp $(PROJECT)/$(LOCALE)/serial.properties $(SERVER_PROPSDIR)/$(LOCALE)/.
308 mkdir -p $(TT_LOCALE)
309 cp po/tpac/$(LOCALE).po $(TT_LOCALE)/tpac.$(LOCALE).po
310 cp $(PROJECT)/$(LOCALE)/$(FMIDLENTITY) $(DTDDIR)/$(LOCALE)/
311 @scripts/merge_ils_events.py --master $(EVTSRC) --localization $(PROJECT)/$(LOCALE)/$(EVTXML) --output $(EVTSRC)
312 cp $(PROJECT)/$(LOCALE)/$(SQLOUT).sql $(SQLSRCDIR)/$(SQLOUT)-$(LOCALE).sql
313 cp $(PO)/$(FMIDLENT) $(REPORTDIR)/$(FMIDLENT)
314 mkdir -p $(DOJO_ACQ_SRC)/$(DOJO_LOCALE)
315 cp $(PROJECT)/$(LOCALE)/acq.js $(DOJO_ACQ_SRC)/$(DOJO_LOCALE)/acq.js
316 mkdir -p $(DOJO_ACTOR_SRC)/$(DOJO_LOCALE)
317 cp $(PROJECT)/$(LOCALE)/register.js $(DOJO_ACTOR_SRC)/$(DOJO_LOCALE)/register.js
318 mkdir -p $(DOJO_AUTHORITY_SRC)/$(DOJO_LOCALE)
319 cp $(PROJECT)/$(LOCALE)/authority.js $(DOJO_AUTHORITY_SRC)/$(DOJO_LOCALE)/authority.js
320 mkdir -p $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)
321 cp $(PROJECT)/$(LOCALE)/capture.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/capture.js
322 cp $(PROJECT)/$(LOCALE)/pickup_and_return.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/pickup_and_return.js
323 cp $(PROJECT)/$(LOCALE)/pull_list.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/pull_list.js
324 cp $(PROJECT)/$(LOCALE)/reservation.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/reservation.js
325 mkdir -p $(DOJO_CIRC_SRC)/$(DOJO_LOCALE)
326 cp $(PROJECT)/$(LOCALE)/selfcheck.js $(DOJO_CIRC_SRC)/$(DOJO_LOCALE)/selfcheck.js
327 mkdir -p $(DOJO_CON_SRC)/$(DOJO_LOCALE)
328 cp $(PROJECT)/$(LOCALE)/conify.js $(DOJO_CON_SRC)/$(DOJO_LOCALE)/conify.js
329 mkdir -p $(DOJO_OPAC_SRC)/$(DOJO_LOCALE)
330 cp $(PROJECT)/$(LOCALE)/opac.js $(DOJO_OPAC_SRC)/$(DOJO_LOCALE)/opac.js
331 mkdir -p $(DOJO_RPT_SRC)/$(DOJO_LOCALE)
332 cp $(PROJECT)/$(LOCALE)/reports.js $(DOJO_RPT_SRC)/$(DOJO_LOCALE)/reports.js
333 mkdir -p $(DOJO_USER_SRC)/$(DOJO_LOCALE)
334 cp $(PROJECT)/$(LOCALE)/User.js $(DOJO_USER_SRC)/$(DOJO_LOCALE)/User.js
335 mkdir -p $(DOJO_SERIAL_SRC)/$(DOJO_LOCALE)
336 cp $(PROJECT)/$(LOCALE)/serial.js $(DOJO_SERIAL_SRC)/$(DOJO_LOCALE)/serial.js
337 mkdir -p $(DOJO_URLVERIFY_SRC)/$(DOJO_LOCALE)
338 cp $(PROJECT)/$(LOCALE)/URLVerify.js $(DOJO_URLVERIFY_SRC)/$(DOJO_LOCALE)/URLVerify.js
339 mkdir -p $(DOJO_VANDELAY_SRC)/$(DOJO_LOCALE)
340 cp $(PROJECT)/$(LOCALE)/match_set.js $(DOJO_VANDELAY_SRC)/$(DOJO_LOCALE)/match_set.js
341 cp $(PROJECT)/$(LOCALE)/vandelay.js $(DOJO_VANDELAY_SRC)/$(DOJO_LOCALE)/vandelay.js
342 mkdir -p $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)
343 cp $(PROJECT)/$(LOCALE)/AutoFieldWidget.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/AutoFieldWidget.js
344 cp $(PROJECT)/$(LOCALE)/Searcher.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/Searcher.js
345 cp $(PROJECT)/$(LOCALE)/TranslatorPopup.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/TranslatorPopup.js
346 cp $(PROJECT)/$(LOCALE)/XULTermLoader.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/XULTermLoader.js
347 mkdir -p $(TT2_DATA_DIR)
348 cp $(PO)/tpac/$(LOCALE).po $(TT2_DATA_DIR)/.
350 install_all_locales: newpot
351 for i in `ls po/*/*po|grep -v en-US | cut -f3 -d'/' | cut -f1 -d. | sort | uniq`; \
353 make LOCALE=$$i install; \
355 if [ "$$RC" -gt 0 ]; \
356 then echo $$RC; exit $$RC; \
359 update_all_locales: newpot
360 for i in `ls po/*/*po|grep -v en-US | cut -f3 -d'/' | cut -f1 -d. | sort | uniq`; \
362 make LOCALE=$$i updatepo; \
364 if [ "$$RC" -gt 0 ]; \
365 then echo $$RC; exit $$RC; \