On Sat, Oct 31, 2015 at 3:39 PM, Vaclav Petras <[email protected]> wrote: > On Sat, Oct 31, 2015 at 9:41 AM, Markus Neteler <[email protected]> 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?
For now I mean wxgui_items.xml. Since I am not familiar with the mechanism I didn't check the rest. > 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.) Yeah, it is a bit confusing. > 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? For an example, see https://trac.osgeo.org/grass/changeset/66687 This subtle "tuning" of strings is not a good idea. grep "label\|description" wxgui_items.xml | wc -l 116 of almost identical strings. Almost means not identical which means that all of them have to be translated again. Rather a PITA for the translators. > Here is some documentation: > > 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/xml/toolboxes.dtd > https://trac.osgeo.org/grass/browser/grass/trunk/gui/wxpython/xml/wxgui_items.dtd I started to read the README but it is rather short :-) >> 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. OK, it would be good to clean that up. > 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/README#L64 > > The main point is that all updates now happen automatically, Indeed not completely since xml/wxgui_items.xml appears to be manually written (or outdated and based on older description lines?) > so there is no > need for manual patching of menudata.xml or any other file as it was in the > past. ... yes, which is good. > 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, It does. > but since I don't understand the translation process, In which sense? You take a po file and translate... a very lengthy job. And almost identical strings have to be translated several times which does not encourage anyone. It would be great to have a script which autoextracts the strings for gui/wxpython/xml/wxgui_items.xml as "dry" run (similar to how the old tools/update_menudata.py worked) in order to decide on a case by case base when to abbreviate or when not. Again, r66687 is an example where I reinstated the actual wording, a perfect computer job. Hope you see now what I mean, Markus _______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
