Index: vdr-1.5.7/i18n-to-gettext.pl
===================================================================
--- vdr-1.5.7.orig/i18n-to-gettext.pl
+++ vdr-1.5.7/i18n-to-gettext.pl
@@ -75,7 +75,7 @@ die "can't find plugin name!" unless ($P
 # Locate the file containing the texts:
 
 $I18NFILE = "";
-for ("i18n.c", `ls *.c`) { # try i18n.c explicitly first
+for ("i18n.c", "i18n.h", `ls *.c`) { # try i18n.c explicitly first
     chomp($f = $_);
     if (-f $f && `grep tI18nPhrase $f`) {
        $I18NFILE = $f;
@@ -204,13 +204,26 @@ $POTFILE = "$PODIR/$PLUGIN.pot";
 # Collect all translated texts:
 
 open(F, $I18NFILE) || die "$I18NFILE: $!\n";
+$in_comment=0;
 while (<F>) {
       chomp;
       s/\t/ /g; # get rid of tabs
       s/  *$//; # get rid of trailing blanks
       s/^ *\/\/.*//; # remove comment lines
-      s/, *\/\/.*/,/; # strip trailing comments
+      s/ *\/\/.*//; # strip trailing comments
+      s/\/\*.*\*\///g; # strip c comments
+      if (/\/\*/) {
+        $in_comment=1;
+	s/\/\*.*$//; # remove starting of comment
+      } elsif (/\*\//) {
+        $in_comment=0;
+	s/^.*\*\///; # remove end of comment
+      } elsif ($in_comment) {
+        next;
+      }
       next if (/^ *$/); # skip empty lines
+      next if (/#if/);
+      next if (/#endif/);
       next unless ($found or $found = /const *tI18nPhrase .*{/); # sync on phrases
       next if (/const *tI18nPhrase .*{/); # skip sync line
       last if (/{ *NULL *}/); # stop after last phrase
