]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - locale/make-php-trans.awk
Allow bold, italics or underlined for numbers
[SourceForge/phpwiki.git] / locale / make-php-trans.awk
1 BEGIN {
2   msgid=""; msgstr="";
3   print ("<?php\n");
4 }
5
6 /^msgid "/ { #"{
7   if (msgid && str) {
8     gsub(/\$/, "\\$", str);
9     print ("$locale[\"" msgid "\"] = \"" str "\";");
10   }
11   str = substr ($0, 8, length ($0) - 8);
12   msgstr="";
13 }
14
15 /^msgstr "/ { #"{
16   msgid=str;
17   str = substr ($0, 9, length ($0) - 9);
18   next;
19 }
20
21 /^"/ { #"{
22   str = (str substr ($0, 2, length ($0) - 2));
23   next;
24 }
25
26 END {
27   if (msgid && str) {
28     gsub(/\$/, "\\$", str);
29     print ("$locale[\"" msgid "\"] =\n   \"" str "\";");
30   }
31 }