Translations:KMail/FAQs Hints and Tips/135/uk: Difference between revisions
Appearance
Created page with 'sub rec_parts
{
my $parent = $_[0];
my @parts = $_[1];
for $part(@parts)
{
my @sub_parts = $part->parts;
if (@sub_parts > 1)
{
rec_parts ($part,@...' |
No edit summary |
||
Line 1: | Line 1: | ||
sub rec_parts | <!--{{-->sub rec_parts | ||
{ | { | ||
my $parent = $_[0]; | my $parent = $_[0]; |
Latest revision as of 15:45, 23 September 2010
sub rec_parts {
my $parent = $_[0]; my @parts = $_[1]; for $part(@parts) {
my @sub_parts = $part->parts; if (@sub_parts > 1) { rec_parts ($part,@sub_parts); } my $type=$part->content_type; if (( $part->content_type =~ m[text/plain]gi )||( $part->content_type eq )) { my $body = $part->body;
$body=~s/['"`]*//g; my $translation_body=`echo "$body" | $translation_command $languages_pair -`; $translation_body=~s/['"`]*//g; my $msg=$body."\n\n---"."$separator"."---\n\n".$translation_body; `kdialog --title "$separator" --msgbox "$msg"`; }
}
} print $email->as_string; </syntaxhighlight>}}