<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl -w

opendir(DIR, ".");
@files = grep(/\.html$/,readdir(DIR));
closedir(DIR);

open (OUTPUT, "&gt;TranslationHack.cs");

print OUTPUT "using Mono.Unix;\n\npublic class TranslationHack {\n\tprivate void NotToBecalled () {\n";

foreach $file (@files) {
    open (TEMPLATE, $file);
    while ($data = &lt;TEMPLATE&gt;) {
	@matches = ($data =~ m/\@text\%([^@]*)\@/g);
	
	for ($i = 0; $i &lt; scalar (@matches); $i++) {
	    print OUTPUT "\t\t/* For translators: From template Tiles/$file */\n";
	    print OUTPUT "\t\tCatalog.GetString (\"$matches[$i]\");\n";
	}
    }
}

print OUTPUT "\t}\n}\n";
close (OUTPUT)



</pre></body></html>