Page MenuHomePhabricator

Translate tags are shown in wish table
Open, HighPublicBUG REPORT

Description

After wishes have been marked for translation, the bot adds their entire title to the all-wishes table (and archive, recent, etc.):

Screenshot 2024-06-25 at 12-28-24 Community Wishlist - [...].png (394×999 px, 68 KB)

Steps to reproduce:

  1. Prepare a wish page for translation with <translate> tags around its title, e.g. | title = <translate>Lorem ipsum</translate>.
  2. Mark the page for translation.
  3. Wait for the bot to run, so the list at Community_Wishlist/Wishes is up to date.
  4. Note that the <translate> tags are visible in the table, but they should not be.

Details

TitleReferenceAuthorSource BranchDest Branch
On the index pages, use TNTN to include the localised row list templaterepos/commtech/wishlist-intake!140tstarlingwork/tstarling/tntnmain
Draft: mediawiki-pages: add TNT system to fetch translated wish titlesrepos/commtech/wishlist-intake!130musikanimaltnt-wish-titlesmain
Customize query in GitLab

Event Timeline

Samwilson added a subscriber: tstarling.

@tstarling This might be a bigger bug: how does the bot protect against processing translation subpages? It looks like it's treating each (/en, /en-gb, etc.) as a separate wish:

Screenshot 2024-06-25 at 12-58-22 Community Wishlist_Wi[...].png (225×1 px, 53 KB)

This seems like this is a bot issue, but could perhaps be resolved with the system we've used in the past:

  • Template:Community Wishlist Survey/Proposal has the line {{#if:{{{titleonly|}}}|{{{title}}}<!-- allows transclusion page to be set up for translation, and fetch the translated title for use in other places -->|… (in our case this would go in Template:Community Wishlist/Wish)
  • Then wherever we want to show the localized title, we can do so with {{TNT|namespace=0|Community Wishlist/Wishes/My_wish|titleonly=yes|uselang={{int:lang}}}}. {{TNT}} is already in the wishlist-intake repo.

Using this system, the bot doesn't need to write the title at all, rather Template:Community Wishlist/Wishes/Row would handle it.

So for the above to work, we need to get the {{int:lang}} hack implemented (TIL -- it's a hack and not Core functionality!). I'm doing that as part of T368578.

That's what I was thinking. Sounds like this needs to wait till that's done.

@MusikAnimal Will this still be a valid with your breakthrough approach?

The approach proposed at T368349#9927714 will still work, yes. However with that extra translcusion per row, we might run into issues on the All Wishes page once there are a lot. We already knew that we'll have to implement pagination at some point, but that requirement might come sooner if we implement T368349#9927714. I'm not really certain though; would love to hear what @tstarling thinks. All I know is T368349#9927714 will work, so for the very short term, that might be the best route.

We discussed this on Slack and it seems we'll go with the idea at T368349#9927714. As this level of ornate hackery is familiar to me, I'll handle that, but I'm not touching the bot as I don't want to step on toes. The bot needs to ignore translation subpages, so there's still that to-do left.

As far as I can tell, !130 fully implements what I was proposing, yet on my local it isn't working:

Screenshot from 2024-07-02 16-55-41.png (319×1 px, 72 KB)

The resultant wikitext should be evaluated by the parser as what it looks like -- an internal link -- yet it prints as plain text.

You can see the same system working fine on Meta at https://meta.wikimedia.org/w/index.php?title=User:MusikAnimal/sandbox&oldid=27048418

Is there perhaps a configuration setting or something I might be missing on my local? I went through Extension:Translate's config settings and none of those seemed to be relevant :/

tstarling opened https://gitlab.wikimedia.org/repos/commtech/wishlist-intake/-/merge_requests/140

On the index pages, use TNTN to include the localised row list template

tstarling closed https://gitlab.wikimedia.org/repos/commtech/wishlist-intake/-/merge_requests/130

Draft: mediawiki-pages: add TNT system to fetch translated wish titles

samwilson merged https://gitlab.wikimedia.org/repos/commtech/wishlist-intake/-/merge_requests/140

On the index pages, use TNTN to include the localised row list template