Bug 222434 - No explanation with translatable strings in kmail (htmlstatusbar.cpp)
Summary: No explanation with translatable strings in kmail (htmlstatusbar.cpp)
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 20:37 UTC by Freek de Kruijf
Modified: 2010-01-16 19:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Freek de Kruijf 2010-01-12 20:37:35 UTC
Version:            (using Devel)
Installed from:    Compiled sources

In kmail.pot the following is present:
#: htmlstatusbar.cpp:109
msgid="<qt><b><br />H<br />T<br />M<br />L<br /> <br />M<br />e<br />s<br />s<br /
>a<br />g<br />e</b></qt>"

#: htmlstatusbar.cpp:112
msgid="<qt><br />N<br />o<br /> <br />H<br />T<br />M<br />L<br /> <br />M<br /
>e<br />s<br />s<br />a<br />g<br />e</qt>"

#: htmlstatusbar.cpp:116
msgid="<qt><br />P<br />l<br />a<br />i<br />n<br /> <br />M<br />e<br />s<br /
>s<br />a<br />g<br />e<br /></qt>"

Without any explanation a translator is completely lost what to do with these strings.
Comment 1 Torgny Nyblom 2010-01-12 21:05:56 UTC
Diff inlined below, needs aproval from i18n team before committing.

svn diff
Index: kmail/htmlstatusbar.cpp
===================================================================
--- kmail/htmlstatusbar.cpp	(revision 1073708)
+++ kmail/htmlstatusbar.cpp	(working copy)
@@ -106,14 +106,14 @@
   switch ( mode() ) {
   case Html: // bold: "HTML Message"
   case MultipartHtml:
-    return i18n( "<qt><b><br />H<br />T<br />M<br />L<br /> "
+    return i18nc("'HTML Message' with html linebreaks between each letter.", "<qt><b><br />H<br />T<br />M<br />L<br /> "
                  "<br />M<br />e<br />s<br />s<br />a<br />g<br />e</b></qt>" );
   case Normal: // normal: "No HTML Message"
-    return i18n( "<qt><br />N<br />o<br /> "
+    return i18nc("'No HTML Message' with html linebreaks between each letter.", "<qt><br />N<br />o<br /> "
                  "<br />H<br />T<br />M<br />L<br /> "
                  "<br />M<br />e<br />s<br />s<br />a<br />g<br />e</qt>" );
   case MultipartPlain: // normal: "Plain Message"
-    return i18n( "<qt><br />P<br />l<br />a<br />i<br />n<br /> "
+    return i18n("'Plain Message' with html linebreaks between each letter.", "<qt><br />P<br />l<br />a<br />i<br />n<br /> "
                  "<br />M<br />e<br />s<br />s<br />a<br />g<br />e<br /></qt>" );
   default:
     return QString();
Comment 2 Thomas McGuire 2010-01-16 13:57:13 UTC
> Diff inlined below, needs aproval from i18n team before committing.

Thanks for the patch, Torgny. Committing to trunk in kdepim/messageviewer is always ok.
Not sure if a backport to the KDE 4.4 branch makes sense at this late stage, but as you said, the translators can decide that.

BTW, how about simply having e.g . i18n( "HTML Message" ), and then providing a function which adds the HTML formatting to that? It would be even easier for translators.
The additional i18n context is of course also ok.

Please commit to kdepim/messageviewer in trunk in any case.
Comment 3 Torgny Nyblom 2010-01-16 19:34:31 UTC
SVN commit 1075775 by tnyblom:

Add context

BUG: 222434


 M  +5 -3      htmlstatusbar.cpp  


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