Wikisource Auteur template

edit

{{author|c=:|look=en | firstname = Arthur | lastname = Rimbaud | last_initial = Ri | birthyear = 1854 | deathyear = 1891 | description = French poet, wild youth, influenced modern verse, poetry, art and music. | image = Carjat Arthur Rimbaud 1872 n2.jpg | wikipedia = Arthur Rimbaud | wikiquote = Arthur Rimbaud | commons = Arthur Rimbaud | commonscat = }} Script error: No such module "Author".

{{Auteur|c=:|look=fr | nom = Arthur Rimbaud | cle = Rimbaud, Arthur | description = poète français | naissance = 1854 | deces = 1891 | image = Carjat Arthur Rimbaud 1872 n2.jpg | droits = 70 | initiale = R }}

  Gallica   Europeana   Google
  • Test tests
This documentation/support must be removed before recording. Remove all modes to return to normal mode.
.

{{Wikidata imported }}

{{Arguments | birthyear = vers 1910
| c = :
| image = Carjat Arthur Rimbaud 1872 n2.jpg
| sortkey = Victor Hugo
| initiale = R
| notices = VIAF,BNF,SUDOC,LCCN,ISNI,Worldcat,6,NLA,PND,GKD,ARC
| title = Victor Hugo title
| birthLink = du
| lastname = Victor Hugo
| mode = tests
| deathyear = 1985
| description = poète français
}}

  • User support about parameters:
    Verify the automatic argument: sortkey = Victor Hugo.
    Internal Error: Module missing i18n translation CANTIC
    Internal Error: Module missing i18n translation entityid
    Error: parameter naissance is unknown in this template. Check the name or flag this gap.
    Error: parameter nom is unknown in this template. Check the name or flag this gap.
    Error: parameter langues is unknown in this template. Check the name or flag this gap.
    Error: the known argument languages is it the one you need ?
    Error: parameter droits is unknown in this template. Check the name or flag this gap.
    Error: parameter deces is unknown in this template. Check the name or flag this gap.
    Error: parameter cle is unknown in this template. Check the name or flag this gap.
    Error: parameter look is unknown in this template. Check the name or flag this gap.
    The documentation panel is forbidden in space User:. Return to normal mode by removing all modes.
  • Catégories : Module missing i18n translation Module with usage error Born in the XXth century Born in the XXth century Death in 1985 Uncertain year. Authors-R Module with usage error Module with error

Victor Hugo title

poète français ( vers 1910 - 1985 )
.

For other tests, look at Module:ControlArgs.


References and Examples

edit
  • www.lua.org Programming in Lua Reference programming manual.
  • lua-users.org Sample Code Metatables - Classes, Data Structures, Algorithms/Traversal, String/Table Manipulation, Preprocessing/Templates/Parsing, Mathematics/Numbers, Encoding/Cryptography/Compression...
  • lua-users.org Lua Unicode Unicode strings and Lua strings.

Adaptation to mediawiki

edit
Mediawiki calendar Lua scripting/status what is made / preview ?
[1] from Tim Starling : basical programming, tables, objects, adaptation to wikis, future options.
Scripting Background, Objectives.
Extension:Scribunto Installation and Lua environment.
Parser interface design Proposed coding interface summary, Principles, Index metamethod, Avoiding double-expansion, Invoking Lua.
Extension:WikiScripts Data typing, Control structures, Built-in functions, Table example...

Pending questions

edit
Do a module can contain more than one object ? This do an error.
Can we call a function in another module ?

successive list lines without li style

edit
A lua test seems detect a bug :
The function listLines, put 3 texts in lines begining with *. But only the first line begins OK, others begin with a tab without the list point. --Rical (talk) 17:54, 29 May 2012 (UTC)
« Scribunto not yet at a stage of development where I'm interested in debugging these kinds of test cases. » said Tim Starling by mail on May 15th. --Rical (talk) 12:11, 22 May 2012 (UTC)

How to call a function in an other lua module ?

edit

#invoke: seems too long

edit
https://bugzilla.wikimedia.org/show_bug.cgi?id=39610
{{#invoke seems too long for many modules, and is ambiguous about the language. Shorter keywords could help like {{#ll for Lua like, {{#js for javascript modules, {{#jg for javascript gadgets...
l: could distinct local modules, and :c: central or common modules, and :u: user modules.

Then a very short {{#ll:c:Foo}} select a central LUA module.

{{#jg:l:Foo}} select a local javascript gadget.

{{#bot:w:en:Foo}} select an English (en) Wikipedia (w) bot.

{{#ll:s:fr:u:Rical/Foo}} select a LUA module in fr.wikisource from a User:Rical subpage.

ustring.replace

edit

Can someone explain the behaviour of the ustring.replace function on this page UstringReplace using this Module Module:UstringReplace? -- UnicodeTest (talk) 16:44, 20 June 2012 (UTC)

It might be a bug in the ustring C module. You seem to be calling ustring.replace() the right way according to luasandbox_ustr_replace(), around line 860. – Minh Nguyễn (talk, contribs) 17:55, 20 June 2012 (UTC)
OK, ustring.pos() and ustring.sub() seem to be also buggy, for details see UnicodeTest. Further unicode testing makes no sense now. -- UnicodeTest (talk) 14:35, 21 June 2012 (UTC)
The other modules on this wiki have avoided ustring entirely in favor of pure Lua techniques. – Minh Nguyễn (talk, contribs) 09:13, 22 June 2012 (UTC)