[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-mac
Subject:    Re: [KDE/Mac] Review Request 126369: [OS X] adaptation(s) to platform limitations (WIP)
From:       René J.V. Bertin <rjvbertin () gmail ! com>
Date:       2016-05-29 21:07:18
Message-ID: 20160529210718.7145.29720 () mimi ! kde ! org
[Download RAW message or body]

--===============4114474311271452451==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit



> On May 29, 2016, 5:51 p.m., Kai Uwe Broulik wrote:
> > src/kstatusnotifieritem.cpp, line 909
> > <https://git.reviewboard.kde.org/r/126369/diff/4/?file=467228#file467228line909>
> > 
> > i18nc please
> 
> René J.V. Bertin wrote:
> I'm not sure what to expect here, what effect is using `i18nc("!")` going to have? \
> AFAIK the exclamation mark is pretty universal, and translating it might reduce the \
> label's effectiveness. I've tried many options to label the Dock icon (that's what \
> we're talking about here) and found no better alternative. 
> Kai Uwe Broulik wrote:
> We cannot assume that. Greek does not use the "?" question mark symbol, for \
> example. That's where the "c" comes in, you explain translators that you exactly \
> want ("one symbol") 
> Burkhard Lück wrote:
> To say "one symbol" is not sufficient for translators.
> You need to explain what this char is used for, its role in the gui, see \
> http://api.kde.org/frameworks/ki18n/html/prg_guide.html#good_ctxt 
> René J.V. Bertin wrote:
> Not to appear stubborn, but in your example, wouldn't a Greek font use the \
> appropriate symbol at the place of the question mark? Or do I need to specify the \
> `U+` Unicode code for that, like I do for the bullet? 
> Burkhard Lück wrote:
> You say "the exclamation mark is pretty universal" and that maybe true, but what \
> about locales not having something like an exclamation mark? translation teams have \
> their locale with their specific character set *and* style guides how to translate \
> E. g in the german translation team we never translate an exclamation mark at the \
> end of a messages literally, it nearly always is replaced by a period context like \
> noun or verb or U+ Unicode code have no meaning for translators

The point should have become moot with my last revision which uses a symbol rather \
than a punctuation mark. But I would think that (at least nowadays) even those \
locales you mention have been exposed to the kind of universal sign language that \
icons are. This is not written text that is to be translated in a semantically and \
gramatically correct way. It's a pictogram. Look at the icons shown in alert or \
question dialogs, or the icons shown on vehicle dashboards. The text accompanying \
them is translated, but not the icon, even if that icon contains a symbol like an \
exclamation or question mark. Or does KDE replace those icons with something else for \
locales that don't have exclamation and/or question marks?

Sadly I don't know of an easy way to check what Apple themselves do in this context. \
Alert dialogs mostly show the application icon rather than an icon that conveys the \
nature of the alert, and there's evidently no doubt that *those* icons don't depend \
on locale.


- René J.V.


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126369/#review95984
-----------------------------------------------------------


On May 29, 2016, 8:03 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126369/
> -----------------------------------------------------------
> 
> (Updated May 29, 2016, 8:03 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDE Frameworks.
> 
> 
> Repository: knotifications
> 
> 
> Description
> -------
> 
> OS X has a number of limitations in features used by KNotifications, notably \
> concerning the status notifier item (aka system tray icon). 
> This RR will likely evolve to address multiple limitations (at least also the \
> NeedsAttention state); at the moment it only proposes an emulation of \
> `QMenu::addSection`. 
> `QMenu::addSection` works by adding a QAction with a "texted separator" at the \
> insertion location. Texted separators do not exist in menu items in the OS X \
> "global" menubar (they become regular separators), and Qt will not provide a \
> platform-specific implementation. Loss of the section title text is maybe not \
> always an issue, but I think it is in the system tray menu. I therefore propose to \
> emulate `QMenu::addSection` by replacing the texted separator with an inactive \
> (disabled) menu item that shows the text, followed by a standard separator. Menus \
> in the notification area are much less subject to interface guidelines, so the \
> presence of an item icon is acceptable and IMO useful for the `titleAction`. 
> Testing the NeedsAttention state with the tests/kstatusnotifieritemtest application \
> leads to disappearance of the menubar icon, i.e. the access to the notifier menu \
> becomes invisible rather than blinking (which is what I get on Linux using the same \
> packaging). Adding a few qDebug statements shows that the `attentionIcon` is empty. \
> I'd appreciate a crash course how this feature is supposed to work, so I can see if \
> an OS X implementation might be feasible. 
> 
> Diffs
> -----
> 
> CMakeLists.txt 7cf8379 
> src/CMakeLists.txt 7eb3125 
> src/knotification.cpp 352cf49 
> src/kstatusnotifieritem.cpp 27abfb8 
> src/kstatusnotifieritemprivate_p.h 8fdfd4c 
> src/notifybypopup.cpp 7d69a36 
> tests/kstatusnotifieritemtest.cpp 973fc85 
> 
> Diff: https://git.reviewboard.kde.org/r/126369/diff/
> 
> 
> Testing
> -------
> 
> On OS X 10.9.5 with Qt 5.5.1 and frameworks 5.17.0 .
> 
> 
> File Attachments
> ----------------
> 
> the systray icon & menu created by kstatusnotifieritemtest . This application has \
> no icon to show. https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/286037ae-07b3-454a-a226-1748854493a1__kstatusnotifieritemtest-systray.png
>  The systray icon and menu created by the KDE4 kwalletmanager (code has an \
> equivalent patch) https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/4fc9d4e4-1537-478c-9196-94cbc17b6b7c__kwalletmanager-systray.png
>  An Apple systray icon+menu that shows icons (which cannot be hidden)
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/fc48a963-2e18-4396-bd38-062d41688118__Apple-systray-menu-with-icons.png
>  kstatusnotifieritemtest with added appIcon
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/17/e896e90d-f0a8-43f7-9199-847572832df7__kstatusnotifieritemtest-with-appIcon.png
>  kstatusnotifieritemtest-with-appIcon+attention.png
> https://git.reviewboard.kde.org/media/uploaded/files/2015/12/17/f41081db-8e09-4ea2-95c1-f507c62109d4__kstatusnotifieritemtest-with-appIconattention.png
>  
> 
> Thanks,
> 
> René J.V. Bertin
> 
> 


--===============4114474311271452451==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/126369/">https://git.reviewboard.kde.org/r/126369/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On May 29th, 2016, 5:51 p.m. CEST, <b>Kai Uwe \
Broulik</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  


<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/126369/diff/4/?file=467228#file467228line909" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kstatusnotifieritem.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 4)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">845</font></th>  <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="k">if</span> <span class="p">(</span><span class="o">!</span><span \
class="n">movie</span><span class="p">)</span> <span class="p">{</span></pre></td>  \
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">902</font></th>  <td bgcolor="#fdfebc" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">QtMac</span><span class="o">::</span><span \
class="n">setBadgeLabelText</span><span class="p">(</span><span \
class="n">QStringLiteral</span><span class="p">(</span><span \
class="s">&quot;!&quot;</span><span class="p">));</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">i18nc \
please</p></pre>  </blockquote>



 <p>On May 29th, 2016, 6:45 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I'm \
not sure what to expect here, what effect is using <code style="text-rendering: \
inherit;color: #4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">i18nc("!")</code> going to have? AFAIK the exclamation mark is pretty \
universal, and translating it might reduce the label's effectiveness. I've tried many \
options to label the Dock icon (that's what we're talking about here) and found no \
better alternative.</p></pre>  </blockquote>





 <p>On May 29th, 2016, 6:50 p.m. CEST, <b>Kai Uwe Broulik</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">We \
cannot assume that. Greek does not use the "?" question mark symbol, for example. \
That's where the "c" comes in, you explain translators that you exactly want ("one \
symbol")</p></pre>  </blockquote>





 <p>On May 29th, 2016, 7:15 p.m. CEST, <b>Burkhard Lück</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">To \
say "one symbol" is not sufficient for translators. You need to explain what this \
char is used for, its role in the gui, see \
http://api.kde.org/frameworks/ki18n/html/prg_guide.html#good_ctxt</p></pre>  \
</blockquote>





 <p>On May 29th, 2016, 7:25 p.m. CEST, <b>René J.V. Bertin</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Not \
to appear stubborn, but in your example, wouldn't a Greek font use the appropriate \
symbol at the place of the question mark? Or do I need to specify the <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">U+</code> Unicode code for that, like I do for the \
bullet?</p></pre>  </blockquote>





 <p>On May 29th, 2016, 8:14 p.m. CEST, <b>Burkhard Lück</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">You \
say "the exclamation mark is pretty universal" and that maybe true, but what about \
locales not having something like an exclamation mark? translation teams have their \
locale with their specific character set <em style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: normal;">and</em> style guides \
how to translate E. g in the german translation team we never translate an \
exclamation mark at the end of a messages literally, it nearly always is replaced by \
a period context like noun or verb or U+ Unicode code have no meaning for \
translators</p></pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">The point should have become moot with my last revision which uses a symbol \
rather than a punctuation mark. But I would think that (at least nowadays) even those \
locales you mention have been exposed to the kind of universal sign language that \
icons are. This is not written text that is to be translated in a semantically and \
gramatically correct way. It's a pictogram. Look at the icons shown in alert or \
question dialogs, or the icons shown on vehicle dashboards. The text accompanying \
them is translated, but not the icon, even if that icon contains a symbol like an \
exclamation or question mark. Or does KDE replace those icons with something else for \
locales that don't have exclamation and/or question marks?</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Sadly \
I don't know of an easy way to check what Apple themselves do in this context. Alert \
dialogs mostly show the application icon rather than an icon that conveys the nature \
of the alert, and there's evidently no doubt that <em style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
normal;">those</em> icons don't depend on locale.</p></pre> <br />




<p>- René J.V.</p>


<br />
<p>On May 29th, 2016, 8:03 p.m. CEST, René J.V. Bertin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Software on Mac OS X and KDE Frameworks.</div>
<div>By René J.V. Bertin.</div>


<p style="color: grey;"><i>Updated May 29, 2016, 8:03 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
knotifications
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">OS X has a number of limitations in features used by \
KNotifications, notably concerning the status notifier item (aka system tray \
icon).</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">This RR will likely evolve to address multiple \
limitations (at least also the NeedsAttention state); at the moment it only proposes \
an emulation of <code style="text-rendering: inherit;color: #4444cc;padding: \
0;white-space: normal;margin: 0;line-height: inherit;">QMenu::addSection</code>.</p> \
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;"><code style="text-rendering: inherit;color: \
#4444cc;padding: 0;white-space: normal;margin: 0;line-height: \
inherit;">QMenu::addSection</code> works by adding a QAction with a "texted \
separator" at the insertion location. Texted separators do not exist in menu items in \
the OS X "global" menubar (they become regular separators), and Qt will not provide a \
platform-specific implementation. Loss of the section title text is maybe not always \
an issue, but I think it is in the system tray menu. I therefore propose to emulate \
<code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">QMenu::addSection</code> by replacing the \
texted separator with an inactive (disabled) menu item that shows the text, followed \
by a standard separator. Menus in the notification area are much less subject to \
interface guidelines, so the presence of an item ico  n is acceptable and IMO useful \
for the <code style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: \
normal;margin: 0;line-height: inherit;">titleAction</code>.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Testing the NeedsAttention state with the tests/kstatusnotifieritemtest \
application leads to disappearance of the menubar icon, i.e. the access to the \
notifier menu becomes invisible rather than blinking (which is what I get on Linux \
using the same packaging). Adding a few qDebug statements shows that the <code \
style="text-rendering: inherit;color: #4444cc;padding: 0;white-space: normal;margin: \
0;line-height: inherit;">attentionIcon</code> is empty. I'd appreciate a crash course \
how this feature is supposed to work, so I can see if an OS X implementation might be \
feasible.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">On OS X 10.9.5 with Qt 5.5.1 and frameworks 5.17.0 \
.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>CMakeLists.txt <span style="color: grey">(7cf8379)</span></li>

 <li>src/CMakeLists.txt <span style="color: grey">(7eb3125)</span></li>

 <li>src/knotification.cpp <span style="color: grey">(352cf49)</span></li>

 <li>src/kstatusnotifieritem.cpp <span style="color: grey">(27abfb8)</span></li>

 <li>src/kstatusnotifieritemprivate_p.h <span style="color: \
grey">(8fdfd4c)</span></li>

 <li>src/notifybypopup.cpp <span style="color: grey">(7d69a36)</span></li>

 <li>tests/kstatusnotifieritemtest.cpp <span style="color: \
grey">(973fc85)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/126369/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/286037ae-07b3-454a-a226-1748854493a1__kstatusnotifieritemtest-systray.png">the \
systray icon &amp; menu created by kstatusnotifieritemtest . This application has no \
icon to show.</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/4fc9d4e4-1537-478c-9196-94cbc17b6b7c__kwalletmanager-systray.png">The \
systray icon and menu created by the KDE4 kwalletmanager (code has an equivalent \
patch)</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/12/16/fc48a963-2e18-4396-bd38-062d41688118__Apple-systray-menu-with-icons.png">An \
Apple systray icon+menu that shows icons (which cannot be hidden)</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/12/17/e896e90d \
-f0a8-43f7-9199-847572832df7__kstatusnotifieritemtest-with-appIcon.png">kstatusnotifieritemtest \
with added appIcon</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/12/17/f41081db \
-8e09-4ea2-95c1-f507c62109d4__kstatusnotifieritemtest-with-appIconattention.png">kstatusnotifieritemtest-with-appIcon+attention.png</a></li>


</ul>




  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============4114474311271452451==--


[Attachment #3 (text/plain)]

_______________________________________________
kde-mac@kde.org
List Information: https://mail.kde.org/mailman/listinfo/kde-mac
KDE/Mac Information: http://community.kde.org/Mac

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic