Get the Makefile up to date with all of our new Dojo resource files
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Jun 2010 06:02:03 +0000 (06:02 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 7 Jun 2010 06:02:03 +0000 (06:02 +0000)
At some point, this Makefile has to become smarter, because there's a
whole lot of error-prone copying and pasting going on right now.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@16610 dcc99617-32d9-48b4-a31d-7c20da2025e4

build/i18n/Makefile

index 9d97d8b..ab17e64 100644 (file)
@@ -7,9 +7,15 @@ DTDDIR=../../Open-ILS/web/opac/locale
 CHROME_PROPSDIR=../../Open-ILS/xul/staff_client/chrome/locale
 SERVER_PROPSDIR=../../Open-ILS/xul/staff_client/server/locale
 DOJO_LOCALE := $(shell echo ${LOCALE} | tr '[:upper:]-' '[:lower:]/')
+DOJO_ACQ_SRC=../../Open-ILS/web/js/dojo/openils/acq/nls
+DOJO_ACTOR_SRC=../../Open-ILS/web/js/dojo/openils/actor/nls
+DOJO_BOOKING_SRC=../../Open-ILS/web/js/dojo/openils/booking/nls
+DOJO_CIRC_SRC=../../Open-ILS/web/js/dojo/openils/circ/nls
 DOJO_CON_SRC=../../Open-ILS/web/js/dojo/openils/conify/nls
 DOJO_OPAC_SRC=../../Open-ILS/web/js/dojo/openils/opac/nls
 DOJO_RPT_SRC=../../Open-ILS/web/js/dojo/openils/reports/nls
+DOJO_USER_SRC=../../Open-ILS/web/js/dojo/openils/User/nls
+DOJO_WIDGET_SRC=../../Open-ILS/web/js/dojo/openils/widget/nls
 FMIDLSRC=../../Open-ILS/examples/fm_IDL.xml
 FMIDLOUT=fm_IDL.dtd.pot
 FMIDLENT=fm_IDL.xml
@@ -58,8 +64,10 @@ PROGRESS=--progress none
 # So, iterate over the list of POT directories and 
 # generate / update the specified locale PO file
 newpo: 
+       @pot2po $(PROGRESS) -i po/acq.js/acq.js.pot -o $(PO)/acq.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/admin.properties/admin.properties.pot -o $(PO)/admin.properties/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/auth.properties/auth.properties.pot -o $(PO)/auth.properties/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/capture.js/capture.js.pot -o $(PO)/capture.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/cat.properties/cat.properties.pot -o $(PO)/cat.properties/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/circ.properties/circ.properties.pot -o $(PO)/circ.properties/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/common.properties/common.properties.pot -o $(PO)/common.properties/$(LOCALE).po 
@@ -74,9 +82,18 @@ newpo:
        @pot2po $(PROGRESS) -i po/opac.dtd/opac.dtd.pot -o $(PO)/opac.dtd/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/opac.js/opac.js.pot -o $(PO)/opac.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/patron.properties/patron.properties.pot -o $(PO)/patron.properties/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/pickup_and_return.js/pickup_and_return.js.pot -o $(PO)/pickup_and_return.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/pull_list.js/pull_list.js.pot -o $(PO)/pull_list.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/register.js/register.js.pot -o $(PO)/register.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/reports.dtd/reports.dtd.pot -o $(PO)/reports.dtd/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/reports.js/reports.js.pot -o $(PO)/reports.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/reservation.js/reservation.js.pot -o $(PO)/reservation.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/selfcheck.js/selfcheck.js.pot -o $(PO)/selfcheck.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/vandelay.dtd/vandelay.dtd.pot -o $(PO)/vandelay.dtd/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/AutoFieldWidget.js/AutoFieldWidget.js.pot -o $(PO)/AutoFieldWidget.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/TranslatorPopup.js/TranslatorPopup.js.pot -o $(PO)/TranslatorPopup.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/XULTermLoader.js/XULTermLoader.js.pot -o $(PO)/XULTermLoader.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/User.js/User.js.pot -o $(PO)/User.js/$(LOCALE).po 
        @echo "Generated new PO files for locale $(LOCALE)"
 
 # Generate a new set of POT files and entityized fieldmapper IDL
@@ -90,8 +107,10 @@ project: prep_output po2dtds po2props po2sql fmidlpo2entity po2ils po2dojo
 
 # Update PO files with new and changed strings from POT files
 updatepo: prep_output  
+       @pot2po $(PROGRESS) -i po/acq.js/acq.js.pot -o $(PO)/acq.js/$(LOCALE).po  -t $(PO)/acq.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/admin.properties/admin.properties.pot -o $(PO)/admin.properties/$(LOCALE).po  -t $(PO)/admin.properties/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/auth.properties/auth.properties.pot -o $(PO)/auth.properties/$(LOCALE).po  -t $(PO)/auth.properties/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/capture.js/capture.js.pot -o $(PO)/capture.js/$(LOCALE).po  -t $(PO)/capture.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/cat.properties/cat.properties.pot -o $(PO)/cat.properties/$(LOCALE).po  -t $(PO)/cat.properties/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/circ.properties/circ.properties.pot -o $(PO)/circ.properties/$(LOCALE).po  -t $(PO)/circ.properties/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/common.properties/common.properties.pot -o $(PO)/common.properties/$(LOCALE).po  -t $(PO)/common.properties/$(LOCALE).po 
@@ -106,9 +125,18 @@ updatepo: prep_output
        @pot2po $(PROGRESS) -i po/opac.dtd/opac.dtd.pot -o $(PO)/opac.dtd/$(LOCALE).po  -t $(PO)/opac.dtd/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/opac.js/opac.js.pot -o $(PO)/opac.js/$(LOCALE).po  -t $(PO)/opac.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/patron.properties/patron.properties.pot -o $(PO)/patron.properties/$(LOCALE).po  -t $(PO)/patron.properties/$(LOCALE).po 
+       @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 
+       @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 
+       @pot2po $(PROGRESS) -i po/register.js/register.js.pot -o $(PO)/register.js/$(LOCALE).po  -t $(PO)/register.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/reports.dtd/reports.dtd.pot -o $(PO)/reports.dtd/$(LOCALE).po  -t $(PO)/reports.dtd/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/reports.js/reports.js.pot -o $(PO)/reports.js/$(LOCALE).po  -t $(PO)/reports.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/reservation.js/reservation.js.pot -o $(PO)/reservation.js/$(LOCALE).po  -t $(PO)/reservation.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/selfcheck.js/selfcheck.js.pot -o $(PO)/selfcheck.js/$(LOCALE).po  -t $(PO)/selfcheck.js/$(LOCALE).po 
        @pot2po $(PROGRESS) -i po/vandelay.dtd/vandelay.dtd.pot -o $(PO)/vandelay.dtd/$(LOCALE).po  -t $(PO)/vandelay.dtd/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/AutoFieldWidget.js/AutoFieldWidget.js.pot -o $(PO)/AutoFieldWidget.js/$(LOCALE).po  -t $(PO)/AutoFieldWidget.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/TranslatorPopup.js/TranslatorPopup.js.pot -o $(PO)/TranslatorPopup.js/$(LOCALE).po  -t $(PO)/TranslatorPopup.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/User.js/User.js.pot -o $(PO)/User.js/$(LOCALE).po  -t $(PO)/User.js/$(LOCALE).po 
+       @pot2po $(PROGRESS) -i po/XULTermLoader.js/XULTermLoader.js.pot -o $(PO)/XULTermLoader.js/$(LOCALE).po  -t $(PO)/XULTermLoader.js/$(LOCALE).po 
        @echo "Updated PO files for locale $(LOCALE)"
 
 dtds2pot:
@@ -119,15 +147,37 @@ dtds2pot:
        @moz2po -P $(PROGRESS) -o $(PO)/vandelay.dtd/vandelay.dtd.pot -i $(DTDDIR)/en-US/vandelay.dtd 2>&1
 
 dojo2pot:
+       @scripts/dojo_resource.py --pot $(DOJO_ACQ_SRC)/acq.js --output $(PO)/acq.js/acq.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_ACTOR_SRC)/register.js --output $(PO)/register.js/register.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/capture.js --output $(PO)/capture.js/capture.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/pickup_and_return.js --output $(PO)/pickup_and_return.js/pickup_and_return.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/pull_list.js --output $(PO)/pull_list.js/pull_list.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_BOOKING_SRC)/reservation.js --output $(PO)/reservation.js/reservation.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_CIRC_SRC)/selfcheck.js --output $(PO)/selfcheck.js/selfcheck.js.pot
        @scripts/dojo_resource.py --pot $(DOJO_CON_SRC)/conify.js --output $(PO)/conify.js/conify.js.pot
        @scripts/dojo_resource.py --pot $(DOJO_OPAC_SRC)/opac.js --output $(PO)/opac.js/opac.js.pot
        @scripts/dojo_resource.py --pot $(DOJO_RPT_SRC)/reports.js --output $(PO)/reports.js/reports.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_USER_SRC)/User.js --output $(PO)/User.js/User.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/AutoFieldWidget.js --output $(PO)/AutoFieldWidget.js/AutoFieldWidget.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/TranslatorPopup.js --output $(PO)/TranslatorPopup.js/TranslatorPopup.js.pot
+       @scripts/dojo_resource.py --pot $(DOJO_WIDGET_SRC)/XULTermLoader.js --output $(PO)/XULTermLoader.js/XULTermLoader.js.pot
 
 po2dojo:
        @mkdir -p locale/$(LOCALE)
+       @scripts/dojo_resource.py --create $(PO)/acq.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/acq.js
+       @scripts/dojo_resource.py --create $(PO)/capture.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/capture.js
        @scripts/dojo_resource.py --create $(PO)/conify.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/conify.js
        @scripts/dojo_resource.py --create $(PO)/opac.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/opac.js
+       @scripts/dojo_resource.py --create $(PO)/pickup_and_return.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/pickup_and_return.js
+       @scripts/dojo_resource.py --create $(PO)/pull_list.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/pull_list.js
+       @scripts/dojo_resource.py --create $(PO)/register.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/register.js
+       @scripts/dojo_resource.py --create $(PO)/reservation.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/reservation.js
        @scripts/dojo_resource.py --create $(PO)/reports.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/reports.js
+       @scripts/dojo_resource.py --create $(PO)/selfcheck.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/selfcheck.js
+       @scripts/dojo_resource.py --create $(PO)/AutoFieldWidget.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/AutoFieldWidget.js
+       @scripts/dojo_resource.py --create $(PO)/TranslatorPopup.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/TranslatorPopup.js
+       @scripts/dojo_resource.py --create $(PO)/User.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/User.js
+       @scripts/dojo_resource.py --create $(PO)/XULTermLoader.js/$(LOCALE).po --output $(PROJECT)/$(LOCALE)/XULTermLoader.js
 
 ils2pot:
        @scripts/ils_events.py --pot $(EVTSRC) --output $(PO)/ils_events.xml/$(EVTOUT)
@@ -226,12 +276,29 @@ install: updatepo project fmidl2fmidlent fmidlpo2entity-en
        @scripts/merge_ils_events.py --master $(EVTSRC) --localization $(PROJECT)/$(LOCALE)/$(EVTXML) --output $(EVTSRC)
        cp $(PROJECT)/$(LOCALE)/$(SQLOUT).sql $(SQLSRCDIR)/$(SQLOUT)-$(LOCALE).sql
        cp $(PO)/$(FMIDLENT) $(REPORTDIR)/$(FMIDLENT)
+       mkdir -p $(DOJO_ACQ_SRC)/$(DOJO_LOCALE)
+       cp $(PROJECT)/$(LOCALE)/acq.js $(DOJO_ACQ_SRC)/$(DOJO_LOCALE)/acq.js
+       mkdir -p $(DOJO_ACTOR_SRC)/$(DOJO_LOCALE)
+       cp $(PROJECT)/$(LOCALE)/register.js $(DOJO_ACTOR_SRC)/$(DOJO_LOCALE)/register.js
+       mkdir -p $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)
+       cp $(PROJECT)/$(LOCALE)/capture.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/capture.js
+       cp $(PROJECT)/$(LOCALE)/pickup_and_return.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/pickup_and_return.js
+       cp $(PROJECT)/$(LOCALE)/pull_list.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/pull_list.js
+       cp $(PROJECT)/$(LOCALE)/reservation.js $(DOJO_BOOKING_SRC)/$(DOJO_LOCALE)/reservation.js
+       mkdir -p $(DOJO_CIRC_SRC)/$(DOJO_LOCALE)
+       cp $(PROJECT)/$(LOCALE)/selfcheck.js $(DOJO_CIRC_SRC)/$(DOJO_LOCALE)/selfcheck.js
        mkdir -p $(DOJO_CON_SRC)/$(DOJO_LOCALE)
        cp $(PROJECT)/$(LOCALE)/conify.js $(DOJO_CON_SRC)/$(DOJO_LOCALE)/conify.js
        mkdir -p $(DOJO_OPAC_SRC)/$(DOJO_LOCALE)
        cp $(PROJECT)/$(LOCALE)/opac.js $(DOJO_OPAC_SRC)/$(DOJO_LOCALE)/opac.js
        mkdir -p $(DOJO_RPT_SRC)/$(DOJO_LOCALE)
        cp $(PROJECT)/$(LOCALE)/reports.js $(DOJO_RPT_SRC)/$(DOJO_LOCALE)/reports.js
+       mkdir -p $(DOJO_User_SRC)/$(DOJO_LOCALE)
+       cp $(PROJECT)/$(LOCALE)/User.js $(DOJO_USER_SRC)/$(DOJO_LOCALE)/User.js
+       mkdir -p $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)
+       cp $(PROJECT)/$(LOCALE)/AutoFieldWidget.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/AutoFieldWidget.js
+       cp $(PROJECT)/$(LOCALE)/TranslatorPopup.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/TranslatorPopup.js
+       cp $(PROJECT)/$(LOCALE)/XULTermLoader.js $(DOJO_WIDGET_SRC)/$(DOJO_LOCALE)/XULTermLoader.js
 
 install_all_locales: newpo newpot
        for i in `ls po/*/*po|grep -v en-US | cut -f3 -d'/' | cut -f1 -d. | sort | uniq`; \
@@ -241,3 +308,12 @@ install_all_locales: newpo newpot
        if [ "$$RC" -gt 0 ]; \
        then echo $$RC; exit $$RC; \
        fi; done
+
+update_all_locales: newpot
+       for i in `ls po/*/*po|grep -v en-US | cut -f3 -d'/' | cut -f1 -d. | sort | uniq`; \
+       do \
+       make LOCALE=$$i updatepo; \
+       RC=$$?; \
+       if [ "$$RC" -gt 0 ]; \
+       then echo $$RC; exit $$RC; \
+       fi; done