D13876: Display more readable tooltip text in summary page

Harald Sitter noreply at phabricator.kde.org
Tue Jul 24 10:21:34 BST 2018


sitter requested changes to this revision.
sitter added a comment.
This revision now requires changes to proceed.


  Well, that opened a can of worms 😒

INLINE COMMENTS

> widgetEvents.cpp:157
> +                if (m_focus->file()->parent()) {
> +                    string = i18nc("Tooltip of used/free segment in summary", "%1\n%2: %3",
> +                        m_focus->file()->parent()->displayPath(),

I am pretty sure the context needs to explain what %1,2,3 are. It's not obvious from the string itself what the placeholders are. This applies to pretty much all the i18n strings in the diff.

> widgetEvents.cpp:175-177
> +                    string += i18np("File: %1", "Files: %1", files);
> +
> +                    if (percent > 0) string += QString(QLatin1String(" (%1%)")).arg(percent);

This isn't new code I think, but this needs to be something like

  if (percent > 0) {
  string += i18ncp("%1 is an amount of files", "File: %1", "Files: %1", files);
  } else {
  string += i18ncp("%1 is an amount of files", "File: %1 (%2%)", "Files: %1 (%2%)", files, percent);
  }

in a right-to-left language the percent may well need to go on the left of the string, not the right.

I am also not sure a plural is called for here. `Files: 1` seems perfectly acceptable to me. `File: 1` on the other hand looks somewhat odd.
Perhaps it should be written as `1 File (3%)`  and `2 Files (4%)`? I am somewhat indifferent other than `File: 1` looking meh though.

REPOSITORY
  R352 Filelight

REVISION DETAIL
  https://phabricator.kde.org/D13876

To: andrewc, sandsmark, sitter
Cc: kde-utils-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20180724/0b861431/attachment-0001.html>


More information about the Kde-utils-devel mailing list