SymbolView: Improve "Not Supported" message
ClosedPublic

Authored by loh.tar on Jul 31 2018, 4:42 PM.

Details

Summary

...by include the language name into the message

  • Avoid jump to top of document when clicked
Test Plan

Choose, e.g. some Markdown file

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
loh.tar created this revision.Jul 31 2018, 4:42 PM
Restricted Application added a project: Kate. · View Herald TranscriptJul 31 2018, 4:42 PM
Restricted Application added a subscriber: kwrite-devel. · View Herald Transcript
loh.tar requested review of this revision.Jul 31 2018, 4:42 PM
sars added a comment.Aug 1 2018, 7:16 AM

We need to use i18n() for translations. the tr() calls will not be translated by the current translation system.

i18n() is from KDE Frameworks. Have a look at this page for how to use it.

https://api.kde.org/frameworks/ki18n/html/prg_guide.html

loh.tar updated this revision to Diff 38894.Aug 1 2018, 10:12 AM
sars added a comment.Aug 1 2018, 12:02 PM

I'd say go for 1)

loh.tar updated this revision to Diff 38916.Aug 1 2018, 7:22 PM
loh.tar edited the summary of this revision. (Show Details)

Sorry that I add a new (little) feature.
Let me know if you like it and what you think about the type setting.

sars accepted this revision.Aug 2 2018, 5:01 AM
sars added inline comments.
addons/symbolviewer/plugin_katesymbolviewer.cpp
354 ↗(On Diff #38916)

The type is not used anywhere else at the moment....

This revision is now accepted and ready to land.Aug 2 2018, 5:01 AM
sars requested changes to this revision.Aug 3 2018, 6:01 PM

While you update the string maybe you could remove the type (-1) and the comment about it?

addons/symbolviewer/plugin_katesymbolviewer.cpp
355 ↗(On Diff #38916)

I just tried this one and got: Sorry, "Normal" not supported yet :)

The "Normal" string will not come once we get the plain-text parser in, but I think we need a bit more explanation somehow.

Maybe: File type "Normal" not supoertd yet

This revision now requires changes to proceed.Aug 3 2018, 6:01 PM
loh.tar updated this revision to Diff 39035.Aug 3 2018, 6:47 PM

I like to offer once again a two line version.
When I look at the supported, and even more the obviously not supported, languages at "Extra->Modus", ther names can be pretty long.

  • Is "Sorry, not supported yet!" better english than "Sorry, not yet supported!"? I would prefer the latter, but...my english is bad
  • I'm not sure if the double quotes around the name is really so nice
sars added a comment.Aug 5 2018, 8:58 PM

Otherwise I'm ready to commit.

addons/symbolviewer/plugin_katesymbolviewer.cpp
351

Yep, the double quotes around the name are not needed in this version.

loh.tar updated this revision to Diff 39170.Aug 6 2018, 9:36 AM

Double quotes removed

Thanks Kåre :-)

This revision was not accepted when it landed; it landed in state Needs Review.Aug 6 2018, 9:54 AM
This revision was automatically updated to reflect the committed changes.