(Answer) (Category) Faq-O-Matic Faq-O-Matic : (Category) Administrators' Guide : (Category) In Development : (Category) Translations and text interface :
Patch: Language_de Language_fr
here is a patch for Language_de_iso8859_1.pm and for Language_fr.pm
it solves the problem with empty pairs of translations (space is now allowed after the closing '"')
in one line there was a typo (msgud) which is also fixed
attention: these patches are against fom-2.711
--- Language_de_iso8859_1.pm    Mon Sep  4 01:56:25 2000
+++ /usr/lib/perl5/site_perl/5.6.0/FAQ/OMatic/Language_de_iso8859_1.pm  Sun Jul  8 21:02:05 2001
@@ -172,3 +172,3 @@
 
-msgud "click here to use the new location"
+msgid "click here to use the new location"
 msgstr "klicke hier, um das neue Verzeichnis zu benutzen"
@@ -1237,10 +1237,10 @@
 msgstr "Uploaden eines Datei-Objekts fr %0 %1"
-);
+
 __EOF__
 
-       my @txs = grep { m/^msg/ } split(/\n/, $txfile);
+       my @txs = grep { m/^msg(id|str)/ } split(/\n/, $txfile);
        for (my $i=0; $i<@txs; $i+=2) {
-               $txs[$i] =~ m/msgid \"(.*)\"$/;
+               $txs[$i] =~ m/msgid \"(.+)\"\s*$/;
                my $from = $1;
-               $txs[$i+1] =~ m/msgstr \"(.*)\"$/;
+               $txs[$i+1] =~ m/msgstr \"(.+)\"\s*$/;
                my $to = $1;
--- Language_fr.pm      Mon Sep  4 01:56:11 2000
+++ /usr/lib/perl5/site_perl/5.6.0/FAQ/OMatic/Language_fr.pm    Sun Jul  8 21:08:04 2001
@@ -249,3 +249,3 @@
 
-msgud "click here to use the new location"
+msgid "click here to use the new location"
 #msgstr "klicke hier, um das neue Verzeichnis zu benutzen"
@@ -1907,11 +1907,9 @@
 
-
-);
 __EOF__
 
-       my @txs = grep { m/^msg/ } split(/\n/, $txfile);
+       my @txs = grep { m/^msg(id|str)/ } split(/\n/, $txfile);
        for (my $i=0; $i<@txs; $i+=2) {
-               $txs[$i] =~ m/msgid \"(.*)\"$/;
+               $txs[$i] =~ m/msgid \"(.+)\"\s*$/;
                my $from = $1;
-               $txs[$i+1] =~ m/msgstr \"(.*)\"$/;
+               $txs[$i+1] =~ m/msgstr \"(.+)\"\s*$/;
                my $to = $1;
[Append to This Answer]
Previous: (Answer) How to implement a translation into existing version of FOM ?
This document is: http://www.jonh.net/cgi-bin/faqomatic/fom?file=1406
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by SourceForge Logo and jonh.net.