Template talk:IRC

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

lang and text parameters[edit]

{{Editprotected}}

Please change the whole page to the following:

{{IRC/i18n/{{#ifexist:Template:IRC/i18n/{{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}} }}|{{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}} }}|en}}|1={{{1}}}|text={{{text|}}}|webchat={{{webchat|<noinclude>demo</noinclude>}}}}}<noinclude>
{{documentation}}
</noinclude>

It makes four changes:

  • Adds a new |lang= parameter that can be used to fix the language of the page (make it user interface language independent), which is useful on translated (Commons-and Help-namespace) pages and templates so that the language of the page/template is consistent. (For example, Commons and help pages may be read by logged-out users using English interface language, which is not their native language, but they have managed to navigate to the translation in their native language. The template should be in their native language as well.)
  • Adds the |text= parameter, which is already documented but doesn’t actually work yet.
  • Removes the categorization, which I added to the documentation subpage; this way eventual categorization changes can be implemented by anyone, not only admins (and also slightly reduces the template size, although it doesn’t really matter for a template used on roughly a thousand pages).
  • Makes some cosmetic changes that (IMO) improve the readability of the code (and again reduce the page size a bit).

Thanks in advance, —Tacsipacsi (talk) 16:53, 17 February 2020 (UTC)[reply]

✓ Done -Green Giant (talk) 08:19, 19 March 2020 (UTC)[reply]

Template is broken[edit]

{{Editprotected}}

This template is in use in {{Help desk header}}. The webchat link is currently broken, at least in English, because the webchat link prepends the hash character. If you give it e.g. "#wikimedia-commons", it will generate irc://irc.libera.chat/#wikimedia-commons (which is correct) but the webchat link is generated as https://web.libera.chat/?##wikimedia-commons - i.e. the channel ##wikimedia-commons, which is empty. Would someone who is a) able to edit this b) actually willing to look at MediaWiki template code, be willing to remove the extra "#" from the webchat link? Lewis Collard! (talk). 12:37, 18 June 2023 (UTC)[reply]

@Collard: The parameter should not contain the hash character. Compare:
{{IRC|#wikimedia-commons|webchat=1}} → ##wikimedia-commons webchat – irc:// link works, display text and webchat links contain extraneous hash characters.
{{IRC|wikimedia-commons|webchat=1}} → #wikimedia-commons webchat – irc:// link works, display text and webchat links are also fine.
Tacsipacsi (talk) 18:55, 19 June 2023 (UTC)[reply]
Oh, ok. Thanks for enlightening me; I assumed that the channel part of an irc:// link had to have a "#" in it. I've fixed the English usage over at the help desk but I am reluctant to dig into the other languages. That'll do for now! Lewis Collard! (talk). 20:55, 19 June 2023 (UTC)[reply]