Template talk:Extension

About this board

Archives 

/Archive 1


New mw.1.xx-status parameters

13
Samwilson (talkcontribs)

@Proactive programming: thanks for your recent changes.

Although I like the idea of extensions being able to declare what versions of MW they work with, I'm not sure this info needs to be given over three rows in the infobox. One row, with a comma-separated list of MW versions supported, would suffice I think.

I also wonder if this could be a single new parameter, parsed as required in Module:Extension (or wherever) to e.g. add categories etc.

Tacsipacsi (talkcontribs)

I like this three-row design. When a new MW version comes out, simply a new row needs to be added, and one can see in a glance that the extension doesn’t officially support it (yet). Was it one row, it would be less clear that even though an extension supports a bunch of MW versions, they’re all years old. Also, it’s easy to drop MW versions no longer supported by Wikimedia (i.e. versions that themselves get no security updates anymore), so no longer relevant information doesn’t clutter the infobox.

That being said, I’m not against using one parameter for all versions in code, given that it’s still displayed in three rows as now (neither am I definitely for it, though); and I think categorization is a good idea. Some documentation would also be useful, especially specifying the valid values, which would be needed to implement categorization (as well as to make this part of the template translatable).

Samwilson (talkcontribs)

I think what I don't like about the three rows is just the repetition of 'MediaWiki'. Maybe it could be a single row for the label (e.g. 'MediaWiki compatibility') and three rows for the current supported versions. I think it should also come after the 'Compatibility policy' row, because it's pretty similar — or maybe before that one, as this new info is actually of more use to people looking to install an extension.

But yeah, however it looks, it's good to have this. Documentation is a must. I think it could also use the MediaWiki version information templates, and perhaps have 'stable', 'LTS', etc. shown next to each.

Samwilson (talkcontribs)

Oh I forgot: I think it'd also be worth investigating whether it wouldn't be better to add supported-versions information to extension.json, because then it's tied to the code and is more easily queryable from everywhere (and can be included in the template via Module:ExtensionJson.

Tacsipacsi (talkcontribs)

Unfortunately extension.json can’t be used here. Module:ExtensionJson contains the extension.json files only from the default Git branch (usually named master), while the extension may support other MW versions, for example on branches matching the supported versions’ branches. This information is not available in the module, and I don’t think it’s even possible to determine programmatically which branches are actually maintained.

For using a separate row for “MediaWiki”: I don’t mind it either way. By the way, there’s a row titled “MediaWiki” already, so we could even do something like this:

Extension
Release status: unknown
MediaWiki 1.25
1.36 Not formally tested
1.34 Not formally tested
1.33 Not formally tested
Kghbln (talkcontribs)

Yeah, who is supposed to fill the information? I have the feeling that this is the wrong solution for the right problem. I also think that the information should be fetched from code and not manually be added here. PS Currently it shows 1.36, 1.34 and 1.32 where it should be 1.36, 1.35 and 1.31. We also had the case in the past that only two branches were supported at a time.

Samwilson (talkcontribs)

The existing requires values in extension.json are allowed to accept a version range (like Composer does), so something like "MediaWiki": ">=1.32 <=1.35" is permitted (but doesn't seem to be used anywhere).

Kghbln (talkcontribs)

In other words. The information will be fetched from extension.json instead of requiring editing on this wiki which is good. I think these lines should not be shown if no extension.json is around. They will not be filled anyways or in rare cases at best.

Ciencia Al Poder (talkcontribs)

Note that extension.json may only support the latest stable branch because of compatibility issues with MediaWiki interfaces, but the extension may work and be tested with older versions if you choose to download the corresponding branch of an older MediaWiki release.

AFAIK, Module:ExtensionJson only reads extension.json from the master branch (which may list a still unreleased MediaWiki version as the minimum supported version, like it usually happens with VisualEditor)

Kghbln (talkcontribs)

Good point. Thus the module needs to read the info from the respective branch.

Samwilson (talkcontribs)

Module:ExtensionJson could be modified to include each branch's compatibility information. It'd take slightly longer to generate, but I don't think it'd be an overly difficult thing. It'd also only apply when compatibility policy is rel or ltsrel.

Samwilson (talkcontribs)

I think we should remove these new parameters until it's clearer where the data for them is coming from. We don't want extension maintainers to start adding the info, only to later be told it's going to come from extension.json.

@Proactive programming: you added these, what do you think?

Samwilson (talkcontribs)
Reply to "New mw.1.xx-status parameters"

extension.json requires.MediaWiki value

3
Samwilson (talkcontribs)
Kghbln (talkcontribs)

Cool. Appears to work fine. Just tested on the page of the VisualEditor extension.

Samwilson (talkcontribs)
Reply to "extension.json requires.MediaWiki value"

translate "MediaWiki x.xx Not formally tested"

4
Wladek92 (talkcontribs)

Hi all, Can someone make translatable the status of MediaWiki in this template, to fit with the current language of the translated page ?

Example : on page Extension:CentralAuth/fr MediaWiki 1.36 Not formally tested should appear translated as MediaWiki 1.36 non testé formellement

Christian 🇫🇷 FR (talk) 16:11, 28 June 2021 (UTC)

Tacsipacsi (talkcontribs)

See discussion about these parameters below.

Wladek92 (talkcontribs)

Already done before, but this topic is not related to the contents of the message but to the way to declare it translatable in the template (...difficult for me).

Christian 🇫🇷 FR (talk) 07:52, 29 June 2021 (UTC)

Tacsipacsi (talkcontribs)

But the approach taken there affects translation; only stable things should be made translatable. Furthermore, as I explained there, currently it’s not even possible to properly internationalize the parameter values. Making it half-translatable for the time being would mean that

  • translators need to come here twice, wasting their time, and
  • it may happen that the current text isn’t kept at all, wasting translators’ time even more.
Reply to "translate "MediaWiki x.xx Not formally tested""

Add Categories for other compat policies

1
Reedy (talkcontribs)

Allow translating "Expand"/"Collapse"

2
Akeosnhaoe (talkcontribs)

How do I translate the "Expand"/"Collapse" button text?

Akeosnhaoe (talkcontribs)

Nevermind, I see that it depends on the interface language.

Krinkle (talkcontribs)

This revision of last week doubled the width on most pages from 200-300px to 513px. On pages such as Excimer this looks rather odd.

@Shirayuki Could you explain what this is for or which problem it addressed? Perhaps we can find another way that addresses both uses. Thanks.

Shirayuki (talkcontribs)
Reply to "Width change"

Can we get an "unavailable" or "unreleased" or "forthcoming" status

3
Summary by Florianschmidtwelzow

Extensions, which code is not yet available, should not be listed on MediaWiki.org.

2601:5CD:C200:9BE0:DC21:FD9B:A847:36B3 (talkcontribs)

For extensions where we don't have the code yet?

Pppery (talkcontribs)

These shouldn't be posted to MediaWiki.org until the code is available.

Kghbln (talkcontribs)

I agree with Pppery.

Add short disclaimer about version

1
André Costa (WMSE) (talkcontribs)

Since the data is now taken from extension.json which reflects the master branch the data will almost always be ahead of whatever version is declared in "latest version". A short tooltip on values taken from extension.json or a general disclaimer in the bottom of the template would be useful to avoid any confusion

Reply to "Add short disclaimer about version"
Rehman (talkcontribs)

Would be nice if we have a parameter like "Used on Wikimedia projects", which lists the Wikimedia projects that use the extension (i.e. enwiki, itwiki, etc). Yes it is slightly unrelated, but it gives a good indication of matured/vetted extensions.

Ciencia Al Poder (talkcontribs)

Being used on Wikimedia is an indicator already of the matureness of the extension.

Rehman (talkcontribs)

Yes. Hence the reason why such a parameter could be useful.

Majavah (talkcontribs)
Rehman (talkcontribs)

Thanks. Tbh, I forgot about that template. Maybe we could merge that into a parameter of this infobox for neatness? Just a suggestion.

Ciencia Al Poder (talkcontribs)
Reply to "Used on Wikimedia projects"

Getting mediawiki from extension.json

10
André Costa (WMSE) (talkcontribs)

I tried to get the template to get the |mediawiki= parameter from extension.json. Since I didn't want to try it live I implemented it in Module:Extension/sandbox then tried to preview it here by replacing {{{mediawiki|}}} with {{#invoke:extension/sandbox|getMediawiki|{{{mediawiki|}}}}}. But it looks like the sandbox isn't loaded so not sure how to test this before going live.

Tacsipacsi (talkcontribs)

If you replace

</noinclude><includeonly>{{#switch:<translate></translate>

in the third line with

</noinclude><includeonly>{{#switch:

the result looks awful, but at least it depends on what in Template:Extension is rather than what in Template:Extension/en is. (Don’t forget to revert this change before saving!) However, I’m not sure if reading the MediaWiki requirement from extension.json would be appropriate—extension.json in master lists what master is compatible with, while (IMO) the infobox should list what MediaWiki version any of its versions is compatible with.

André Costa (WMSE) (talkcontribs)

Thanks! Tested and {{{mediawiki|{{#invoke:extension|getMediawiki}}} should do the trick once the issue below is resolved.

With regard to the infobox reflecting master. By already now fetching most of the parameters from the extension.json the template already only reflects master (unless manually overridden). I.e. if a user right is dropped/added between the latest release and master then the infobox will update to reflect that. I'd say it's only natural that the mediawiki parameter follows the same default.

Tacsipacsi (talkcontribs)

Naturally an infobox can’t list all versions of configuration variables, hooks, user rights etc., as that would occupy a lot of space. However, listing an earlier MediaWiki version doesn’t, so it’s feasible, and I think it’s worth it, as a potential user is more interested in whether any version of the extension is compatible with their MediaWiki than in whether master is compatible. (By the way, listing user rights is useful, but I’m not sure whether listing used hooks and variables—without any explanation—makes any sense in the infobox. What’s the practical use of these kinds of information?)

Pppery (talkcontribs)

Hah, I'm not the only one who was very annoyed by the difficulty of testing changes to translatable templates: You can work around the problem by replacing #invoke:Template translation with #invoke:Template translation/sandbox, which uses the code I wrote in Module:Template translation/sandbox. I should probably request that that code be merged to Module:Template translation, but never get around to it. Also, I agree with Tacsipacsi that this may not be an appropriate thing to automate (as I wrote on phab:T222479,

The "MediaWiki" key can't be supported because most WMF maintained extensions use backward-compatibility branches, and the module only contains data from the master branch.

)

Tacsipacsi (talkcontribs)

Wow, thanks! I tested Template:Hubs/sandbox just a few days ago, and was very satisfied that I haven’t broken anything—until I realized that the test cases in the documentation actually used the non-sandbox version… Now I added {{\sandbox}} to it. I’m glad we can always come up with new hacks to support Translate (like this one or {{#switch:<translate></translate> or c:Module:Caller title)—although I’m not particularly happy that we need to do so…

André Costa (WMSE) (talkcontribs)

Personally I don't see it as any different from overriding any other parameter. I.e. if the infobox today has a manually entered value then keep that, if not then get it from extension (because some info on version limitations is better than none).

I think the Hook listings are mainly used for categorising the extension page.

On a separate note there should probably be a small remark next to the version field that the info in the infobox need not reflect that version any more.

Tacsipacsi (talkcontribs)

I.e. if the infobox today has a manually entered value then keep that, if not then get it from extension (because some info on version limitations is better than none).

That’s fair, but we need to make sure that people won’t throw out existing parameters like what happens now with other extension.json-backed ones, as well as suggest filling out the version parameter in new/revised infoboxes (as opposed to hooks and the like).

Jdforrester (WMF) (talkcontribs)

I disagree; I think documenting the current reality is much more helpful for people.

Tacsipacsi (talkcontribs)

Whom do you disagree with? What do you mean by “reality”? Both the oldest supported version is a kind of reality (that is where you have a chance to install the extension), and the version supported by master is a kind of reality (that is where any eventual bugs have a real chance to be fixed).

Reply to "Getting mediawiki from extension.json"
Return to "Extension" page.