Bug 80387 - [EasyHack] extend lint-ui.py to check for UI title labels
Summary: [EasyHack] extend lint-ui.py to check for UI title labels
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
(earliest affected)
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
Whiteboard: target:5.1.0
Keywords: needsDevEval
Depends on:
Reported: 2014-06-23 10:48 UTC by Thomas Arnhold
Modified: 2016-10-25 19:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Python script to check title cases (3.88 KB, text/x-python-script)
2014-06-23 11:07 UTC, Jorendc

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arnhold 2014-06-23 10:48:47 UTC
We have lint-ui.py, which checks for several settings of ui files, so that they have consistent borders and so on. See:


The idea is to extend the script to ensure that all title words are uppercase. There was a commit, which corrected those: 171efcb7acf367e8db53694489815452d2a9894a

But for the future it would be nice if we could warn about those cases.

The titles are inside node: <child type="label">
Comment 1 Jorendc 2014-06-23 11:04:25 UTC
I did write a python script to check for titles. I'm currently working to check normal labels too (not only title labels).
I'll attach the script used to this bug report.

Afterwards I'll have a look at this lint-ui.py to implement it over there.

Kind regards,
Comment 2 Jorendc 2014-06-23 11:07:17 UTC
Created attachment 101573 [details]
Python script to check title cases

Still some manual work/review to do. It only splits words by space. Words surrounded by brackets or with other punctuation marks will need different approach.

Kind regards,
Comment 3 Thomas Arnhold 2014-06-23 12:55:01 UTC
Ah, great! So I'll assign you to this bug.
Comment 4 Rosemary Sebastian 2015-06-14 13:56:55 UTC
Hello! I'm starting work on this bug.
Comment 5 Commit Notification 2015-06-25 13:30:12 UTC
Rosemary committed a patch related to this issue.
It has been pushed to "master":


tdf#80387 Extended lint-ui.py to check for UI title labels

It will be available in 5.1.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:
Affected users are encouraged to test the fix and report feedback.
Comment 6 Caolán McNamara 2015-06-25 13:34:19 UTC
Here are the GNOME casing rules https://developer.gnome.org/hig-book/3.2/design-text-labels.html.en#layout-capitalization

I think rosemarys child[@type='label'] currently captures the "Group box or frame labels" category. And some of those categories we don't use. But we do have Button Labels, Menu Items, and Title bar labels which remain un-checked outside of that pattern I believe.
Comment 7 Robinson Tryon (qubit) 2015-12-14 06:14:12 UTC Comment hidden (obsolete)