Module talk:Databox
Better commented
[edit]Could the code please be better commented?
- The French comment should probably be translated to English,
-- On fait un hack pour générer une valeur par défaut pour la latitude et la longitude
- In this comment "Utlity" -> "Utility" and "buil" -> build
--Utlity function to buil maps
- In p.databox you lost me in the code after
property_blacklist_hash['P31'] = true
--WiseWoman (talk) 18:51, 22 May 2018 (UTC)
- Hello, sorry for the late answer. About the code I have written the loop after
property_blacklist_hash['P31'] = true
is filtering the properties that should not be displayed and then display their values in a table. Tpt (talk) 13:19, 25 May 2018 (UTC)
Empty cell if all values of a property are deprecated
[edit]@Tpt: All P361 statements on the Q153 item are deprecated, which produces the infobox on the right. To remove the useless empty row, I made a simple change to the module sandbox. Please consider adding this fix to the main module. --LennardHofmann (talk) 19:43, 6 April 2022 (UTC)
- Thank you! I have applied the change. It's much better now. Thank you again! Tpt (talk) 12:03, 7 April 2022 (UTC)
Map broken
[edit]The maps generated with <mapframe>
currently seem to be broken. I think this is caused by a known issue with Kartotherian not accepting the auto-zoom parameter (https://phabricator.wikimedia.org/T305121). Lagewi (talk) 09:55, 19 June 2022 (UTC)
Map broken on KS Wiki
[edit]We have used this module to generate infoboxes on kswiki but the maps are broken which need to be fixed. Kindly fix them as soon as possible as it is used in many pages now. Thankyou. 511KeV (talk) 08:04, 29 June 2022 (UTC)
Coord translation
[edit]Hi @Tpt:,
Would it be possible to translate coordinates directions?
For instance on gd.wp (eg. gd:Turnberry) or br.wp (eg. br:Sagrada Família), it used the English "NSEW" where it should be respectively the Scottish Gaelic TDEI and the Breton NSKR (@Caoimhin: who pointed me to this problem). VIGNERON (talk) 14:57, 3 July 2022 (UTC)
- And the same problem on ga.wp (e.g. ga:An Spidéal), where it should be TDOI. Caoimhin (talk) 15:22, 3 July 2022 (UTC)
- Hi @VIGNERON:, @Caoimhin:. The Databox code relies on the Kartographer coordinates formatting code. The i18n message to edit on Translatewiki are
kartographer-coord-dms
,kartographer-coord-lat-positive
,kartographer-coord-lat-negative
,kartographer-coord-lon-positive
,kartographer-coord-lon-negative
,kartographer-coord-combined
. Tpt (talk) 13:34, 4 July 2022 (UTC)- Thanks @Tpt:, I think/hope I translated everything and correctly. How long before it appears in the Wikipedias? (a few days I guess?) Cheers, VIGNERON (talk) 11:18, 9 July 2022 (UTC)
- Great! It should be live sometime next week. Tpt (talk) 11:57, 9 July 2022 (UTC)
- Thanks @Tpt:, I think/hope I translated everything and correctly. How long before it appears in the Wikipedias? (a few days I guess?) Cheers, VIGNERON (talk) 11:18, 9 July 2022 (UTC)
Suggestion for more extensive version
[edit]A more extensive version of the Databox module is stored at the Swedish Wikipedia site, sv:Module:Databox, where it currently is utilized in 1778 articles. The documentation page is in Swedish, but the code is supposed to work on other wiki sites and in other languages. It is further developed, originally with the purpose to add features to Databox that also are provided by Template:Wikidata Infobox (which also is a generic infobox template, originally developed at commons, but is much more complicated since it depends on a huge amount of other modules and templates.). A lot of criticism was expressed at the Swedish Wikipedia during the years when the template was introduced, but many issues have been addressed by the revised code, and by do's and don'ts discussed in the documention. Some of the reasons that people prefer Databox over Wikidata Infobox at Swedish Wikipedia is that it does not show the words "Is instance of", that the layout is more similar to our other infobox templates, and that it allows the content to be adopted a little bit to the local language. Feel free to test it! Tomastvivlaren (talk) 10:28, 16 June 2023 (UTC)
- The extended version is also used at Danish Wikipedia (where you find a summary in Danish of the documentation) and at North Frisian Wikipedia. I don't know where to place the English translation of the documentation of the extended version.
- I really like the concept behind this module, and the idea that it does not depend on any other modules. A few years ago I made a couple of attempts to contact you user:Tpt and asked if I could extend the original version. I don't think I got any response, and now I do not find the discussion. I have uploaded the Lua code to Wikidata.org module:Databox/sandbox twice. See the initial version list in the Lua code for a list of added features.
- This version of the documentation page at Wikidata showed the result of the two module versions side-by-side, for a comparison, but was reverted. I am sorry if I did not verify sufficiently before doing that. Note that the extended version shows different content in different languages, for example based on property "short names" (short name (P1813)), and monolingual datatype text content and media that has caption or content in the current language of the user interface. The short names may have to be adjusted in your language, and media captions added. The code should work in every language, but may be fine-tuned to improve the hyphenation and with automatic categorization. Tomastvivlaren (talk) 14:20, 13 July 2023 (UTC)