NoiseFilter: Dont drop last word of apparent hostnames. Too many non-hostnames can...
[beagle.git] / Tiles / extract-translations.pl
blob365e83f13820d2c420ca4674eb4b5b742ba17c29
1 #!/usr/bin/perl -w
3 opendir(DIR, ".");
4 @files = grep(/\.html$/,readdir(DIR));
5 closedir(DIR);
7 open (OUTPUT, ">TranslationHack.cs");
9 print OUTPUT "using Mono.Unix;\n\npublic class TranslationHack {\n\tprivate void NotToBecalled () {\n";
11 foreach $file (@files) {
12 open (TEMPLATE, $file);
13 while ($data = <TEMPLATE>) {
14 @matches = ($data =~ m/\@text\%([^@]*)\@/g);
16 for ($i = 0; $i < scalar (@matches); $i++) {
17 print OUTPUT "\t\t/* For translators: From template Tiles/$file */\n";
18 print OUTPUT "\t\tCatalog.GetString (\"$matches[$i]\");\n";
23 print OUTPUT "\t}\n}\n";
24 close (OUTPUT)