Page MenuHomePhabricator

MediaWiki:Searchsuggest-containing is a split string that cannot be translated properly
Closed, ResolvedPublic5 Estimated Story Points

Description

Currently we have difficulty translating this string into Chinese as the position of the search keyword is hardcoded in the new Vector's typeahead search.

Please create a separated entry for the use of the new typeahead search, and use placeholder to insert search keywords (e.g. Search for pages containing $1) so that it can be translated with ease, thank you!


URL: https://translatewiki.net/wiki/MediaWiki:Searchsuggest-containing/zh-hans

Developer notes

This refers to

Screen Shot 2021-09-16 at 1.58.49 PM.png (130×896 px, 14 KB)
. This will require changes in both Vector and WVUI.

this is the footer-search-text parameter in App.vue

{{ footerSearchText }} <strong
                                                                class="wvui-typeahead-search__suggestions__footer__text__query"
                                                        >{{ searchQuery }}

A few challenges:

  • Messages support HTML and wikitext. Message would look something like "Search for pages containing ''$1''"
  • theoretically footerSearchText could be added as raw HTML, but Vue.js frowns upon that.
  • if we're okay with using HTML in Vue, we would need to revise any .wvui-typeahead-searchsuggestionsfootertextquery rules to a generic b, strong tag (the wikitext parser generates b tags not strong tags
  • Another option is using an event which is passed the query and the element as parameters. The event handler can then inject the message to the element using the query after passing it through message keys

QA steps

Visit any page and focus the search box. Type some text. Check the text at the bottom is phrased correctly and links to a full text search

Screen Shot 2021-12-07 at 8.17.17 AM.png (128×942 px, 17 KB)

QA Results - Beta

ACStatusDetails
1T290392#7556264

QA Results - Prod

ACStatusDetails
1T290392#7556299

Event Timeline

Aklapper renamed this task from [[MediaWiki:Searchsuggest-containing/zh-hans]] translation issue to MediaWiki:Searchsuggest-containing is a split string that cannot be translated properly.Sep 5 2021, 2:01 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Jdlrobson.

Change 725111 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Use searchFooterText slot in typeahead search component

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

Change 725095 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[wvui@master] [typeahead-search] Replace footerSearchText prop with scoped slot to better support translations

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

bwang removed bwang as the assignee of this task.Oct 4 2021, 7:59 PM
bwang added a subscriber: bwang.

Change 726648 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/core@master] Update searchsuggest-containing locale

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

Change 726648 abandoned by Bernard Wang:

[mediawiki/core@master] Update searchsuggest-containing locale

Reason:

No longer need to update searchsuggest-containing

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

Change 725095 merged by jenkins-bot:

[wvui@master] [typeahead-search] Replace footerSearchText prop with scoped slot to better support translations

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

cjming added a subscriber: cjming.

Change 725111 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Use searchFooterText slot in typeahead search component

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

All patches have been merged, but we now need a WVUI release.

Change 730603 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[wvui@master] [typeahead-search] Remove unnecessary slotProp from the default slot

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

Change 730603 merged by jenkins-bot:

[wvui@master] [typeahead-search] Remove unnecessary slotProp from the default slot

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

Change 736089 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update WVUI to v0.3.2

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

Change 736089 merged by jenkins-bot:

[mediawiki/core@master] Update WVUI to v0.3.2

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

Change 738434 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[mediawiki/skins/Vector@master] Use searchFooterText slot in typeahead search component

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

Change 738434 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Use searchFooterText slot in typeahead search component

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

Edtadros added a subscriber: Edtadros.

@Jdlrobson, I'm not sure what to validate here.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Visit any page and focus the search box. Type some text. Check the text at the bottom is phrased correctly and links to a full-text search, for example:

Screen Shot 2021-12-07 at 8.17.17 AM.png (128×942 px, 17 KB)

✅ AC1:

Screen Shot 2021-12-08 at 5.46.58 AM.png (124×545 px, 11 KB)

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

Visit any page and focus the search box. Type some text. Check the text at the bottom is phrased correctly and links to a full-text search, for example:

Screen Shot 2021-12-07 at 8.17.17 AM.png (128×942 px, 17 KB)

✅ AC1:

Screen Shot 2021-12-08 at 5.51.38 AM.png (675×506 px, 120 KB)

Looks good, resolving for now. Noting that string is still not translated on zhwiki - @Tranve - let us know if you have any further issues with translation!

Screen Shot 2021-12-09 at 11.14.03 AM.png (293×958 px, 96 KB)