[kde-doc-english] [kdepim] doc/kmail: doc: fix the mail_translate.pl script and its related example

Luigi Toscano luigi.toscano at tiscali.it
Wed Jan 23 20:15:31 UTC 2013


Git commit 0694e33ebcfbb983b4342508f94d969c668bc715 by Luigi Toscano.
Committed on 23/01/2013 at 21:15.
Pushed by ltoscano into branch 'master'.

doc: fix the mail_translate.pl script and its related example

Hypothesis: the errors came from the wiki->docbook conversion process,
as they were related to sequences of < ... >.

M  +3    -4    doc/kmail/faq.docbook

http://commits.kde.org/kdepim/0694e33ebcfbb983b4342508f94d969c668bc715

diff --git a/doc/kmail/faq.docbook b/doc/kmail/faq.docbook
index cb50a44..47e586a 100644
--- a/doc/kmail/faq.docbook
+++ b/doc/kmail/faq.docbook
@@ -820,7 +820,7 @@ my $translation_command = "translate ";
 my $languages_pair = "-f $from_language -t $to_language";
 my $line;
 my $message='';
-while ($line=)
+while ($line=<>)
 {
     $message.=$line;
 }
@@ -841,8 +841,7 @@ sub rec_parts
 	    rec_parts ($part, at sub_parts);
 	}
 	my $type=$part->content_type;
-	if (( $part->content_type =~ m[text/plain]gi )
-|( $part->content_type eq ''))
+	if (( $part->content_type =~ m[text/plain]gi )||( $part->content_type eq ''))
 	{
 	    my $body = $part->body;
 	    $body=~s/['"`]*//g;
@@ -870,7 +869,7 @@ print $email->as_string;
 </para></listitem>
 <listitem><para>Troubleshooting
 </para></listitem>
-<listitem><para>If the script is not working you can test it outside of &kmail; to narrow down the responsible component. Save a mail message as <filename>1.mbox</filename> file and run in the terminal <userinput>$~/bin/mail_translate.pl  2.mbox</userinput>
+<listitem><para>If the script is not working you can test it outside of &kmail; to narrow down the responsible component. Save a mail message as <filename>1.mbox</filename> file and run in the terminal <userinput>$~/bin/mail_translate.pl <1.mbox >2.mbox</userinput>
 </para></listitem>
 </itemizedlist>
 </para></listitem>


More information about the kde-doc-english mailing list