[kmail2] [Bug 341085] Forward Email Template Error

2014-11-21 Thread Weng Xuetian
https://bugs.kde.org/show_bug.cgi?id=341085

Weng Xuetian  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #22 from Weng Xuetian  ---
SVN commit 1407013 by xuetianweng:

Fix forward template translation.



 M  +36 -66libtemplateparser.po  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1407013

-- 
You are receiving this mail because:
You are the assignee for the bug.


Make the world a better place. Donate to our year end fundraiser 
https://www.kde.org/fundraisers/yearend2014/
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-21 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #21 from Laurent Montel  ---
Please close this bug when i18n is fixed.
Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #20 from guoyunhebrave  ---
Thanks for your patient answer. Every question is clearly explained. I will
work with KDE China i18n team to solve the translation error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #19 from Laurent Montel  ---
There is not difference when I look at source code.
I think that it was old variable which was never removed.
I can't remove it for compatibility but indeed you can use %OTOADDR or %OTOLIST

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #18 from guoyunhebrave  ---
After test, I found %OTOADDR and %OCCADDR both outputs all email addresses. So
I can use:

-
From: %OFROMADDR
To: %OTOADDR
Cc: %OCCADDR
-

So, what is the difference between %OTOADDR and %OTOLIST? They seem output the
same email list of the same format.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #17 from Laurent Montel  ---
} else if (cmd.startsWith(QLatin1String("OADDRESSEESADDR"))) {
qDebug() << "Command: OADDRESSEESADDR";
i += strlen("OADDRESSEESADDR");
if (mOrigMsg) {
const QString to = mOrigMsg->to()->asUnicodeString();
const QString cc = mOrigMsg->cc()->asUnicodeString();

and 
} else if (cmd.startsWith(QLatin1String("OCCADDR"))) {
qDebug() << "Command: OCCADDR";
i += strlen("OCCADDR");
if (mOrigMsg) {
const QString str = mOrigMsg->cc()->asUnicodeString();
plainBody.append(str);
const QString body = plainToHtml(str);
htmlBody.append(body);
}


=> for me it's the same code for cc 
=> it's ok

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #16 from guoyunhebrave  ---
Yes. I can use OTOLIST. If I need CC I can customize my template as:

-
From: %OFROMADDR
To: %OTOLIST
Cc: %OCCADDR
-

But %OCCADDR only output one address, isn't it? There is not %OCCLIST parser.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #15 from Laurent Montel  ---

Another problem is that this variable allows to add "CC" too.

But you can use "OTOLIST" no ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #14 from guoyunhebrave  ---
Yes, I fully understand your consideration. How about providing another parser
"OTOALLADDR" for those who want to use customized templates? This solution does
not affect old users' template settings.

parser name:
OTOALLADDR
description:
All recipients without "To:" label.
example output:
Jon Larry, Thomas Whel


-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #13 from Laurent Montel  ---
indeed but I can't change it.
Otherwise I will break all template for all users.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #12 from guoyunhebrave  ---
I tested Finnish language, it works well. So it is only a Chinese translation
problem.

But I still suggest my solution that "%OADDRESSEESADDR" only outputs email
addresses.

i18n defined in "%OADDRESSEESADDR" always use the translation of current
application language. But non-English users may have two language templates:
English and their mother tongue. They usually have to define customized
template of reply, reply and forward.

If my KMail UI is in Chinese, "%OADDRESSEESADDR" always shows "发件人:XXX". When I
want to make an English template to communicate with foreign friends, I cannot
change the translation of "%OADDRESSEESADDR" in my customized template, because
it is totally decided by application language.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #11 from guoyunhebrave  ---
But I tried to use "%OADDRESSEESADDR" in my customized template. (Program
language is Chinese) It displays English "To:" not Chinese "收件人:".

i18nc("@item:intext email To", "To:") is defined in Chinese translation indeed.
That is strange.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #10 from guoyunhebrave  ---
OK, I understand. Thank you!

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #9 from Laurent Montel  ---
} else if (cmd.startsWith(QLatin1String("OADDRESSEESADDR"))) {
qDebug() << "Command: OADDRESSEESADDR";
i += strlen("OADDRESSEESADDR");
if (mOrigMsg) {
const QString to = mOrigMsg->to()->asUnicodeString();
const QString cc = mOrigMsg->cc()->asUnicodeString();
if (!to.isEmpty()) {
QString toLine =  i18nc("@item:intext email To", "To:")
+ QLatin1Char(' ') + to;
plainBody.append(toLine);
const QString body = plainToHtml(toLine);
htmlBody.append(body);
}
if (!to.isEmpty() && !cc.isEmpty()) {
plainBody.append(QLatin1Char('\n'));
const QString str =
plainToHtml(QString(QLatin1Char('\n')));
htmlBody.append(str);
}
if (!cc.isEmpty()) {
QString ccLine = i18nc("@item:intext email CC", "CC:")
+ QLatin1Char(' ') +  cc;
plainBody.append(ccLine);
const QString str = plainToHtml(ccLine);
htmlBody.append(str);
}
}
" QString toLine =  i18nc("@item:intext email To", "To:") + QLatin1Char(' ') +
to;"
=> it's translated
so it's not a probem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #8 from guoyunhebrave  ---
I have found the translation message and submitted a patch.

But there is still a problem. The program source code use "%OADDRESSEESADDR" to
represent all email receivers:

"From: %4\n"
"%OADDRESSEESADDR\n"


This will output following text in Chinese:

发件人:User C
To: User A, User B

It is a mixture of Chinese and English.

The reason is %OADDRESSEESADDR output "To: " before all receiver addresses. I
hope that %OADDRESSEESADDR only output email addresses without "To: " at the
beginning. And then program source code should be:

  "--  Forwarded Message  --\n"
  "\n"
  "Subject: %1\n"
  "Date: %2, %3\n"
  "From: %4\n"
  "To: %5\n"
  "\n"
  "%6\n"
  "-"

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #7 from Laurent Montel  ---
Hi kde-i18n :)
I think this bug is a translate problem.
Could you verify chinese version please ?

Thanks.

Le Wednesday 19 November 2014 08:49:25 guoyunhebrave a écrit :
> https://bugs.kde.org/show_bug.cgi?id=341085
> 
> --- Comment #5 from guoyunhebrave  ---
> No I didn't change it. This is the default settings in openSUSE 13.2. Maybe
> it is only a problem of packaging in openSUSE 13.2.
> 
> The default template is (in Chinese):
> 
> --  转发的信件  --
> 
> 主题:%OFULLSUBJECT
> 日期:%ODATE
> 发件人:%OTIMELONG
> 收件人:%OFROMADDR
> %OADDRESSEESADDR
> 
> %TEXT
> ---
> 
> I guess it might be a translation error of Chinese. When translating,
> translator changed several lines' orders by mistakes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #6 from Laurent Montel  ---
Yes indeed you're right it's in i18n(...)
We need to ask to translator to fix it.
QString DefaultTemplates::defaultForward()
{
return
QLatin1String("%REM=\"") + i18n("Default forward template") +
QLatin1String("\"%-\n") +
i18nc("Default forward template: %1: subject of original message, "
  "%2: date of original message, "
  "%3: time of original message, "
  "%4: mail address of original sender, "
  "%5: original message text",
  "\n"
  "--  Forwarded Message  --\n"
  "\n"
  "Subject: %1\n"
  "Date: %2, %3\n"
  "From: %4\n"
  "%OADDRESSEESADDR\n"
  "\n"
  "%5\n"
  "-",
  QLatin1String("%OFULLSUBJECT"), QLatin1String("%ODATE"),
QLatin1String("%OTIMELONG"), QLatin1String("%OFROMADDR"),
QLatin1String("%TEXT"));
}

it'es translated so translator make an error I think.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #5 from guoyunhebrave  ---
No I didn't change it. This is the default settings in openSUSE 13.2. Maybe it
is only a problem of packaging in openSUSE 13.2.

The default template is (in Chinese):

--  转发的信件  --

主题:%OFULLSUBJECT
日期:%ODATE
发件人:%OTIMELONG
收件人:%OFROMADDR
%OADDRESSEESADDR

%TEXT
---

I guess it might be a translation error of Chinese. When translating,
translator changed several lines' orders by mistakes.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #4 from Laurent Montel  ---
Perhaps you can send me a test email in private message.
Perhaps in japonese characters creates a problem

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-19 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #3 from Laurent Montel  ---
Are you reset default template ?
But default it"s 

%REM="Default forward template"%-

--  Forwarded Message  --

Subject: %OFULLSUBJECT
Date: %ODATE, %OTIMELONG
From: %OFROMADDR
%OADDRESSEESADDR

%TEXT
-

I don't see the error in source code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-18 Thread guoyunhebrave
https://bugs.kde.org/show_bug.cgi?id=341085

--- Comment #2 from guoyunhebrave  ---
(In reply to Laurent Montel from comment #1)
> So what is the error ?
> What is the expected result ?

Error:

This is the default head of forward mail in KMail: 
--
Subject: X
Date: Tuesday 18 November 2014
From: 10:24:08
To: A 
To: B 

1. "From" should not be time but an email address.
2. There are two "To" entries. The first is the address of sender, and the
second is the address of receiver. There should only be one "To" entry with
receiver's email.

I think the expected result should be:

--
Subject: X
Date: Tuesday 18 November 2014 10:24:08
From: A 
To: B 


-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs


[kmail2] [Bug 341085] Forward Email Template Error

2014-11-18 Thread Laurent Montel
https://bugs.kde.org/show_bug.cgi?id=341085

Laurent Montel  changed:

   What|Removed |Added

 CC||mon...@kde.org

--- Comment #1 from Laurent Montel  ---
So what is the error ?
What is the expected result ?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Kdepim-bugs mailing list
Kdepim-bugs@kde.org
https://mail.kde.org/mailman/listinfo/kdepim-bugs