Page MenuHomePhabricator

Ability to notify all languages except some
Closed, ResolvedPublic4 Estimated Story PointsFeature

Description

Sometimes, e.g. when a page has already been completely translated into a few languages, as a translation administrator one would like to send out a translation notification for all remaining languages, without bothering translators about the already completed languages.

I could see basically two possibilities to integrate this into the UI at Special:NotifyTranslators:

  1. Add a checkbox like "Don't notify about languages which are already 100% translated" (I assume that this isn't already the default behavior)
  1. Add the option to enter a list of excluded languages (e.g. "Notify all languages except these:", this could be combined with the existing "leave blank to notify for all languages")

This second option would be more flexible and also allow for situations where a translation is already being prepared elsewhere to be imported later. But it might be a bit more confusing.

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:55 AM
bzimport set Reference to bz61125.
bzimport added a subscriber: Unknown Object (MLST).

The workaround is rather trivial, I just enter the list of all languages minus those I didn't need (time: 3 minutes). But I agree it would be nice: I didn't even remember if it would automatically skip completed languages, which is a reasonable expectation.

(While checking if it did, I found bug 69887.)

Xeno_WMF subscribed.

This will be useful for the Movement Strategy and Governance team. Our facilitators translate major languages, we would prefer not to send redundant notifications.

One of the considerations for this request would be to add a form control for one to be able to input a comma delimited list of languages; e.g en, sw, de that would then be used as an exclusion list for the notification. Does the label "For which languages NOT to send notification" make sense for this control? @abi_ @Pginer-WMF

Screenshot from 2022-09-21 10-20-16.png (678×999 px, 45 KB)

One of the considerations for this request would be to add a form control for one to be able to input a comma delimited list of languages; e.g en, sw, de that would then be used as an exclusion list for the notification. Does the label "For which languages NOT to send notification" make sense for this control? @abi_ @Pginer-WMF

Screenshot from 2022-09-21 10-20-16.png (678×999 px, 45 KB)

One concern with the use of two input fields is that the UI may convey the expectation of filling both and that results in a confusing state. I think the problem is the selection of what to do becomes implicit (based on whether a given field is left blank). I think we can explore how this could work with a more explicit selection. Specific language can be tweaked further, just wanted to share the general idea of a potential direction to check if it makes sense.

A) Explicit choice with radio buttons

Requested languages:
(•) All languages
( )  Only languages missing translations
( ) Only selected languages
( )  All with the selected exceptions

Selected languages/exceptions: [     ]

The selected languages section will be only shown for the last two options and the label can change to reinforce the purpose (i.e., it will show as "Selected exceptions" when "All with selected exceptions" option is selected above)

The above also assumes that by default messages are sent to all languages even those which are 100% translated, if that is not the case we could consider a simplified version:

Requested languages:
(•) All languages with missing translations
( ) Only selected languages
( )  All with the selected exceptions

Selected languages/exceptions: [     ]

Unified field with explicit selection of criteria

Custom languages:
[Include ▼] [ en, sw, de ]

This provides a single list of languages with a drop-down to decide whether to use the list to include or exclude them. The initial placeholder for the list could be "All languages" to make it clear that leaving it blank represents all languages. The option to exclude with empty list should be treated as an error in this case.

This avoids having two lists that are not intended to be filled at the same time. The initial selection on whether to go with all languages is implicit but it is more guided than in the original approach.

Change 836096 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/TranslationNotifications@master] WIP: Notify all, some or except some languages

https://gerrit.wikimedia.org/r/836096

I believe the following layout makes sense. The 'all languages' option disables the 'Selected languages/exceptions' input field. During testing, I did wonder if it's a good idea to update the field with the respective languages depending on what was selected using the radio buttons. e.g; An admin switching between notify only these languages to notify all languages except will have to explicitly fill in the field repeatedly. Could this be a potential source of confusion?

Screen Shot 2022-09-28 at 10.41.13 AM.png (719×1 px, 64 KB)

I believe the following layout makes sense. The 'all languages' option disables the 'Selected languages/exceptions' input field. During testing, I did wonder if it's a good idea to update the field with the respective languages depending on what was selected using the radio buttons. e.g; An admin switching between notify only these languages to notify all languages except will have to explicitly fill in the field repeatedly. Could this be a potential source of confusion?

Screen Shot 2022-09-28 at 10.41.13 AM.png (719×1 px, 64 KB)

I think it would be good to keep the list of languages the user added ("ang, dtp" in the example) even if the user changes the selection in the radio buttons. I can imagine the user pasting the list first and then indicating whether they want to include or exclude those.

Another minor note: I was wondering of the current label "Selected languages/exceptions" could adapt the text based on the radio button selection. That is, becoming either "Selected languages" or "Selected exceptions" depending on the selected option above.

Nikerabbit changed the subtype of this task from "Task" to "Feature Request".Oct 27 2022, 8:44 AM

When All languages except option is selected, the label For which languages to send notification: is incorrect.

image.png (309×824 px, 31 KB)

Another minor note: I was wondering of the current label "Selected languages/exceptions" could adapt the text based on the radio button selection. That is, becoming either "Selected languages" or "Selected exceptions" depending on the selected option above.

If possible it would be good to do this, but just having Selected languages/exceptions is better what it is now.

Change 836096 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] Add option to notify all, selected or all except some languages

https://gerrit.wikimedia.org/r/836096

If possible it would be good to do this, but just having Selected languages/exceptions is better what it is now.

This turned out to be a better approach as OOUI rebase significantly changes the way notifytranslators.js interacts how the label text updates whenever different notification options are selected.

Screen Shot 2022-11-27 at 09.54.57 AM.png (1×1 px, 87 KB)

Mistakenly resolved. Unresolving to test on prod after deplyment.

Checked on Meta-Wiki that the user interface has been updated:

image.png (1×949 px, 46 KB)

I've not sent a notification to translators, so will leave this open for a while.

I don't see any notifications sent using the extensions on MetaWiki or Mediawiki. Leaving this open for some more time.

I don't see any notifications sent using the extensions on MetaWiki or Mediawiki. Leaving this open for some more time.

Maybe it's because people aren't using the notification system at all? My team kind of considers it a sort of nuclear option given the amount of people it pings and we were under the impression that it may not work properly at all?

I don't see any notifications sent using the extensions on MetaWiki or Mediawiki. Leaving this open for some more time.

Maybe it's because people aren't using the notification system at all? My team kind of considers it a sort of nuclear option given the amount of people it pings and we were under the impression that it may not work properly at all?

The language team is maintaining the extension and if things are not working at all we will do our best to fix them as soon as possible.

The notification only goes out to people who have subscribed to receive this notifications via the Special:TranslatorSignup page. This task adds a feature where translators of certain languages can be omitted. Please let us know if there are other filtering options that you think would make the feature more usable? Do you think addressing T323192: Stop notifying translators who have been inactive for years would help?

I don't see any notifications sent using the extensions on MetaWiki or Mediawiki. Leaving this open for some more time.

Maybe it's because people aren't using the notification system at all? My team kind of considers it a sort of nuclear option given the amount of people it pings and we were under the impression that it may not work properly at all?

The language team is maintaining the extension and if things are not working at all we will do our best to fix them as soon as possible.

The notification only goes out to people who have subscribed to receive this notifications via the Special:TranslatorSignup page. This task adds a feature where translators of certain languages can be omitted. Please let us know if there are other filtering options that you think would make the feature more usable? Do you think addressing T323192: Stop notifying translators who have been inactive for years would help?

Sorry @abi_ , I never meant to imply your team doesn't care or wouldn't help :)
Yes, what you describe would be one way to go about it. Another idea I have is whether we could find a way to specify the importance and/or urgency of the requested translation. While one could argue that if we choose to notify translators, that inherently means the translation is both important and urgent, I wonder if there should be a specific flag instead.

I wonder if there should be a specific flag instead.

I think notifying translators is an indication in itself that the translation needs attention. Perhaps the message/email sent to translators can be reworded. Shouldn't this feature be used because of importance and/or urgency of the requested translation as you put it?

I wonder if there should be a specific flag instead.

I think notifying translators is an indication in itself that the translation needs attention. Perhaps the message/email sent to translators can be reworded. Shouldn't this feature be used because of importance and/or urgency of the requested translation as you put it?

I think that in order for us to be mindful of people's time, we do need a way to differentiate between what is "just" important, and what is "important /and/ urgent". We should even agree on the definitions to begin with...

My experience is that people use the free-form message box to provide details of importance and urgency. Though I do think it would be good to have some alignment on when and how to use the Special:NotifyTranslators button. @Denis_Barthel may have thoughts.

Change 879820 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/TranslationNotifications@master] TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format

https://gerrit.wikimedia.org/r/879820

abi_ added a subscriber: RamzyM-WMF.

This was used on Jan 12th by @RamzyM-WMF and he reported that notifications were not going out.

I checked OpenSearch and noticed an error:

[dba28e2f-6cf3-4cac-8a89-426c03812975] /rpc/RunSingleJob.php   Error: Call to a member function getOption() on array
	
from /srv/mediawiki/php-1.40.0-wmf.18/extensions/TranslationNotifications/includes/Jobs/TranslationNotificationsSubmitJob.php(276)
#0 /srv/mediawiki/php-1.40.0-wmf.18/extensions/TranslationNotifications/includes/Jobs/TranslationNotificationsSubmitJob.php(105): MediaWiki\Extension\TranslationNotifications\Jobs\TranslationNotificationsSubmitJob->fetchTranslators(array, string, array)
#1 /srv/mediawiki/php-1.40.0-wmf.18/extensions/EventBus/includes/JobExecutor.php(79): MediaWiki\Extension\TranslationNotifications\Jobs\TranslationNotificationsSubmitJob->run()
#2 /srv/mediawiki/rpc/RunSingleJob.php(77): MediaWiki\Extension\EventBus\JobExecutor->execute(array)
#3 {main}

Link to the error on OpenSearch

The $languageSet option was added in this patch. Its an object of class LanguageSet that we added for this functionality. This class implements the JsonSerializable.

During testing, on our local machine, when we pass this object into the job queue, we noticed that the object was serialized and de0serialized back when the job ran.

This does not seem to be the case on production, where $languageSet remains an array.

I've submitted a patch to fix this: 879820: TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format | https://gerrit.wikimedia.org/r/c/mediawiki/extensions/TranslationNotifications/+/879820

Change 879820 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format

https://gerrit.wikimedia.org/r/879820

Change 879793 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/TranslationNotifications@wmf/1.40.0-wmf.18] TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format

https://gerrit.wikimedia.org/r/879793

Change 879793 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@wmf/1.40.0-wmf.18] TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format

https://gerrit.wikimedia.org/r/879793

Mentioned in SAL (#wikimedia-operations) [2023-01-13T17:20:54Z] <thcipriani@deploy1002> Started scap: Backport for [[gerrit:879793|TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format (T63125)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-13T17:22:34Z] <thcipriani@deploy1002> thcipriani and abi: Backport for [[gerrit:879793|TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format (T63125)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug1002.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-13T17:34:19Z] <thcipriani@deploy1002> Finished scap: Backport for [[gerrit:879793|TranslationNotificationsSubmitJob: Ensure LanguageSet is in proper format (T63125)]] (duration: 13m 25s)

abi_ moved this task from In Review to Done on the Language-Team (Language-2023-January-March) board.

Issues related to the issue have been fixed and the functionality was used to send notifications for UCoC related translations: https://meta.wikimedia.org/w/index.php?title=Special:Log&logid=50803468