<div dir="ltr"><div>Hi Markus.<br></div><div><br>On Sat, Oct 31, 2015 at 9:41 AM, Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>> wrote:<br>><br>> Hi,<br>><br>> I have realized that gui/wxpython/xml/wxgui_items.xml is not properly<br>> updated with the current module descriptions.<br><br></div>Do you mean description elements in wxgui_items.xml? Or do you mean other XMLs as well?<br><div><br>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.)<br><br></div><div>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?<br><br>Here is some documentation:<br><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_toolboxes.rst#L200">https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_toolboxes.rst#L200</a><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/xml/toolboxes.dtd">https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/xml/toolboxes.dtd</a><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/xml/wxgui_items.dtd">https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/xml/wxgui_items.dtd</a><br><br>> This is an issue since we get duplication of almost identical strings<br>> which then drive mad our translators.<br>><br>> It is really a job for<br>> gui/wxpython/tools/update_menudata.py<br>> but this scripts seems to be also outdated while looking to be the<br>> perfect solution.<br><br></div><div>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)."<br></div><div><br>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.<br><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_toolboxes.rst#L230">https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/docs/wxgui_sphinx/src/wxgui_toolboxes.rst#L230</a><br><a href="https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/README#L64">https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/README#L64</a><br><br></div><div>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 past.<br><br></div><div>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?<br></div><div><br></div><div>Vaclav<br></div><div><br>> Anyone willing to fix this:<br>><br>> GRASS 7.1.svn (nc_spm_08_grass7):~/software/grass71/gui/wxpython ><br>> python tools/update_menudata.py -d<br>> Step 1: running make...<br>> ...<br>> Step 2: parsing modules...<br>> ...<br>> Step 3: reading menu data...<br>> Step 4: updating menu data...<br>> Traceback (most recent call last):<br>>   File "tools/update_menudata.py", line 176, in <module><br>>     sys.exit(main())<br>>   File "tools/update_menudata.py", line 156, in main<br>>     updateData(data, modules)<br>>   File "tools/update_menudata.py", line 74, in updateData<br>>     for node in data.tree.getiterator():<br>> AttributeError: LayerManagerMenuData instance has no attribute 'tree'<br>><br>> thanks<br>> Markus<br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org">grass-dev@lists.osgeo.org</a><br>> <a href="http://lists.osgeo.org/mailman/listinfo/grass-dev">http://lists.osgeo.org/mailman/listinfo/grass-dev</a><br><br></div></div>