Page MenuHomePhabricator

Localize controlled vocabulary values when displaying on toolinfo cards, toolinfo detail screens, and search filters
Closed, ResolvedPublicFeature

Description

Create and use some sort of localization helper on the frontend that can replace an English source term with a localized version when an appropriate localization is available.

We store controlled vocabulary values like tool_type and the taxonomy attributes introduced by T319245: Add annotations for taxonomy v2 controlled vocabulary fields to tools API as English strings in the database and full text search index. We also have localized strings representing each controlled vocabulary value on the front end which are currently used in edit forms. FilterList.vue currently makes this substitution in its renderBucketKey method for the 'tool_type' and 'origin' facets. ToolInfo.vue does it for 'for_wikis' via the forWikiLabel helper method. We should do this localization more consistently, and if possible with more reusable components.

Event Timeline

bd808 triaged this task as Medium priority.Oct 3 2022, 11:04 PM
bd808 changed the subtype of this task from "Task" to "Feature Request".
bd808 moved this task from Backlog to Groomed/Ready on the Toolhub board.
bd808 renamed this task from Localize controlled vocabulary values when displaying on toolinfo cards and search filters to Localize controlled vocabulary values when displaying on toolinfo cards, toolinfo detail screens, and search filters.Nov 15 2022, 4:54 PM

Localization for these terms is also needed in the edit forms.

bd808 changed the task status from Open to In Progress.Nov 17 2022, 11:48 PM
bd808 claimed this task.
bd808 moved this task from Groomed/Ready to In Progress on the Toolhub board.

Change 858439 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] ui(helpers): Extract localizeEnum from FilterList.vue

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

Change 858440 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[wikimedia/toolhub@main] ui(toolinfo): Localize controlled vocabulary values

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

Change 858439 merged by jenkins-bot:

[wikimedia/toolhub@main] ui(helpers): Extract localizeEnum from FilterList.vue

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

Change 858440 merged by jenkins-bot:

[wikimedia/toolhub@main] ui(toolinfo): Localize controlled vocabulary values

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

Change 868183 had a related patch set uploaded (by BryanDavis; author: Bryan Davis):

[operations/deployment-charts@master] toolhub: bump container to 2022-12-14-185830-production

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

Change 868183 merged by jenkins-bot:

[operations/deployment-charts@master] toolhub: bump container to 2022-12-14-185830-production

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