summaryrefslogtreecommitdiffstats
path: root/tdeabc/scripts/createisomap.pl
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-15 21:57:54 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-15 21:57:54 -0600
commited99a30644c19b0a3cf0d2147243532df4daa16b (patch)
tree7f3f2850e59824fdf100a642367a82b1e7f0204f /tdeabc/scripts/createisomap.pl
parente5f2d46e9caf6942f365f1b454087dda71a340f7 (diff)
downloadtdelibs-ed99a30644c19b0a3cf0d2147243532df4daa16b.tar.gz
tdelibs-ed99a30644c19b0a3cf0d2147243532df4daa16b.zip
Rename additional header files to avoid conflicts with KDE4
Diffstat (limited to 'tdeabc/scripts/createisomap.pl')
-rwxr-xr-xtdeabc/scripts/createisomap.pl35
1 files changed, 35 insertions, 0 deletions
diff --git a/tdeabc/scripts/createisomap.pl b/tdeabc/scripts/createisomap.pl
new file mode 100755
index 000000000..897cd4896
--- /dev/null
+++ b/tdeabc/scripts/createisomap.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+#
+# Create a translation table countryname->iso-code from the entry.desktop
+# files in tdebase/l10n/*/
+#
+# USAGE EXAMPLE:
+# ./createisomap.pl $TDEDIR/share/locale/l10n > countrytransl.map
+#
+# Don't laugh at me. I put this together with an old perl book, perl
+# being a language I've never used before.
+
+@entries = <$ARGV[0]/*/entry.desktop>;
+chomp @entries;
+foreach $entry (@entries) {
+ local ( $entryiso, @entryfile, @mappings );
+ # print "--> $entry\n";
+ $entryiso = $entry;
+ $entryiso =~ s/$ARGV[0]\///;
+ $entryiso =~ s/\/entry\.desktop//;
+ # print " $entryiso\n";
+ open (IN, $entry);
+ @entryfile = <IN>;
+ close IN;
+ chomp @entryfile;
+ foreach $entryfileline (@entryfile) {
+ if ( $entryfileline =~ /^Name.*=(.*)$/ ) {
+ # push (@mappings, $1 . "\t" . $entryiso );
+ print "$1\t$entryiso\n";
+ }
+ }
+}
+
+# add some convenience entries which aren't part of the entry.desktop files
+
+print "Czech Republic\tcz\n";