Page MenuHomePhabricator

Implement Fallback version
Closed, ResolvedPublic

Description

This fallback has no limit checks .. it is a replacement of the current summary message "Item changed"

Template

Changed label, description and/or alias in XX languages

Example:
Changed label, description and/or alias in 60 languages

To do

Final AC

Given Item or Property UI page

When I update only some terms in different languages
Then I should see the following summary message in item's history and recent changes:
Changed label, description and/or alias in XX languages where XX is the number of distinct languages changed

When I update some other non-term parts
Then I should see the following summary message in item's history and recent changes:
Item changed


Given API user of wbeditentity api

When I update terms and other parts of entity
Then I should see the following summary message in item's history and recent changes:
Changed label, description and/or alias in XX languages, and other parts where XX is the number of distinct languages changed

Details

SubjectRepoBranchLines +/-
mediawiki/extensions/Wikibasemaster+2 -2
mediawiki/extensions/Wikibasemaster+7 -6
mediawiki/extensions/Wikibasemaster+165 -12
mediawiki/extensions/Wikibasemaster+98 -0
mediawiki/extensions/Wikibasemaster+48 -1
mediawiki/extensions/Wikibasemaster+68 -25
mediawiki/extensions/Wikibasemaster+292 -0
mediawiki/extensions/Wikibasemaster+418 -9
mediawiki/extensions/Wikibasemaster+23 -4
mediawiki/extensions/Wikibasemaster+50 -9
mediawiki/extensions/Wikibasemaster+86 -9
mediawiki/extensions/Wikibasemaster+502 -3
mediawiki/extensions/Wikibasemaster+906 -0
mediawiki/extensions/WikibaseLexememaster+75 -0
mediawiki/extensions/Wikibasemaster+14 -0
Show related patches Customize query in gerrit

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
OpenNone
Resolved alaa_wmde

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 524498 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Implement ChangeOpResult for ChangeOpAliases, ChangeOpDescription and ChangeOpLabel

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

@alaa_wmde For the next change, I guess we should count the languages from the changeOps array then another change will be to modify the edit summary based on the counts result.
I am working on the language count now. Let me know if am missing something please.

Change 526672 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] Make ChangeOps::apply() return instance of changeOpResult

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

@alaa_wmde For the next change, I guess we should count the languages from the changeOps array then another change will be to modify the edit summary based on the counts result.

That makes a lot of sense to separate all things we need to do with ChangeOpResult related stuff, and then do the edit summary at the end 👍

Change 526672 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Make ChangeOps::apply() return instance of changeOpResult Add Test for ChangeOps::apply() return value

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

Change 529325 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] Make Summary class hold all languages of edit.

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

Change 529956 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] Introduce LanguageBoundChangeOpResult following ISP

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

Change 529325 abandoned by Alaa Sarhan:
[WIP]Make Summary class hold all languages of edit.

Reason:
Paired on a different approach with Rosalie, and agreed on abandoning this one

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

(mimicking gerrit 😄)

Change 530116 had a related patch set uploaded (by Rosalie Perside (WMDE); owner: Rosalie Perside (WMDE)):
[mediawiki/extensions/Wikibase@master] Add service for counting distinct changed languages in a given changeOpResults tree.

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

Change 529956 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Introduce LanguageBoundChangeOpResult following ISP

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

Change 531296 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Introduce interfaces to enable visitor pattern for business logic on ChangeOpResult trees.

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

Change 531296 abandoned by Alaa Sarhan:
Introduce interfaces to enable visitor pattern for business logic on ChangeOpResult trees.

Reason:
went with simpler solution

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

Change 530116 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add service for counting distinct changed languages in a changeOpResults tree.

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

Change 533261 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Use ChangedLanguagesCounter in EditEntity to generate fallback summary message

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

@Lydia_Pintscher @Lea_WMDE
We have a question on this.

wbeditentity can be used to edit all parts of an entity. When parts other than terms have been edited through it (currently, only through API as in UI the new termbox will only do one batch for terms), it wasn't clear what the message should say then. We can do one of the following:

  • [cheapest, least ideal?] when there are any terms changed, then we use the fallback message. Otherwise, we use the old generic "Item changed" message.
  • [not that expensive, sounded decent]
    • check if only terms have been changed => use the fallback message in here
    • check if no terms has changed => use old generic "Item changed"
    • if both terms and other parts changed => use a compound comment.. e.g. combining old generic one with the new fallback for terms into smth like "Changed label, description and/or aliases in 3 languages, and change other parts"

We want to go with the second one, but would love to confirm with you on the general idea, and perhaps if you have an opinion on the combined message wording.

Change 533522 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Make all other ChangeOp implementations return GenericChangeOpResult

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

We want to go with the second one, but would love to confirm with you on the general idea, and perhaps if you have an opinion on the combined message wording.

Yes agreed. We definitely need to avoid the case where the edit summary implies only terms have been changed and then other parts of the entity have been changed as well. That'd screw up quick and easy patrolling.

As for the message: how about "Changed label, description and/or aliases in 3 languages, and other parts"?

Change 533898 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] GenericChangeOpResult: add tests

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

Change 533522 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Make all other ChangeOp implementations return GenericChangeOpResult

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

Change 533898 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] GenericChangeOpResult: add tests

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

Change 534127 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Add a service to count language unbound changes in ChangeOpResult tree.

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

Change 534127 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add a service to count non-language-bound changes in ChangeOpResult tree.

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

As for the message: how about "Changed label, description and/or aliases in 3 languages, and other parts"?

Sounds good to me!

Change 533261 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Generate fallback summary messages based on changed parts on entity

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

Change 535906 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Move new translations to correct file and keys

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

Reverted the revert and updated the fix (rebased on the revert of revert now)

Change 535906 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Move new translations to correct file and keys

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

Léa and I tested it. It is working well. One one small issue: https://m.wikidata.beta.wmflabs.org/wiki/Special:MobileDiff/1150604 <- the edit summary has a . at the end. To keep consistency with the other edit summaries there shouldn't be one.

Change 540018 had a related patch set uploaded (by Alaa Sarhan; owner: Alaa Sarhan):
[mediawiki/extensions/Wikibase@master] Remove trailing . from fallback edit summary comments

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

Change 540018 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Remove trailing . from fallback edit summary comments

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