[graphics/okular] /: Change labels of selection and annotation tools to be imperative
Nate Graham
null at kde.org
Thu Oct 14 19:22:22 BST 2021
Git commit ce6582c7618ec613ace6c0e7a70cce8e6e4f2ad1 by Nate Graham, on behalf of Bharadwaj Raju.
Committed on 14/10/2021 at 18:22.
Pushed by ngraham into branch 'master'.
Change labels of selection and annotation tools to be imperative
This makes them conform to the HIG and also looks cleaner.
M +17 -17 doc/index.docbook
M +14 -14 part/annotationactionhandler.cpp
M +4 -4 part/data/toolsQuick.xml
M +4 -4 part/pageview.cpp
https://invent.kde.org/graphics/okular/commit/ce6582c7618ec613ace6c0e7a70cce8e6e4f2ad1
diff --git a/doc/index.docbook b/doc/index.docbook
index 67baf0cc1..ad34c58d9 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -514,9 +514,9 @@ Context menu actions like Rename Bookmarks etc.)
</mediaobject>
</screenshot>
<para>&okular; has two different kind of annotations:</para>
- <para>Text annotations like <guilabel>Yellow Highlighter</guilabel> and <guilabel>Black Underlining</guilabel>
+ <para>Text annotations like <guilabel>Highlight in Yellow</guilabel> and <guilabel>Underline</guilabel>
for files with text like ⪚ &PDF;.</para>
- <para>Graphic annotations like <guilabel>Pop-up Note</guilabel>, <guilabel>Inline Note</guilabel>, <guilabel>Freehand Line</guilabel>, <guilabel>Highlighter</guilabel>, <guilabel>Straight Line</guilabel>, <guilabel>Polygon</guilabel>, <guilabel>Stamp</guilabel>, <guilabel>Underline</guilabel>, <guilabel>Ellipse</guilabel>, and <guilabel>Typewriter</guilabel> for all formats supported by &okular;.</para>
+ <para>Graphic annotations like <guilabel>Pop-up Note</guilabel>, <guilabel>Inline Note</guilabel>, <guilabel>Freehand Line</guilabel>, <guilabel>Highlight</guilabel>, <guilabel>Straight Line</guilabel>, <guilabel>Polygon</guilabel>, <guilabel>Stamp</guilabel>, <guilabel>Underline</guilabel>, <guilabel>Ellipse</guilabel>, and <guilabel>Insert Text</guilabel> for all formats supported by &okular;.</para>
<para>Using the context menu either in the <guilabel>Annotations</guilabel> view of the sidebar or in the main window you can open a <guilabel>Pop up Note</guilabel> for any kind of annotation and add or edit comments.</para>
<para>Annotations are not only limited to &PDF; files, they can be used for any format &okular; supports.</para>
<para>
@@ -579,7 +579,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Highlighter
+ Highlight
</para>
</entry>
<entry>
@@ -687,18 +687,18 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Typewriter
+ Insert Text
</para>
</entry>
<entry>
<para>
- Typewriter features opaque letters on transparent background, so that it is useful to fill noninteractive forms.
+ Insert Text features opaque letters on transparent background, which is useful to fill noninteractive forms.
</para>
<para>
Click on the tool button, then click with the &LMB; and hold to place the top-left corner of the note, then drag to place the bottom-right one. Enter the text of the note then click on the <guibutton>OK</guibutton> to save the note, <guibutton>Cancel</guibutton> to cancel note entering or <guibutton>Clear</guibutton> to clear the note.
</para>
<para>
- It is possible to define the <guilabel>Font</guilabel> and <guilabel>Text color</guilabel> for the text. Just right-click on the typewriter text created and select the <guimenuitem>Properties</guimenuitem> menu item.
+ It is possible to define the <guilabel>Font</guilabel> and <guilabel>Text color</guilabel> for the text. Just right-click on the text inserted and select the <guimenuitem>Properties</guimenuitem> menu item.
</para>
</entry>
</row>
@@ -714,7 +714,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Inline Note
+ Insert Inline Note
</para>
</entry>
<entry>
@@ -741,7 +741,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Pop-up Note
+ Insert Pop-up Note
</para>
</entry>
<entry>
@@ -768,7 +768,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Freehand Line
+ Draw Freehand Line
</para>
</entry>
<entry>
@@ -795,7 +795,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Arrow (drop-down list)
+ Draw Arrow (drop-down list)
</para>
</entry>
<entry>
@@ -822,7 +822,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Straight line (drop-down list)
+ Draw Straight line (drop-down list)
</para>
</entry>
<entry>
@@ -849,7 +849,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Rectangle (drop-down list)
+ Draw Rectangle (drop-down list)
</para>
</entry>
<entry>
@@ -876,7 +876,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Ellipse (drop-down list)
+ Draw Ellipse (drop-down list)
</para>
</entry>
<entry>
@@ -903,7 +903,7 @@ Context menu actions like Rename Bookmarks etc.)
</entry>
<entry>
<para>
- Polygon (drop-down list)
+ Draw Polygon (drop-down list)
</para>
</entry>
<entry>
@@ -1257,7 +1257,7 @@ Context menu actions like Rename Bookmarks etc.)
else on the annotation to move it.
Pressing &Esc; or clicking an area outside the annotation cancels a selection.
</para>
- <para>Resizing is only applicable for annotation types Inline Note, Typewriter, Stamp and Ellipse.</para>
+ <para>Resizing is only applicable for annotation types Inline Note, Insert Text, Stamp and Ellipse.</para>
<note>
<para>
@@ -1682,7 +1682,7 @@ Context menu actions like Rename Bookmarks etc.)
</term>
<listitem>
<para><action>Copy</action> the currently selected text in
- <guibutton>Text Selection</guibutton> mode to the clipboard.</para>
+ <guibutton>Select Text</guibutton> mode to the clipboard.</para>
</listitem>
</varlistentry>
</variablelist>
@@ -1698,7 +1698,7 @@ Context menu actions like Rename Bookmarks etc.)
</term>
<listitem>
<para><action>Selects</action> all the text (if the document provides it). This works only in
- <guibutton>Text Selection</guibutton> mode.</para>
+ <guibutton>Select Text</guibutton> mode.</para>
</listitem>
</varlistentry>
</variablelist>
diff --git a/part/annotationactionhandler.cpp b/part/annotationactionhandler.cpp
index 54d21f4f5..8f5571c69 100644
--- a/part/annotationactionhandler.cpp
+++ b/part/annotationactionhandler.cpp
@@ -545,26 +545,26 @@ AnnotationActionHandler::AnnotationActionHandler(PageViewAnnotator *parent, KAct
d->annotator = parent;
// toolbar visibility actions
- d->aToolBarVisibility = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18n("&Annotations"), this);
+ d->aToolBarVisibility = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("verb", "&Annotate"), this);
d->aHideToolBar = new QAction(QIcon::fromTheme(QStringLiteral("dialog-close")), i18nc("@action:intoolbar Hide the toolbar", "Hide"), this);
d->aShowToolBar = new QAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("@action:intoolbar Show the builtin annotation toolbar", "Show more annotation tools"), this);
// Text markup actions
- KToggleAction *aHighlighter = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-highlight")), i18nc("@action:intoolbar Annotation tool", "Highlighter"), this);
- KToggleAction *aUnderline = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline")), i18nc("@action:intoolbar Annotation tool", "Underline"), this);
- KToggleAction *aSquiggle = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline-squiggle")), i18nc("@action:intoolbar Annotation tool", "Squiggle"), this);
- KToggleAction *aStrikeout = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-strikethrough")), i18nc("@action:intoolbar Annotation tool", "Strike Out"), this);
+ KToggleAction *aHighlighter = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-highlight")), i18nc("@action:intoolbar Annotation tool, verb", "Highlight"), this);
+ KToggleAction *aUnderline = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline")), i18nc("@action:intoolbar Annotation tool, verb", "Underline"), this);
+ KToggleAction *aSquiggle = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline-squiggle")), i18nc("@action:intoolbar Annotation tool, verb", "Squiggle"), this);
+ KToggleAction *aStrikeout = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-strikethrough")), i18nc("@action:intoolbar Annotation tool, verb", "Strike Out"), this);
// Notes actions
- KToggleAction *aTypewriter = new KToggleAction(QIcon::fromTheme(QStringLiteral("tool-text")), i18nc("@action:intoolbar Annotation tool", "Typewriter"), this);
- KToggleAction *aInlineNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("note")), i18nc("@action:intoolbar Annotation tool", "Inline Note"), this);
- KToggleAction *aPopupNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("edit-comment")), i18nc("@action:intoolbar Annotation tool", "Popup Note"), this);
- KToggleAction *aFreehandLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("@action:intoolbar Annotation tool", "Freehand Line"), this);
+ KToggleAction *aTypewriter = new KToggleAction(QIcon::fromTheme(QStringLiteral("tool-text")), i18nc("@action:intoolbar Annotation tool, verb", "Insert Text"), this);
+ KToggleAction *aInlineNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("note")), i18nc("@action:intoolbar Annotation tool, verb", "Insert Inline Note"), this);
+ KToggleAction *aPopupNote = new KToggleAction(QIcon::fromTheme(QStringLiteral("edit-comment")), i18nc("@action:intoolbar Annotation tool, verb", "Insert Popup Note"), this);
+ KToggleAction *aFreehandLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-freehand")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Freehand Line"), this);
// Geometrical shapes actions
- KToggleAction *aStraightLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-line")), i18nc("@action:intoolbar Annotation tool", "Straight line"), this);
- KToggleAction *aArrow = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-arrow")), i18nc("@action:intoolbar Annotation tool", "Arrow"), this);
- KToggleAction *aRectangle = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-rectangle")), i18nc("@action:intoolbar Annotation tool", "Rectangle"), this);
- KToggleAction *aEllipse = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-ellipse")), i18nc("@action:intoolbar Annotation tool", "Ellipse"), this);
- KToggleAction *aPolygon = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-polyline")), i18nc("@action:intoolbar Annotation tool", "Polygon"), this);
+ KToggleAction *aStraightLine = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-line")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Straight line"), this);
+ KToggleAction *aArrow = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-arrow")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Arrow"), this);
+ KToggleAction *aRectangle = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-rectangle")), i18nc("@action:intoolbar Annotation tool, verb", " Draw Rectangle"), this);
+ KToggleAction *aEllipse = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-ellipse")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Ellipse"), this);
+ KToggleAction *aPolygon = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-polyline")), i18nc("@action:intoolbar Annotation tool, verb", "Draw Polygon"), this);
d->aGeomShapes = new ToggleActionMenu(i18nc("@action", "Geometrical shapes"), this);
d->aGeomShapes->setEnabled(true); // Need to explicitly set this once, or refreshActions() in part.cpp will disable this action
#if KWIDGETSADDONS_VERSION < QT_VERSION_CHECK(5, 77, 0)
diff --git a/part/data/toolsQuick.xml b/part/data/toolsQuick.xml
index d4e7329c0..b8313be0c 100644
--- a/part/data/toolsQuick.xml
+++ b/part/data/toolsQuick.xml
@@ -6,12 +6,12 @@ Tool
[id] {int = unique id identifying the quick tool}
-->
<quickAnnotatingTools>
- <tool id="1" type="highlight" name="Yellow Highlighter" default="true">
+ <tool id="1" type="highlight" name="Highlight in Yellow" default="true">
<engine type="TextSelector" color="#ffff00">
<annotation type="Highlight" color="#ffffff00"/>
</engine>
</tool>
- <tool id="2" type="highlight" name="Green Highlighter" default="true">
+ <tool id="2" type="highlight" name="Highlight in Green" default="true">
<engine type="TextSelector" color="#00ff00">
<annotation type="Highlight" color="#ff00ff00"/>
</engine>
@@ -26,12 +26,12 @@ Tool
<annotation type="Typewriter" color="#00ffffff" textColor="#000000" width="0"/>
</engine>
</tool>
- <tool id="5" type="note-inline">
+ <tool id="5" type="note-inline" name="Insert Inline Note">
<engine type="PickPoint" color="#ffff00" hoverIcon="tool-note-inline" block="true">
<annotation type="FreeText" color="#ffffff00" textColor="#ff000000"/>
</engine>
</tool>
- <tool id="6" type="note-linked">
+ <tool id="6" type="note-linked" name="Insert Popup Note">
<engine type="PickPoint" color="#ffff00" hoverIcon="tool-note">
<annotation type="Text" color="#ffffff00" icon="Note" />
</engine>
diff --git a/part/pageview.cpp b/part/pageview.cpp
index ac5d24e88..c8e9db7ca 100644
--- a/part/pageview.cpp
+++ b/part/pageview.cpp
@@ -683,28 +683,28 @@ void PageView::setupActions(KActionCollection *ac)
ac->setDefaultShortcuts(d->aZoomOut, KStandardShortcut::zoomOut());
// Mouse-Mode actions
- d->aMouseSelect = new QAction(QIcon::fromTheme(QStringLiteral("select-rectangular")), i18n("Area &Selection"), this);
+ d->aMouseSelect = new QAction(QIcon::fromTheme(QStringLiteral("select-rectangular")), i18nc("verb", "&Select Area"), this);
ac->addAction(QStringLiteral("mouse_select"), d->aMouseSelect);
connect(d->aMouseSelect, &QAction::triggered, this, &PageView::slotSetMouseSelect);
d->aMouseSelect->setCheckable(true);
ac->setDefaultShortcut(d->aMouseSelect, Qt::CTRL | Qt::Key_3);
d->aMouseSelect->setActionGroup(d->mouseModeActionGroup);
- d->aMouseTextSelect = new QAction(QIcon::fromTheme(QStringLiteral("edit-select-text")), i18n("&Text Selection"), this);
+ d->aMouseTextSelect = new QAction(QIcon::fromTheme(QStringLiteral("edit-select-text")), i18nc("verb", "Select &Text"), this);
ac->addAction(QStringLiteral("mouse_textselect"), d->aMouseTextSelect);
connect(d->aMouseTextSelect, &QAction::triggered, this, &PageView::slotSetMouseTextSelect);
d->aMouseTextSelect->setCheckable(true);
ac->setDefaultShortcut(d->aMouseTextSelect, Qt::CTRL | Qt::Key_4);
d->aMouseTextSelect->setActionGroup(d->mouseModeActionGroup);
- d->aMouseTableSelect = new QAction(QIcon::fromTheme(QStringLiteral("table")), i18n("T&able Selection"), this);
+ d->aMouseTableSelect = new QAction(QIcon::fromTheme(QStringLiteral("table")), i18nc("verb", "Select T&able"), this);
ac->addAction(QStringLiteral("mouse_tableselect"), d->aMouseTableSelect);
connect(d->aMouseTableSelect, &QAction::triggered, this, &PageView::slotSetMouseTableSelect);
d->aMouseTableSelect->setCheckable(true);
ac->setDefaultShortcut(d->aMouseTableSelect, Qt::CTRL | Qt::Key_5);
d->aMouseTableSelect->setActionGroup(d->mouseModeActionGroup);
- d->aMouseMagnifier = new QAction(QIcon::fromTheme(QStringLiteral("document-preview")), i18n("&Magnifier"), this);
+ d->aMouseMagnifier = new QAction(QIcon::fromTheme(QStringLiteral("document-preview")), i18nc("verb", "&Magnify"), this);
ac->addAction(QStringLiteral("mouse_magnifier"), d->aMouseMagnifier);
connect(d->aMouseMagnifier, &QAction::triggered, this, &PageView::slotSetMouseMagnifier);
d->aMouseMagnifier->setCheckable(true);
More information about the kde-doc-english
mailing list