[OSM-dev] Any experts in Scribunto?
Andrew Hain
andrewhainosm at hotmail.co.uk
Mon Jun 6 11:09:32 UTC 2022
I have been attempting to fix the bug described at https://wiki.openstreetmap.org/wiki/Category_talk:Mismatched_image and have got stuck. The buggy code is at line 395 of https://wiki.openstreetmap.org/wiki/Module:DescriptionFromDataItem:
395 elseif entityVal == pageVal or
396 (argname ~= 'description' and
397 self.language:caseFold(entityVal) == self.language:caseFold(pageVal)) then
398 -- value is identical in both entity and the page
399 -- comparison is case-insensitive except for the description
The desired behaviour is that images (where argname is 'image' or 'osmcarto-rendering') should be matched by Mediawiki identity (File:Example 1.jpg is equivalent to Image:Example 1.jpg. file:Example 1.jpg, File:example 1.jpg and File:Example_1.jpg; it is not equivalent to FilE:Example 1.jpg, File:EXample 1.jpg or File:Example 1.jpeg).
Only pages where the image is genuinely mismatched should appear in https://wiki.openstreetmap.org/wiki/Category:Mismatched_image and https://wiki.openstreetmap.org/wiki/Category:Mismatched_osmcarto-rendering.
Pages should render correctly without Lua errors.
--
Andrew
Category:Mismatched osmcarto-rendering - OpenStreetMap Wiki<https://wiki.openstreetmap.org/wiki/Category:Mismatched_osmcarto-rendering>
Please note, this category does not work properly. In most cases the image is the same in both the article and the data item, but the template that adds this category does not take into account minor differences like
wiki.openstreetmap.org
Category:Mismatched image - OpenStreetMap Wiki<https://wiki.openstreetmap.org/wiki/Category:Mismatched_image>
Pages in category "Mismatched image" The following 200 pages are in this category, out of 8,660 total. (previous page) ()
wiki.openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20220606/f3999604/attachment.htm>
More information about the dev
mailing list