handle @accesskey and append .label or .accesskey as appropriate
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Oct 2009 22:06:17 +0000 (22:06 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 5 Oct 2009 22:06:17 +0000 (22:06 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@14266 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/external/make_entities.pl

index e785808..a3c7c0d 100755 (executable)
@@ -15,9 +15,10 @@ my %entity_hash = ();
 open FILE, $filename;
 while (my $line = <FILE>) {
 
-    while ($line =~ /(label|value)="(.+?)"/g) {
+    while ($line =~ /(accesskey|label|value)="(.+?)"/g) {
+        my $attr = $1;
         my $value = $2; if ( $value =~ /^&.+;$/ ) { next; } # Already an entity
-        my $entity = $value; $entity =~ s/\W/_/g; $entity = $entity_prefix . $entity;
+        my $entity = $value; $entity =~ s/\W/_/g; $entity = $entity_prefix . $entity . ( $attr eq "accesskey" ? ".accesskey" : ".label" );
         $line =~ s/$value/&$entity;/g;
         print STDERR qq^<!ENTITY $entity "$value">\n^;
     }