Wikipedia:Miscellany for deletion/Module:Br separated entries
Appearance
- Module:Br separated entries (edit | talk | history | links | watch | logs)
- Module:Separated entries (edit | talk | history | links | watch | logs)
Propose merging Module:Br separated entries with Module:Separated entries.
These two modules mostly do the same thing, with the exception that Module:Br separated entries can only use <br />
as a separator and Module:Separated entries trims spaces and newlines at the beginning and end of parameters. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 12:26, 12 May 2015 (UTC)
- Merge I wrote Module:Br separated entries to have the exact same behaviour as the old Template:Br separated entries, including the amount of whitespace added, but abstracted to any number of entries, rather than just three. However, there probably isn't any actual need to keep the same whitespace as the old template, so I would have no problem with this being merged. (In fact, I think it should ultimately be merged with {{unbulleted list}} for accessibility reasons, although that's a different discussion, and I think that there was a TfD discussion about that already if anyone can dredge up the link.) — Mr. Stradivarius ♪ talk ♪ 12:49, 12 May 2015 (UTC)
- Module:Separated entries shouldn't be merged with {{Unbulleted list}}; the two serve different purposes. Rather, where {{Br separated entries}} is used for the purpose of creating a list, it should be swapped with {{Unbulleted list}} - provided that {{Unbulleted list}} emits no output when all of its parameters are blank. Alakzi (talk) 13:01, 12 May 2015 (UTC)
- @Mr. Stradivarius: In some situations (such as if an entry begins with a list item; see Template:Col-float) it would be useful to keep whitespace. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:19, 12 May 2015 (UTC)
- Shouldn't we also merge Module:Comma separated entries with these two? Alakzi (talk) 13:01, 12 May 2015 (UTC)
- @Alakzi: I'm not really sure about that, since it uses the function
mw.message.new( 'comma-separator' ):plain()
and not just a plain character string like, 
. If you feel that it should be added to the nomination then do so. Jc86035 (talk • contribs) Use {{re|Jc86035}} to reply to me 13:19, 12 May 2015 (UTC)- Hmmm. Presumably, that was done to ease migration to Wikipedias of languages written in the Sino-Japanese and Arabic alphabets. I don't know enough about the localization library to imagine a solution. Mr. Stradivarius? Alakzi (talk) 13:51, 12 May 2015 (UTC)
- We don't really need to worry about other-language wikis too much - if they do copy our modules, they can always alter them locally to make them work with the correct punctuation. I don't remember exactly why I chose to use the MediaWiki message now, but it was probably just because it's nice to keep it in sync with the official MediaWiki:Comma-separator. (Not that I can imagine that ever changing.) Still, it's not too hard to merge the modules and still use the MediaWiki message. You can just do something with separate functions like this. By the way, it isn't necessary to use
 
instead of a normal space - these are used in template code because parser functions like #if trim whitespace, but this isn't a problem in Lua modules. — Mr. Stradivarius ♪ talk ♪ 12:05, 15 May 2015 (UTC)- The separator is a named parameter, so whitespace is stripped before it is passed on to the module. 12. Alakzi (talk) 12:17, 15 May 2015 (UTC)
{{#invoke:Separated entries|main|1|2|separator= }}
- Yep, so you should do it in the module itself if you can. If you use
{{#invoke:Separated entries|main|1|2|separator= }}
, then the space will get trimmed to an empty string before being passed to Lua, and then if you html-encode it inside Lua it would still be an empty string. So html-encoding wouldn't make any difference in that scenario. — Mr. Stradivarius ♪ talk ♪ 13:14, 15 May 2015 (UTC)
- Yep, so you should do it in the module itself if you can. If you use
- The separator is a named parameter, so whitespace is stripped before it is passed on to the module.
- We don't really need to worry about other-language wikis too much - if they do copy our modules, they can always alter them locally to make them work with the correct punctuation. I don't remember exactly why I chose to use the MediaWiki message now, but it was probably just because it's nice to keep it in sync with the official MediaWiki:Comma-separator. (Not that I can imagine that ever changing.) Still, it's not too hard to merge the modules and still use the MediaWiki message. You can just do something with separate functions like this. By the way, it isn't necessary to use
- Hmmm. Presumably, that was done to ease migration to Wikipedias of languages written in the Sino-Japanese and Arabic alphabets. I don't know enough about the localization library to imagine a solution. Mr. Stradivarius? Alakzi (talk) 13:51, 12 May 2015 (UTC)
- @Alakzi: I'm not really sure about that, since it uses the function