Module talk:Wd: Difference between revisions

Content deleted Content added
Line 118:
::Thanks a lot, @[[User:Ahecht|Ahecht]]. In the meantime, a Spanish contributor, @[[User:Leoncastro|Leoncastro]], helped out [https://en.wikipedia.org/w/index.php?title=Module:European_and_national_party_data/Wd&action=history here] and [https://en.wikipedia.org/w/index.php?title=Module:European_and_national_party_data/Wd/i18n&action=history here], in case you want to have a look! [[User:Julius Schwarz|Julius Schwarz]] ([[User talk:Julius Schwarz|talk]]) 14:37, 9 June 2025 (UTC)
:::PS: @[[User:Ahecht|Ahecht]], would you know how to hard-code a plural for the currency, by any chance? [[User:Julius Schwarz|Julius Schwarz]] ([[User talk:Julius Schwarz|talk]]) 18:34, 9 June 2025 (UTC)
::::@[[User:Julius Schwarz|Julius Schwarz]] If you modify your module to do two calls to [[Module:Wd]], one with the <code>raw</code> flag and one with the <code>data</code> flag, you can then do something like <source lang=lua inline>if amount > 1 then unit = unit .. 's' end</source> (and you would then have an override for languages such as Swedish where the plural of 'krone' is 'kroner'). I suppose you could also I did update [[Module:European and national party data/sandbox]] so that you can request the unit from <code>allpp_get_data()</code> or <code>xlate_wikidata()</code>. <span class="nowrap">--[[User:Ahecht|Ahecht]] ([[User talk:Ahecht|<b style="color:#FFF;background:#04A;display:inline-block;padding:1px;vertical-align:middle;font:bold 50%/1 sans-serif;text-align:center">TALK<br />PAGE</b>]])</span> 20:53, 9 June 2025 (UTC)