Hello Vriullop,
I have a question concerning the main function of the Wikidata module, why did you disallow calling the function claim from a content page?
Hello Vriullop,
I have a question concerning the main function of the Wikidata module, why did you disallow calling the function claim from a content page?
It is a bad practice to invoke a module from an article instead of using a template. In the first steps developing this module I found it difficult to change the syntax of the arguments when it is invoked directly. It is easy to modify a template but you need a bot to modify all the articles invoking the module. Anyway, once the module is stable this restriction is not required. Has it caused any problem?
Thanks for the explanation, I just asked the question out of curiosity.
Since your are the author of the module, could you please review my modifications on the kab wiki here. I mainly modified the function getParentValues:
Examples
It's the first time in my life coding with a scripting language (especially without an IDE), so please do not look at the shameful history of the page.
I'll look at your code later, maybe in a week, currently I'm too busy. In the meantime I ping Amadalvarez if he wants to look at use cases of new functions for getParentValues. At a first glance it makes sense to me, to manage parent values through ids instead of labels.
I also have another question: Is it possible to use SPARQL in a wiki module?
It'd be helpful to get child values (subspecies of species, dialects of a language...etc.). The wikidata property has part is most of the time empty.
By now it is not posible to make SPARQL queries with Scribunto. It is in the whishlist, for example phab:T185313, but I'm afraid it will be expensive.
Hi, Sami, good work. I've only made minor changes of syntax. I'll include your code in the copy at ca.wiki, but I prefer to avoid another dependency with Module:LuaLinq. When I have some time, I'll update your module with new versions on ca.wiki with some improvements for efficiency.
Thanks Vriullop,
I've removed the dependency to LuaLinq (it was not really necessary there, but I heavily use on another module).
I've also added a new parameter (case (grammatical)) to the getParentValues function.
Each modification has its own edit in the page history.
Great.
I have some questions about your language, I work also on Wiktionary. I found a Catalan-Amazigh dictionary. It is about Northern Amazigh as a macrolanguage, for example the entry pare (father) translates baba as a general form and ibba as Kabyle (QBYL). Can I trust this dictionary? Can I use baba for Tashelhit, Central Atlas Tamazight and Tarifit, and ibba for Kabyle? Is the Tifinagh script, or Neo-Tifinagh, used for these languages?
In Kabyle it's not ibba, it's baba.
I had a look at the website, the dictionary seems to be based on the Shilha language (+ they use tifinagh script and don't mark the schwa letter). There's another pan-amazigh dictionary but kabyle based, the entry for father is baba.
As for the entry ibba, it says that this word is found in central morocco (Kelaat-M'Gouna...etc.)
I think the first website copied data from the second without reading the Nota Bene and assumed it was Kabyle.
I chose this page at random but it confirms my suspicions that this dictionary should be taken with caution. Thanks.
Vriullop,
Sorry to bother you for another lua question (but you're the expert ^^), it's just 3 lines of codes, is this the right way to project a dictionary into an array/list of values in lua?
local values = {} for _, v in ipairs(dictionary) do table.insert(values, v) end
It looks ugly and verbose.
Sami.
Hi, I'm not an expert. I made my first program in the 80s and now in my retirement I'm just playing with Lua and I'm happy to help if I can.
It looks really ugly, but it is only needed when converting it to a string. Use callParserFunction instead without any convertion: return f:callParserFunction('#babel', f.args)
Hello Vriullop, I'm back to you after a year :/ I've seen that you've integrated the "cascade mode", I'm so honored! On mobile phone, it does not render well, I've fixed it with this edit . It uses ul li instead of " •" (But you can no longer use a separator, it's reset to string.Empty). Example: .