summaryrefslogtreecommitdiff
path: root/bin/lint-ui.py
AgeCommit message (Collapse)Author
2021-01-06remove support for deprecated GtkAlignmentCaolán McNamara
Change-Id: I29e21e9e4d9b80b8c8e331ed9cce76b2e7fe0f68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108689 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-22state GtkAlignment is deprecated in lint-uiCaolán McNamara
Change-Id: I138d21ed6fdf4c07e77c3f096cdd7ac94c61c292 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108198 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-22fix lint-ui syntax errorCaolán McNamara
Change-Id: I8c94c28363a358e4e1dfe34b827a084c4c0e7a90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108197 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-07lint-ui: add exclusionNoel
Change-Id: Idae99392593c87c7d3b36e426c8d1363434786be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104059 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-07lint-ui: remove checks for top-level widgetsNoel
lots of .ui files are loaded, and then widgets extracted by name by the code, so this check does not make sense. Change-Id: Ia8292c5808587d98f0015280ad17b00402c8b96d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-07lint-ui: add exclusions for remaining capitalisation warningsNoel
Change-Id: I572f914fa9a51f992110585ab032fb500f998bc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104055 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-07ui files: fix some capitalisation issuesNoel
Change-Id: Id2efb6e5f1c115cb31a6afd3f988fe156c5ad56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-07Revert "lint-ui: check that we only have one has_default==True"Noel Grandin
This reverts commit c9e3952e76a9c06d5a1d2f583829ce9eb5b9df64. Reason for revert: Some of the code manipulates visibility programmatically, and it is quite fine to has more than one has_default if only one of them is visible at a time. Change-Id: Ia4f565c7d21d232d3038c3489952782c8e2a7be5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103977 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05lint-ui: check that we only have one has_default==TrueNoel
Change-Id: Ic61e14c3b98a85a5f05b448db9805ac296c041ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05lint-ui: disable some checksNoel
which no-one seems to care about at the moment, since there are so many failures. Change-Id: Id5c589dc328b553a9052cdd94a4c8d3d009a0f3e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05lint-ui: validate has_default and can_defaultNoel
check that if a widget has has_default=='True', then it also has can_default=='True' Change-Id: Ie51d9d8fff6d7cc0cc42a09331f59e7ef6d559be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103834 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2020-10-05lint-ui: fix GtkAdjustment checkNoel
Change-Id: Ie369cd67f2ac3947c2f4817fb76656216c6df2fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02lint-ui: add check for upper in GtkAdjustmentNoel
Change-Id: I3a9859dbb4dbb0aeb2446176a239843a19d40e1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103833 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02lint-ui: add some more valid top-level widgetsNoel
Change-Id: Ifedeb65c13b5889941da5dbd7fa215f5e380e64e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103819 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02lint-ui: put line numbers in error messagesNoel
Change-Id: I00c864684fefd1e4afb8370b6255cbe623b63523 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103821 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02lint-ui.py check that GtkMenuButton has a label propertyNoel
Change-Id: Ib1aa8ee050d2425387ddc1080f11f0ddfc2f9236 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103770 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-01improvements to lint-ui scriptNoel
(*) update to python3 (*) add to list of ignored widgets (*) add to list of valid top-level widgets (*) remove border_width check, fires a **lot** (*) improve some checks so they don't generate python exceptions (*) make some checks more informative Change-Id: Ie0b1492eaf752aae8be1ab670bf731015eb454d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103767 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-14look for check buttons without underlinesCaolán McNamara
Change-Id: Ia9963190cf3dccbfa82951a3f2c0e29e00171429 Reviewed-on: https://gerrit.libreoffice.org/52847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-14look for radio buttons without underlinesCaolán McNamara
Change-Id: I0ed97515a03a5633628a492ec7797fc3ade8a3d8 Reviewed-on: https://gerrit.libreoffice.org/52846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21lint-ui: Error when label contains a colonSamuel Mehrbrodt
Change-Id: I6c71db450fdd41c83e4b4b3e6dff9719a42ef2d8 Reviewed-on: https://gerrit.libreoffice.org/42520 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2015-06-25tdf#80387 Extended lint-ui.py to check for UI title labelsRosemary
Change-Id: I47ab882b0d54711050da4fc8fa288b195949eb60 Reviewed-on: https://gerrit.libreoffice.org/16425 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-08-12drop explicit python3 from shebang lineCaolán McNamara
Change-Id: I3b7ca808b8e2ac4723c1f26e6190c4875e88936e
2013-08-08update lint-ui to know about message box HIG rulesCaolán McNamara
Change-Id: Ic283d4d15154308a441905d095096c3e11f50477
2013-03-15first crack at writing a linter for .ui filesJack Leigh
Change-Id: I51fd2b426e3292647ca618bf867d22275d7ed4fd Reviewed-on: https://gerrit.libreoffice.org/2762 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>