Bug 101549 - Removal of tooltip_markup properties from glade ui files
Summary: Removal of tooltip_markup properties from glade ui files
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Muhammet Kara
URL:
Whiteboard: target:5.3.0
Keywords: easyHack, skillUI, topicCleanup, topicUI
Depends on:
Blocks:
 
Reported: 2016-08-16 07:04 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-02-14 08:57 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
formatted tooltip_markup screenshot (18.15 KB, image/png)
2016-09-28 19:45 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2016-08-16 07:04:17 UTC
So i noticed a number of glade .ui files that have tooltip_text and tooltip_markup both set and both set to be translated and think tooltip_markup should be removed to reduce translation burdens and because it has the exact same text as tooltip_text.

Here are some of the files that are affected

svx/uiconfig/ui/sidebarpossize.ui
svx/uiconfig/ui/sidebararea.ui
sw/uiconfig/swriter/ui/tocentriespage.ui
sw/uiconfig/swriter/ui/sidebarwrap.ui
fpicker/uiconfig/ui/remotefilesdialog.ui
sc/uiconfig/scalc/ui/headerfootercontent.ui

I'd suggest we have a simple script which would search through .ui files for tooltip_markup and remove those lines.
Comment 1 Katarina Behrens (Inactive) 2016-08-16 08:29:19 UTC
+1 for removing them, especially if they're identical 

An easy hack
Comment 2 jani 2016-08-17 06:22:52 UTC
The script should be committed to core/bin
Comment 3 Muhammet Kara 2016-09-28 13:28:20 UTC
So is it enough just to remove the lines containing "tooltip_markup" property from .ui files? Or should we also check if they have values identical to the corresponding tooltip_text?
Comment 4 Muhammet Kara 2016-09-28 13:30:07 UTC
These are the files I have processed with a bash script so far:

	modified:   chart2/uiconfig/ui/tp_3D_SceneIllumination.ui
	modified:   chart2/uiconfig/ui/tp_RangeChooser.ui
	modified:   cui/uiconfig/ui/lineendstabpage.ui
	modified:   cui/uiconfig/ui/linestyletabpage.ui
	modified:   cui/uiconfig/ui/numberingformatpage.ui
	modified:   cui/uiconfig/ui/rotationtabpage.ui
	modified:   cui/uiconfig/ui/textanimtabpage.ui
	modified:   fpicker/uiconfig/ui/explorerfiledialog.ui
	modified:   fpicker/uiconfig/ui/remotefilesdialog.ui
	modified:   sc/uiconfig/scalc/ui/datastreams.ui
	modified:   sc/uiconfig/scalc/ui/headerfootercontent.ui
	modified:   sc/uiconfig/scalc/ui/notebookbar.ui
	modified:   sc/uiconfig/scalc/ui/optcalculatepage.ui
	modified:   sc/uiconfig/scalc/ui/pastespecial.ui
	modified:   sc/uiconfig/scalc/ui/sidebaralignment.ui
	modified:   sc/uiconfig/scalc/ui/sidebarcellappearance.ui
	modified:   sc/uiconfig/scalc/ui/sidebarnumberformat.ui
	modified:   sc/uiconfig/scalc/ui/solverdlg.ui
	modified:   sc/uiconfig/scalc/ui/xmlsourcedialog.ui
	modified:   sd/uiconfig/simpress/ui/customanimationspanelhorizontal.ui
	modified:   sd/uiconfig/simpress/ui/customanimationtimingtab.ui
	modified:   sd/uiconfig/simpress/ui/photoalbum.ui
	modified:   sd/uiconfig/simpress/ui/slidetransitionspanel.ui
	modified:   sd/uiconfig/simpress/ui/slidetransitionspanelhorizontal.ui
	modified:   svx/uiconfig/ui/redlinefilterpage.ui
	modified:   svx/uiconfig/ui/sidebararea.ui
	modified:   svx/uiconfig/ui/sidebargraphic.ui
	modified:   svx/uiconfig/ui/sidebarline.ui
	modified:   svx/uiconfig/ui/sidebarpossize.ui
	modified:   sw/uiconfig/swriter/ui/addressblockdialog.ui
	modified:   sw/uiconfig/swriter/ui/cardmediumpage.ui
	modified:   sw/uiconfig/swriter/ui/envaddresspage.ui
	modified:   sw/uiconfig/swriter/ui/fldvarpage.ui
	modified:   sw/uiconfig/swriter/ui/tocentriespage.ui
Comment 5 Yousuf Philips (jay) (retired) 2016-09-28 19:45:38 UTC
Created attachment 127706 [details]
formatted tooltip_markup screenshot

So the code first pulls from tooltip_markup and then tooltip_text, so the checking should only check to confirm that a tooltip_text entry is available and then remove tooltip_markup, but if tooltip_text isnt available, it should rename tooltip_markup to tooltip_text.

tooltip_markup uses pango text markup, but we dont seem to support formatted tooltips when i tested it in the notebookbark.
https://developer.gnome.org/pango/stable/PangoMarkupFormat.html

Code reference:
http://opengrok.libreoffice.org/xref/core/vcl/source/window/builder.cxx#2743
Comment 6 Commit Notification 2016-09-28 21:00:36 UTC
Muhammet Kara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=652c97b8216c03676bbee08f749e2164e8808c8d

tdf#101549: Remove tooltip_markup from glade .ui files

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 jani 2016-09-29 06:21:53 UTC
Seems solved (as pr IRC)
Comment 8 Commit Notification 2016-09-29 06:48:54 UTC
Muhammet Kara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c9196b4996377eecba6c06cd916f0e2268c1933d

tdf#101549: Add script to remove tooltip_markups

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.