Page MenuHomePhabricator

[8hrs] Investigate how to add default links in creation pages
Closed, ResolvedPublic

Description

When on a Wiki in cloud, in the sidebar the user has options to create new items, properties or lexemes. In all these pages, in the top there are empty link texts of "label", "description" and "terms of use". Example below or in https://florencia.wikibase.cloud/wiki/Special:NewItem

Investigate best approach here. Timebox: 8 hrs

AC:
The empty links should by default, for every wiki, link to:

Screenshot from 2022-07-07 09-37-10.png (896×1 px, 140 KB)

Event Timeline

Evelien_WMDE renamed this task from Add default links in creation pages to [hrs] Investigate how to add default links in creation pages.Aug 11 2022, 11:28 AM
Evelien_WMDE updated the task description. (Show Details)
Addshore subscribed.

It sounds like this would be desirable for all 3rd party wikibases.
If so, this should just be changed in the text strings in wikibase itself.

Evelien_WMDE renamed this task from [hrs] Investigate how to add default links in creation pages to [8hrs] Investigate how to add default links in creation pages.May 4 2023, 1:47 PM
Evelien_WMDE updated the task description. (Show Details)

@Evelien_WMDE the strings that contain the content mentioned are localized for all available languages. Not sure if this is in scope for cloud or should rather happen in Wikibase itself (as already suggested)?

@Fring Yeah Andrew brought this up as well, so he can advise a bit better. But, the requirements in the AC shouldn't affect this: Simply removing the text in AC point 3 doesn't require any translations and as for the links, those pages can be translated so also shouldn't pose a problem.

All of the content that shall be changed is to be found in the l10n strings:

  • wikibase-newitem-summary
  • wikibase-newproperty-summary
  • wikibase-newlexeme-summary
  • wikibase-shortcopyrightwarning

The hrefs themselves are defined in:

  • wikibase-label-helppage
  • wikibase-description-helppage

The best approach to implement the change heavily depends on how we want to tackle the localization issue.

Simply removing the text in AC point 3 doesn't require any translations and as for the links, those pages can be translated so also shouldn't pose a problem.

This could be done for English, but I personally would fail to do this in Dutch and probably ever other language we support. Does this mean, the ACs are only about the English locale?

Your best bet here is probably following the pattern of the `WikimediaMessages" extension
https://www.mediawiki.org/wiki/Extension:WikimediaMessages
This contains customized messages string for WMF production sites in comparison to default mediawiki and extensions..

You can then get up to date translations for all languages for your custom strings
https://translatewiki.net/wiki/Translating:New_project/en

I believe this is easiest set up on gerrit, but I have seen this happening on Github too, but probably best to just reach out to the translate wiki team

Though another thought with a wikibase perspective here would be that there should work for any wikibase out of the box and make sense, not being red links :)

The best way to move forward with this would be:

  • Do the change in the Wikibase extension as this is a. easier and b. valuable for Suite users as well
  • Add a new translation string that contains the desired copy changes
  • Add a setting in the extension that decides whether the current behavior (default) is used or if the new string is used
  • Have the new string localized in the default workflow
  • Backport the changes to Wikibase.cloud (or upgrade)
Fring removed Fring as the assignee of this task.Jul 12 2023, 10:05 AM
Fring moved this task from Doing to In Review on the Wikibase Cloud (Kanban board Q3 2023) board.
Fring subscribed.

Add a setting in the extension that decides whether the current behavior (default) is used or if the new string is used

Not sure if this is actually needed. At least some of the existing messages are overridden on Wikidata anyway, see for example: https://www.wikidata.org/wiki/Special:NewItem: there the (wikibase-newitem-summary) message has a local override at https://www.wikidata.org/wiki/MediaWiki:Wikibase-newitem-summary.
So, if you want, we could see what your proposed new copy for the messages is, and probably some or all can be changed directly in the respective en.json, maybe reducing the need for extra logic.
Hopefully that simplifies things :)

Tarrow claimed this task.