[GRASS-dev] wxgui_items.xml: outdated

Vaclav Petras wenzeslaus at gmail.com
Sat Oct 31 07:39:03 PDT 2015

Hi Markus.

On Sat, Oct 31, 2015 at 9:41 AM, Markus Neteler <neteler at osgeo.org> wrote:
> Hi,
> I have realized that gui/wxpython/xml/wxgui_items.xml is not properly
> updated with the current module descriptions.

Do you mean description elements in wxgui_items.xml? Or do you mean other
XMLs as well?

In general, the label element in both wxgui_items.xml and toolboxes.xml is
a menu-specific string which is supposed to be very short (1-3 words) and
mostly in a form of command, possibly ending with three dots. There is
nothing like this in modules, although it would be a good idea to have it
there. (Note that label and description elements in the menus are something
else than label and description in modules; this should be fixed as well.)

The description element in toolboxes.xml is taken from label and
description. In wxgui_items.xml, content element and description element is
unique to this file, although there might be some overlaps. Is this what
you mean? Do you have some examples?

Here is some documentation:


> This is an issue since we get duplication of almost identical strings
> which then drive mad our translators.
> It is really a job for
> gui/wxpython/tools/update_menudata.py
> but this scripts seems to be also outdated while looking to be the
> perfect solution.

I looks like there is no use for this script now. What I know is in the doc
which says that "Historically, menudata.xml file was in the source codes
and was partially maintained by the script
``gui/wxpython/tools/update_menudata.py`` which updated the description and
keywords (based on module's label or description, and keywords)."

I'm not sure if I was ever able to run the original workflow successfully
(before introducing the toolboxes) which is partially the reason why the
README still mentions update_metadata.py.


The main point is that all updates now happen automatically, so there is no
need for manual patching of menudata.xml or any other file as it was in the

The issue which the new system inherited from the old one is that the
description element in GUI XMLs is a combination of label and description
from a module's interface description as the documentation linked above
says. I always wondered why this doesn't bother translators, but since I
don't understand the translation process, I choose to preserve the current
system which was there for quite some time already (perhaps from the
beginning of wxGUI). Is this what you are referring to? Example would be
helpful here as well. If this is the issue, what would be the preferred
solution considering that the strings are used in GUI for description in
Layer Manager status bar but also for search in Search modules tab?


> Anyone willing to fix this:
> GRASS 7.1.svn (nc_spm_08_grass7):~/software/grass71/gui/wxpython >
> python tools/update_menudata.py -d
> Step 1: running make...
> ...
> Step 2: parsing modules...
> ...
> Step 3: reading menu data...
> Step 4: updating menu data...
> Traceback (most recent call last):
>   File "tools/update_menudata.py", line 176, in <module>
>     sys.exit(main())
>   File "tools/update_menudata.py", line 156, in main
>     updateData(data, modules)
>   File "tools/update_menudata.py", line 74, in updateData
>     for node in data.tree.getiterator():
> AttributeError: LayerManagerMenuData instance has no attribute 'tree'
> thanks
> Markus
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151031/a1d5df50/attachment-0001.html>

More information about the grass-dev mailing list