-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XML notation if missing from tooltips in vector file writer dialog #46508
Comments
@BathoryPeter a fix is to replace < with |
@DelazJ Fixing this one occurrence seems simple but in my opinion it would be better to find for all the problematic tooltips in QGIS. At first we should make a list of potential strings (containing < > marks), filter the list by hand or semi-automatic then fix the occurrences in the code. |
@BathoryPeter I was suggesting to do it for all 😃. But sorry, no real trick to suggest for (semi-)automation. Or maybe, with a regex within |
@DelazJ I can try to do it. Is |
So here is the ugly but (hopefully) working solution:
The first Resultssrc/gui/providers/ogr/qgsogrsourceselect.cpp:730:tr( "<Default>" )
src/gui/providers/ogr/qgsogrsourceselect.cpp:742:tr( "<Default>" )
src/gui/providers/gdal/qgsgdalsourceselect.cpp:317:tr( "<Default>" )
src/gui/providers/gdal/qgsgdalsourceselect.cpp:329:tr( "<Default>" )
src/gui/ogr/qgsvectorlayersaveasdialog.cpp:258:tr( "<Default>" )
src/gui/symbology/qgsrulebasedrendererwidget.cpp:986:tr( "<li><nobr>%1 features also in rule %2</nobr></li>" )
src/gui/locator/qgslocatorwidget.cpp:320:tr( "<type here>" )
src/gui/vector/qgsfieldcalculator.cpp:530:tr( "<geometry>" )
src/analysis/processing/qgsalgorithmmeancoordinates.cpp:62:tr( "This algorithm computes a point layer with the center of mass of geometries in an input layer.\n\n An attribute can be specified as containing weights to be applied to each feature when computing the center of mass.\n\n If an attribute is selected in the <Unique ID field> parameter, features will be grouped according to values in this field. Instead of a single point with the center of mass of the whole layer, the output layer will contain a center of mass for the features in each category." )
src/core/vectortile/qgsvectortilelayer.cpp:273:tr( "Missing <renderer> tag" )
src/core/qgsunittypes.cpp:228:tr( "<unknown>", "distance" )
src/core/qgsunittypes.cpp:722:tr( "<unknown>", "area" )
src/core/qgsunittypes.cpp:1351:tr( "<unknown>", "temporal" )
src/core/qgsunittypes.cpp:1383:tr( "<unknown>", "temporal" )
src/core/qgsunittypes.cpp:1802:tr( "<unknown>", "volume" )
src/core/qgsunittypes.cpp:1832:tr( "<unknown>", "volume" )
src/core/qgsunittypes.cpp:2320:tr( "<unknown>", "angle" )
src/core/qgsunittypes.cpp:2995:tr( "<unknown>", "render" )
src/core/raster/qgsrasterlayer.cpp:2210:tr( "<maplayer> not found." )
src/core/qgsmaplayer.cpp:1218:tr( "Root <qgis> element could not be found" )
src/core/qgsmaplayer.cpp:1230:tr( "Root <qgis> element could not be found" )
src/core/symbology/qgssymbollayer.cpp:93:tr( "[<b><dash>;<space></b>] e.g. '8;2;1;2'" )
src/core/layout/qgslayoutframe.cpp:154:tr( "<Frame>" )
src/core/layout/qgslayoutmultiframe.cpp:275:tr( "<Multiframe>" )
src/core/layout/qgslayoutitempolygon.cpp:102:tr( "<Polygon>" )
src/core/layout/qgslayoutitemshape.cpp:88:tr( "<Ellipse>" )
src/core/layout/qgslayoutitemshape.cpp:90:tr( "<Rectangle>" )
src/core/layout/qgslayoutitemshape.cpp:92:tr( "<Triangle>" )
src/core/layout/qgslayoutitemshape.cpp:95:tr( "<Shape>" )
src/core/layout/qgslayoutitempolyline.cpp:277:tr( "<Polyline>" )
src/core/layout/qgslayoutitemtexttable.cpp:36:tr( "<Text table frame>" )
src/core/layout/qgslayoutitemattributetable.cpp:70:tr( "<Attribute table frame>" )
src/core/layout/qgslayoutitemgroup.cpp:61:tr( "<Group>" )
src/core/layout/qgslayoutitem.cpp:118:tr( "<%1>" )
src/core/layout/qgslayoutitem.cpp:121:tr( "<item>" )
src/core/fieldformatter/qgsrelationreferencefieldformatter.cpp:43:tr( "<unknown>" )
src/core/fieldformatter/qgsrelationreferencefieldformatter.cpp:111:tr( "<unknown>" )
src/core/qgsvectorfilewriter.cpp:1268:tr( "If defined to YES, extension fields will be written. If the field name not found in the base schema matches the foo_bar pattern, foo will be considered as the namespace of the element, and a <foo:bar> element will be written. Otherwise, elements will be written in the <ogr:> namespace." )
src/core/qgsvectorfilewriter.cpp:1277:tr( "If defined to NO, only <entry> or <item> elements will be written. The user will have to provide the appropriate header and footer of the document." )
src/core/qgsvectorfilewriter.cpp:1283:tr( "XML content that will be put between the <channel> element and the first <item> element for a RSS document, or between the xml tag and the first <entry> element for an Atom document." )
src/core/qgsvectorfilewriter.cpp:1296:tr( "Value put inside the <description> element in the header. If not provided, a dummy value will be used as that element is compulsory." )
src/core/qgsvectorfilewriter.cpp:1308:tr( "Value put inside the <updated> element in the header. Should be formatted as a XML datetime. If not provided, a dummy value will be used as that element is compulsory." )
src/core/qgsvectorfilewriter.cpp:1315:tr( "Value put inside the <author><name> element in the header. If not provided, a dummy value will be used as that element is compulsory." )
src/core/qgsvectorfilewriter.cpp:1321:tr( "Value put inside the <id> element in the header. If not provided, a dummy value will be used as that element is compulsory." )
src/core/qgsvectorfilewriter.cpp:1506:tr( "If GPX_USE_EXTENSIONS=YES is specified, extra fields will be written inside the <extensions> tag." )
src/core/qgsvectorfilewriter.cpp:1583:tr( "Allows you to specify the field to use for the KML <name> element." )
src/core/qgsvectorfilewriter.cpp:1588:tr( "Allows you to specify the field to use for the KML <description> element." )
src/core/qgsvectorfilewriter.cpp:1603:tr( "The DOCUMENT_ID datasource creation option can be used to specified the id of the root <Document> node. The default value is root_doc." )
src/app/3d/qgs3danimationwidget.cpp:44:tr( "<none>" )
src/app/3d/qgs3danimationwidget.cpp:81:tr( "<none>" )
src/app/qgisapp.cpp:5326:tr( "< Blank >" )
src/app/qgisapp.cpp:6614:tr( "< Blank >" )
src/plugins/grass/qgsgrassutils.cpp:156:tr( "<font color='red'>Enter a name!</font>" )
src/plugins/grass/qgsgrassutils.cpp:167:tr( "<font color='red'>This is name of the source!</font>" )
src/plugins/grass/qgsgrassutils.cpp:173:tr( "<font color='red'>Exists!</font>" )
src/plugins/grass/qtermwidget/TerminalDisplay.cpp:3055:tr( "<qt>Output has been <a href=\"http://en.wikipedia.org/wiki/Flow_control\">suspended</a> by pressing Ctrl+S. Press <b>Ctrl+Q</b> to resume.</qt>" ) ConclusionThe list above contains potentially problematic strings. Actually they are only a problem if used in an HTML widget. We cannot simply escape all the occurrences because it would have bad side effect in non-HTML parsed places. |
What is the bug or the crash?
There are numerous tooltip message in vector file writer containing xml
<element>
tags. Those tags are missing from the appearing tooltip. See example below.Steps to reproduce the issue
A tooltip appears, where xml elements like
<foo:bar>
and<ogr:>
are missing from the text.You can see the difference between screenshot and the actual code
QGIS/src/core/qgsvectorfilewriter.cpp
Lines 1267 to 1274 in b114417
Versions
<style type="text/css"> p, li { white-space: pre-wrap; } </style>Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: