See for example "Filter translations" at https://meta.wikimedia.org/wiki/Special:RecentChanges .
I think this can be converted to STRING_OPTIONS, maybe with an imply (setAsSuperSetOf).
• Mattflaschen-WMF | |
Mar 7 2017, 6:08 AM |
F11057607: Screen Shot 2017-11-28 at 4.16.03 PM.png | |
Nov 29 2017, 12:17 AM |
F11034503: Screen Shot 2017-11-27 at 1.42.43 PM.png | |
Nov 27 2017, 9:46 PM |
See for example "Filter translations" at https://meta.wikimedia.org/wiki/Special:RecentChanges .
I think this can be converted to STRING_OPTIONS, maybe with an imply (setAsSuperSetOf).
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/Translate | master | +11 -11 | Reorder Translate filters | |
mediawiki/extensions/Translate | master | +177 -10 | Port Translate filters to new RC filters UI |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T159778 Update WMF-deployed filter-defining extensions that are not specifically targeted for initial Beta feature | |||
Resolved | • Petar.petkovic | T159795 Port Translate to new RC Filters system |
Is this something you are planning to do, or are you seeking for someone else to work on this? If former, please keep the BC requirements in mind (last two stable releases). If the latter, could you provide more information about the new system?
Hi @Nikerabbit, Thanks for asking. These documentation pages are good sources of info (though they are all in progress).
Either. It is not a breaking change, though, so it's not urgent and can wait until it's been in two stable releases. It will be available on doc.wikimedia.org (and maybe we will add more docs on MediaWiki.org) after merge.
@jmatazzoni I checked the pages you linked, but it seems they are all user documentation. I was actually looking for developer documentation such as how to enable this feature, what hooks, configuration variables or APIs I need to use to hook into this feature. I guess those are coming soon as per what @Mattflaschen-WMF said above.
The main hook is ChangesListSpecialPageStructuredFilters.
There are links there for general information. I think in this case, the developer will want to construct a ChangesListStringOptionsFilterGroup object and the associated ChangesListStringOptionsFilter objects.
The group is registered with $special->registerFilterGroup. The detailed documentation is in the methods of each class.
This documentation is complete. See https://www.mediawiki.org/wiki/Edit_Review_Improvements/New_filters_for_edit_review/How_to_implement_a_filter , as well as the Doxygen API documentation.
Just to clarify. This is preventing me to set Filter translations on Meta to "do nothing" by default when using the New filters for edit review feature? Now the default option is "Filter out translations" and I always need to change it manually when I load the recent changes page.
I think that task is a duplicate of T164063.
If I understand correctly, the need is to filter local messages that are in a given language. It requires to:
Here is my suggested language for the translate filter UI
Translations
Changes to translated pages
Translated Site Messages
I don't understand what this is. Can someone please clarify
Not translations
All changes that are not translations.
Change 383986 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/Translate@master] [WIP] Port Translate filters to new RC filters UI
As it currently stands, "Changes to site messages only" does not work by default. The way it was intended to work is to check whether the edit was made in some of registered namespaces. Current filters assume that one of those namespaces is Mediawiki namespace, which is removed from default namespaces long time ago in https://gerrit.wikimedia.org/r/#/c/97699/. Only namespace included by default is Translations namespace. Most of the wikis (or maybe all of wikis, I did not check) which have Translation extension installed, do have it configured to include Mediawiki namespace, so "Changes to site messages only" should work, but currently require configuration to do so. List of wikis that have Translate enabled T164063#3226068.
The way multilingual wikis are supposed to work is having a page such as this one, that can be translated in multiple languages such as Spanish or Czech. Translations to languages that are not default to the wiki (English for example), are marked with Page_title/language-code, like the two linked Spanish and Czech versions. "Show translations only" is targeting those pages that have language code. This may be useful to users only with additional language filtering, to get only translations to specific language. Currently, code for that is in CleanChanges extension.
On the other hand, "Changes to site messages only" targets messages that don't have language code (apparently all articles in Translations namespace do have language code). These are more custimizations (only available to users with the 'editinterface' permission) rather than tranlations, as this checks for Mediawiki namespace (which was, but not anymore included by default). The MediaWiki namespace is used to hold system messages and other important content. For instance, MediaWiki:Common.css is the system message that holds the CSS code that is loaded for all users for each page. Changes picked by "Changes to site messages only" are, for example, MediaWiki:Common.css, but not MediaWiki:Common.css/fr or other messages for specific languages.
As far as filters go, there is no per-user preference to set default filter behavior for translatons filters. Only configurable through wiki default parameter override, affecting all users of that wiki. See T159795#3648295. "Filter out translatons" must be included, as it is currently default value. There was also some discussion about changing default value in T59391#631471.
We will probably need to change behavior of these filters, both for old UI and new UI.
I'm confused. I think we have all the needed filters (quite) already implemented.
Don't we have all needed filters already implemented? Or am I missing something?
If we have all of those implemented, a good improvement would be a way to choose the language you want to check makes it a bit useless. Definitely a killing feature. If I've understood correctly, @Petar.petkovic has a way to do it using CleanChanges.
It really depends on what we want.
For example what of a following is a translation:
Currently Translate treats 2,3,4 (but not 1) as translations.
Some use cases:
The 3 first points of your user cases are user cases we can have on wikis where translations exists ans should be implemented IMO. The two remaining examples are unique to translatewiki, right?
Change 383986 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Port Translate filters to new RC filters UI
Checked in meta.betalabs (Extension:Translate enabled). It seems that currently pages cannot be translated there filed as T180841: [betacluster] Special:Translate does not allow to translate article content - multiple "Uncaught SyntaxError: Unexpected token < in JSON at position 0"
Checked
QA Recommendation: Resolve
I'm bouncing this back to In Development to fix a small style point: In all other filter groups, the "not" option ("not bot" "not on Watchlist," "not the latest revision") comes last in the group. But I'm seeing the "Not translations" filter first (see screenshot from Meta below).
Please re-order the filters as follows:
Change 393671 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/Translate@master] Reorder Translate filters
Change 393671 merged by jenkins-bot:
[mediawiki/extensions/Translate@master] Reorder Translate filters
@Nikerabbit On translatewiki.net, 'Human (not bot)' filter title is 'hidehumans' - is it intentional?
Someone had translated our site message for it, then blanked it thinking it would get rid of it. I have now deleted that page.