Page MenuHomePhabricator

Determine how to migrate messages from WBMI to new MediaSearch extension
Closed, ResolvedPublic


The Structured Data team is planning to extract existing code for the Media Search feature out of WikibaseMediaInfo into a separate extension (see parent task). One aspect of this will be transferring messages from WBMI to the new MediaSearch extension. This will include removing Media Search-specific messages from files in the WBMI i18n directory and adding them to the MediaSearch extension, and removing the entire i18n/api directory and all its files from WBMI and moving them to MediaSearch.

We need to coordinate this work on 2 levels:

  1. Avoid either duplicating or missing messages in production during the switch from WBMI to MediaSearch
  2. Ensure we're not creating a negative experience on

Event Timeline

AnneT created this task.Oct 23 2020, 4:18 PM

Hi @Nikerabbit, as noted in the task description, we're planning on migrating a number of messages (and some entire message files) from the WikibaseMediaInfo extension into a new extension, MediaSearch. We want to avoid disrupting things on and I was hoping to get your advice on making this transition as smooth as possible. My general plan is to merge a patch in WBMI removing the relevant messages and message files in tandem with the MediaSearch extension deployment, which will include the messages pulled from WBMI with different keys (swapping out the extension prefixes, mostly).

Is there anything we need to do differently to prevent duplicate work on, or any other concerns? For example, if we merge a patch in MediaSearch with the messages from WBMI before MediaSearch is deployed, will those messages show up on, or will that only happen post-deployment? I want to make sure we're getting the timing right.

My recommendation would be the following:

  1. (we) Synchronize with to ensure everything is up to date
  2. Copy or move all message files to MediaSearch to preserve authorship and translations in languages under threshold (if copying, WBMI syncing should be disabled temporarily).
  3. Remove messages that you do not need in MediaSearch en.json(s)
  4. (we) Synchronize with This will drop unused keys from translation files.
  5. Rename message keys
  6. (we) Synchronize with (we will perform mass rename on our own, which can take hours)
  7. Remove unused messages from WBMI (if not done earlier) and restore syncing
  8. (we) Synchronize with
  9. You can deploy now

@Raymond Can you handle this or do you need help?

@Raymond Can you handle this or do you need help?

Should be doable by me.

@AnneT Please add me as reviewer for all these patches so that I can do the necessary actions on

AnneT added a comment.Wed, Nov 18, 6:08 PM

Thanks very much for the information, @Nikerabbit and @Raymond.

FYI, it seems unlikely that we will be pursuing this separate extension for the time being. If we ever do, or if we move messages like this in the future, we will certainly follow the processes outlined here.

AnneT closed this task as Resolved.Wed, Nov 18, 6:12 PM