[open-ils-commits] r7626 - in trunk/Open-ILS/xul/staff_client: .
external
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Aug 7 11:25:40 EDT 2007
Author: miker
Date: 2007-08-07 11:22:52 -0400 (Tue, 07 Aug 2007)
New Revision: 7626
Modified:
trunk/Open-ILS/xul/staff_client/Makefile
trunk/Open-ILS/xul/staff_client/external/dtd2js.pl
trunk/Open-ILS/xul/staff_client/external/dtd2js.sh
Log:
Patch from Dan Scott to robustify current JS localization code
Modified: trunk/Open-ILS/xul/staff_client/Makefile
===================================================================
--- trunk/Open-ILS/xul/staff_client/Makefile 2007-08-07 15:17:42 UTC (rev 7625)
+++ trunk/Open-ILS/xul/staff_client/Makefile 2007-08-07 15:22:52 UTC (rev 7626)
@@ -74,7 +74,10 @@
@echo
@echo '********************************************************* Grabbing lang.dtd from the OPAC code '
cp ../../../Open-ILS/web/opac/locale/en-US/lang.dtd build/chrome/locale/en-US/
+ # Generate the lang.js file for the stamped build
external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > build/chrome/content/main/lang.js
+ # Generate the lang.js file for versionless as well
+ external/dtd2js.pl build/chrome/locale/en-US/lang.dtd > chrome/content/main/lang.js
open-ils:
@echo
Modified: trunk/Open-ILS/xul/staff_client/external/dtd2js.pl
===================================================================
--- trunk/Open-ILS/xul/staff_client/external/dtd2js.pl 2007-08-07 15:17:42 UTC (rev 7625)
+++ trunk/Open-ILS/xul/staff_client/external/dtd2js.pl 2007-08-07 15:22:52 UTC (rev 7626)
@@ -5,11 +5,12 @@
#<!ENTITY common.series "Series">
#<!ENTITY common.keyword "Keyword">
#<!ENTITY common.type "Type">
+#<!ENTITY tricksy.entity 'Some text with "quoted" content'>
print "var entities = {};";
while( $line = <> ) {
- if ($line =~ /<!ENTITY\s+(\S+)\s+(["'].*["'])\s*>/) {
+ if ($line =~ /<!ENTITY\s+(\S+)\s+((["']).*\3)\s*>\s*$/) {
print "entities['$1'] = $2;\n";
} else {
chomp $line;
Modified: trunk/Open-ILS/xul/staff_client/external/dtd2js.sh
===================================================================
--- trunk/Open-ILS/xul/staff_client/external/dtd2js.sh 2007-08-07 15:17:42 UTC (rev 7625)
+++ trunk/Open-ILS/xul/staff_client/external/dtd2js.sh 2007-08-07 15:22:52 UTC (rev 7626)
@@ -1,2 +1,2 @@
#!/bin/bash
-./dtd2js.pl ~/ILS/Open-ILS/web/opac/locale/en-US/lang.dtd > ../chrome/content/main/lang.js
+./dtd2js.pl ../../../web/opac/locale/en-US/lang.dtd > ../chrome/content/main/lang.js
More information about the open-ils-commits
mailing list