Page MenuHomePhabricator

Deploy PageAssessments to Nepali Wikipedia
Closed, ResolvedPublic5 Estimated Story Points

Description

Nepali WPBannerMeta is exactly same as the English One.

Meta template: WPBannerMeta
Example talk page: Example
Community discussion: Here
$specialPageAliases tag in Nepali: पृष्ठ मूल्याङ्कन

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Nepali Wiki does have subprojects or task forces. Thanks

wgPageAssessmentsSubprojects' => [
	'newiki' => true,
],
Fade258 changed the task status from Open to In Progress.Jan 29 2023, 4:26 PM
Fade258 changed the subtype of this task from "Task" to "Design".
Fade258 subscribed.
This comment was removed by Fade258.
Fade258 changed the task status from In Progress to Open.Jan 29 2023, 4:31 PM
Fade258 changed the subtype of this task from "Design" to "Task".
  • Is it needed to add an alias for Special:PageAssessments on zhwiki? If so, what's the desired title?
  • Is it needed to add an alias for Special:PageAssessments on zhwiki? If so, what's the desired title?

Ping @Badakaji for this question. (They meant to say newiki, not zhwiki).

I see in the description you wrote the alias should be पृष्ठ मूल्याङ्कन but this is two words. I do not understand Nepali, but I'm guessing पृष्ठमूल्याङ्कन (without spaces) is also okay? We don't normally have spaces in Special page names, but maybe that's different on newiki.

We prefer the one with space (पृष्ठ_मूल्याङ्कन). It makes things much easier. We have other special pages with spaces.

Ping @MusikAnimal and Ping @Bada Kaji, Sorry for my mistake I mean to say newiki not zhwiki.

Change 884480 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/PageAssessments@master] PageAssessments.i18n.alias.php: add alias for ne

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

@MusikAnimal You only set the alias, I guess. One more patch is required to enable 'PageAssessments' as the extension is not yet enabled for newiki.

@MusikAnimal You only set the alias, I guess. One more patch is required to enable 'PageAssessments' as the extension is not yet enabled for newiki.

Correct. Before we enable the extension, we should make sure the data is properly sanitized. At T326387: Deploy PageAssessments to Chinese Wikipedia the extension was deployed before we did our checks, and there is now corrupt data. I don't want the same mistake to made at newiki!

So, let's first confirm what templates will be edited after deployment. I believe in your case that's ढाँचा:WPBannerMeta/core and ढाँचा:WPBannerMeta/taskforce, is that correct?

We also need to make sure the values stored in the database are normalized. First make sure ढाँचा:Class mask and ढाँचा:Importance mask have all the values for your classifications and importance levels. Then run the values through those templates when you call to {{#assessment}}. So it should look something like this:

{{#assessment:{{{PROJECT}}}|{{#ifeq:{{{class|¬}}}|¬||{{class mask|{{{class}}}}}}}|{{#ifeq:{{{importance|¬}}}|¬||{{importance mask|{{{importance}}}}}}}}}

For the time being, you can undo the {{#assessment}} calls in the templates, as you will want to re-add them after the extension is deployed so that the job queue will process every article.

Change 884480 merged by jenkins-bot:

[mediawiki/extensions/PageAssessments@master] PageAssessments.i18n.alias.php: add alias for ne

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

@MusikAnimal, According to me, all values (importance levels) stored in ढाँचा: Importance mask is allright and also values stored in ढाँचा:Class mask is allright but in my opinion Class NA and Other should be include in ढाँचा:Class mask.

@MusikAnimal I have removed the {{#assessment}} tag from the template.

One question: Do they need to translated into Nepali or be left in English when the extension is being deployed? Currently the ढाँचा:Class mask is in English. For example, see this

One question: Do they need to translated into Nepali or be left in English when the extension is being deployed? Currently the ढाँचा:Class mask is in English. For example, see this

The masking templates should look for whatever users will enter for the assessments and normalize them into standard values. I assume as a community you'd prefer to use Nepali, so I would modify the masking templates to not only accept the Nepali translations, but also store them in Nepali. But that is totally up to you... if your community is content using English, no further changes are necessary.

You should decide before deployment, however. If you switch to Nepali afterwards, you'll need to undo your edits to WPBannerMeta/core, etc., in order to re-trigger the job queue for each article that has assessments.

We are currently translating these templates associated with WPBannerMeta. It may take a few days to finish.

The translation is complete. Good to go.

Change 888066 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[operations/mediawiki-config@master] InitialiseSettings: install PageAssessments on newiki

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

Change 888066 merged by jenkins-bot:

[operations/mediawiki-config@master] InitialiseSettings: install PageAssessments on newiki

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

Mentioned in SAL (#wikimedia-operations) [2023-02-09T21:09:19Z] <thcipriani@deploy1002> Started scap: Backport for [[gerrit:888066|InitialiseSettings: install PageAssessments on newiki (T328224)]]

Mentioned in SAL (#wikimedia-operations) [2023-02-09T21:11:11Z] <thcipriani@deploy1002> musikanimal and thcipriani: Backport for [[gerrit:888066|InitialiseSettings: install PageAssessments on newiki (T328224)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-02-09T21:13:44Z] <thcipriani@deploy1002> sync-world aborted: Backport for [[gerrit:888066|InitialiseSettings: install PageAssessments on newiki (T328224)]] (duration: 04m 24s)

Sorry, I didn't coordinate the database updates before scheduling the deploy, so we rolled it back. I'm on holiday starting tomorrow through the 22nd, so I won't be able to handle this deployment.

I will inform my team and see if someone else can take this over. Thanks for your patience!

Notes for responsible developer:

  • Coordinate with a DBA or deployer to run mwscript extensions/WikimediaMaintenance/createExtensionTables.php newiki pageassessments on mwmaint1002
  • Re-deploy r888066 (or I guess create a new patch)
  • After deployment, ask the people above to update the templates (they know what to change)
  • Wait a day or so for it all to propagate
  • Run SELECT DISTINCT(pa_class) FROM page_assessments to see if there's any non-standard values. The rows should align with the normalized values specified in ढाँचा:Class mask
  • Do the same for pa_importance, with that normalization template being ढाँचा:Importance mask
  • If there are any non-standard values, that means the mask templates aren't doing their job properly or there is something calling {{#assessment}} without running the values through the mask templates.
  • None of this is critical, but if we have non-standard/invalid data, PageAssessments isn't that useful as the intent is for the data to be machine-readable.

Then to-dos for me:

  • Add newiki to the assessments configuration in XTools, which in turn will surface assessments in https://pageviews.wmcloud.org among other places.
TheresNoTime subscribed.

Claiming task for the deployment elements

Change 889528 had a related patch set uploaded (by Samtar; author: Samtar):

[operations/mediawiki-config@master] InitialiseSettings: install PageAssessments on newiki

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

Mentioned in SAL (#wikimedia-operations) [2023-02-15T13:27:17Z] <TheresNoTime> [samtar@mwmaint1002 ~]$ mwscript extensions/WikimediaMaintenance/createExtensionTables.php newiki pageassessments T328224

Change 889528 merged by jenkins-bot:

[operations/mediawiki-config@master] InitialiseSettings: install PageAssessments on newiki

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

Mentioned in SAL (#wikimedia-operations) [2023-02-15T14:22:40Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:889528|InitialiseSettings: install PageAssessments on newiki (T328224)]]

Mentioned in SAL (#wikimedia-operations) [2023-02-15T14:24:27Z] <samtar@deploy1002> samtar: Backport for [[gerrit:889528|InitialiseSettings: install PageAssessments on newiki (T328224)]] synced to the testservers: mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-02-15T14:31:06Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:889528|InitialiseSettings: install PageAssessments on newiki (T328224)]] (duration: 08m 25s)

I have:

Per @MusikAnimal's comment above, @Badakaji you are now free to update the templates

Thanks for the deployment @TheresNoTime. Here are few things I noticed.

  • $specialPageAliases tag (पृष्ठ_मूल्याङ्कन) set by MusikAnimal doesn't seems to work (link).
  • At the Special page, the words are not rendered correctly. (अस्पष्ट renders as अस्पष्�; प्रमुख लेख -> प्रमुख �; सर्वोच्च -> सर्वोच� ) (link) (I guess this because the words are longer for eg. FA (English Wiki) प्रमुख लेख (Nepali Wiki) Maybe?)

Thanks for the deployment @TheresNoTime. Here are few things I noticed.

  • $specialPageAliases tag (पृष्ठ_मूल्याङ्कन) set by MusikAnimal doesn't seems to work (link).
  • At the Special page, the words are not rendered correctly. (अस्पष्ट renders as अस्पष्�; प्रमुख लेख -> प्रमुख �; सर्वोच्च -> सर्वोच� ) (link) (I guess this because the words are longer for eg. FA (English Wiki) प्रमुख लेख (Nepali Wiki) Maybe?)

Sorry for missing this comment — I'll take a look at the specialPageAliases and other issues (but may need to defer to when MusikAnimal returns from their PTO)

Change 890440 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/PageAssessments@master] PageAssessments.i18n.alias.php: Fix spelling mistake

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

Change 890440 merged by jenkins-bot:

[mediawiki/extensions/PageAssessments@master] PageAssessments.i18n.alias.php: Fix spelling mistake

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

Change 890447 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/PageAssessments@wmf/1.40.0-wmf.23] PageAssessments.i18n.alias.php: Fix spelling mistake

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

Change 890447 merged by jenkins-bot:

[mediawiki/extensions/PageAssessments@wmf/1.40.0-wmf.23] PageAssessments.i18n.alias.php: Fix spelling mistake

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

Mentioned in SAL (#wikimedia-operations) [2023-02-20T14:51:21Z] <samtar@deploy1002> Started scap: Backport for [[gerrit:890447|PageAssessments.i18n.alias.php: Fix spelling mistake (T328224)]]

Mentioned in SAL (#wikimedia-operations) [2023-02-20T15:04:24Z] <samtar@deploy1002> samtar: Backport for [[gerrit:890447|PageAssessments.i18n.alias.php: Fix spelling mistake (T328224)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-02-20T15:13:25Z] <samtar@deploy1002> Finished scap: Backport for [[gerrit:890447|PageAssessments.i18n.alias.php: Fix spelling mistake (T328224)]] (duration: 22m 03s)

Thanks for the deployment @TheresNoTime. Here are few things I noticed.

  • $specialPageAliases tag (पृष्ठ_मूल्याङ्कन) set by MusikAnimal doesn't seems to work (link).
  • At the Special page, the words are not rendered correctly. (अस्पष्ट renders as अस्पष्�; प्रमुख लेख -> प्रमुख �; सर्वोच्च -> सर्वोच� ) (link) (I guess this because the words are longer for eg. FA (English Wiki) प्रमुख लेख (Nepali Wiki) Maybe?)

Just FYI, the special page alias issue has been resolved — it was a spelling mistake :) will take a look at the encoding issue

  • Wait a day or so for it all to propagate
  • Run SELECT DISTINCT(pa_class) FROM page_assessments to see if there's any non-standard values. The rows should align with the normalized values specified in ढाँचा:Class mask
  • Do the same for pa_importance, with that normalization template being ढाँचा:Importance mask

Noting that SELECT DISTINCT(pa_class) FROM page_assessments; returns:

wikiadmin2023@10.64.32.82(newiki)> SELECT DISTINCT(pa_class) FROM page_assessments;
+----------------------+
| pa_class             |
+----------------------+
| क                    |
|                      |
| प्रमुख ▒              |
| सुरुवा▒               |
| श्रेणी               |
| अस्पष्▒               |
| पोर्टल               |
| ग                    |
| ढाँचा                |
| Stub                 |
| Redirect             |
| परियोज▒               |
| ख                    |
| अपुरो                |
| सूची                 |
| अनुप्र▒               |
| Start                |
| NA                   |
| Disambig             |
| मस्यौद▒               |
+----------------------+
20 rows in set (0.002 sec)

and SELECT DISTINCT(pa_importance) FROM page_assessments; returns

wikiadmin2023@10.64.32.82(newiki)> SELECT DISTINCT(pa_importance) FROM page_assessments;
+----------------------+
| pa_importance        |
+----------------------+
| सर्वोच▒               |
| अज्ञात               |
| उच्च                 |
| न्यून                |
| मध्यम                |
|                      |
+----------------------+
6 rows in set (0.001 sec)

I don't fully understand what ढाँचा:Class mask / ढाँचा:Importance mask is meant to do, but the above values do not seem to align with them.

Is suspect this is just strings being cut off. Devanagari is a multi byte script. Specifically apparently up to 3 bytes per character. So only strings of 6 characters are safe for this language, as the table defines 20 bytes varbinary/varchar.

This will likely take several database migrations to fix this problem in both extension and already deployed database tables.

If it's not much data, perhaps it can be quickly fixed for this specific deployed wiki, with additional migrations queue for the future for the other wikis.

  • PA should check the max size of input, so that it cannot store incomplete strings in db
  • PA might have stored incomplete data in other wikis than this wiki, we should check and identify if this is the case
  • PA will need a SQL migration written to change the 20 to a new 'reasonable' value
    • A reasonable value is an amount of characters times 4 (scripts can use up to 4 bytes for a character)
    • We should pick a value that isn't likely to require subsequent increases again
  • PA might need a 'quick fix' migration for this specific wiki.
  • PA will require migration scheduled for all other wikis using this extension
TheresNoTime set the point value for this task to 5.Feb 21 2023, 3:52 PM

@TheresNoTime, I have reworked the Class mask; it should be working correctly now. Thanks

TheresNoTime removed TheresNoTime as the assignee of this task.EditedFeb 27 2023, 3:26 PM

Unlick; further work to be done (T330173, T330181) and also a new task to be created (TODO) to ensure PageAssessments doesn't store truncated data. @Badakaji my understanding (CC @MusikAnimal) is that the class/importance values need to be shortened/abbreviated (e.g. Good Article -> GA)

Yeah, I think for the short-term, it's best for newiki to introduce abbreviated class and importance names and implement those into your masking templates. I don't know if that makes sense in Nepali or not (in English it does, as TheresNoTime points out: Good Article can simply be GA). If it doesn't make sense, I suppose you could still store abbreviated values, but use a new template that converts those abbreviations to their actual names for display purposes, using that template in WPBannerMeta and wherever else as necessary. This way, there's no issue with storage, but everything still appears readable to users. This wouldn't apply to Special:PageAsssessments, though; there you would be forever stuck seeing the abbreviations. Not sure if that's a problem.

How does that sound, @Badakaji and others?

Alternatively, we can simply wait until we get the storage issues fixed in PageAssessments, but that will likely take some number of weeks to finish.

@MusikAnimal @TheresNoTime Sorry for the late response. I think Nepali Wiki will have to wait until the storage issues are fixed. The abbreviations create weird/awkward names for e.g. Featured List is प्रमुख सूची -> प्रसू which translated means bomb blast. उत्कृष्ट लेख (Good Article) -> उले means He is. प्रमुख लेख (Featured Article) -> प्रले means time of universal destruction. I think these could confused a reader/writer that's why I think current class values are fine as they are. The storage issues shouldn't take that long to get fixed.

Wow, those are some not-so-great translations, hehe! I sure hope your finest articles aren't considered "time of universal destruction", ha!

Unfortunately I think it may take a while to get the storage issues fixed, but it's on our radar. If I had to guess, I'd say it may take us up to a month. The work is being tracked at T330173: page_assessments table uses an inadequate VARBINARY length for pa_class/pa_importance should you want to follow along. In the meantime, I see no issue with keeping PageAssessments installed, since the broken values are only exposed at Special:PageAssessments (right?).

NRodriguez claimed this task.
NRodriguez subscribed.

We will notify you as soon as we get the above issues addressed!