Skip to content

Abilities Explorer: Add i18n to labels.#247

Merged
dkotter merged 9 commits intoWordPress:developfrom
juanfra:tweak/abilities-i18n-labels
Feb 23, 2026
Merged

Abilities Explorer: Add i18n to labels.#247
dkotter merged 9 commits intoWordPress:developfrom
juanfra:tweak/abilities-i18n-labels

Conversation

@juanfra
Copy link
Member

@juanfra juanfra commented Feb 20, 2026

What?

Makes ability provider labels translatable by implementing a label mapping system. Also updated the badge dimensions to be in line with the badge component.

Why?

Provider labels for abilities (Plugin, Theme, Core) were hardcoded and not translatable. Since we use the keys for filtering and other logic, we need to separate the display labels from the internal keys. That's why the mapping.

How?

Added a label mapping function that translates provider keys to translatable labels.

Testing Instructions

  1. Go to the Abilities Explorer page
  2. Verify the provider labels display correctly (plugin, theme, core)
  3. If testing with another locale, confirm labels are translated
  4. Verify filtering still works correctly with the provider keys
Open WordPress Playground Preview

@github-actions
Copy link

github-actions bot commented Feb 20, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: juanfra <juanfra@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Feb 20, 2026

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 55.87%. Comparing base (32a1d80) to head (011b082).
⚠️ Report is 10 commits behind head on develop.

Files with missing lines Patch % Lines
...udes/Experiments/Abilities_Explorer/Admin_Page.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #247      +/-   ##
=============================================
+ Coverage      55.75%   55.87%   +0.11%     
- Complexity       507      509       +2     
=============================================
  Files             32       32              
  Lines           2606     2613       +7     
=============================================
+ Hits            1453     1460       +7     
  Misses          1153     1153              
Flag Coverage Δ
unit 55.87% <88.88%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@juanfra juanfra changed the title Abilities: Add i18n to labels. Abilities Explorer: Add i18n to labels. Feb 22, 2026
@jeffpaul
Copy link
Member

Explorer page continues to work as expected, so as long as @dkotter is fine with the technical changes here then I'm fine to approve/merge

@jeffpaul jeffpaul requested a review from dkotter February 23, 2026 21:28
@jeffpaul jeffpaul requested a review from dkotter February 23, 2026 22:24
Co-authored-by: Darin Kotter <darin.kotter@gmail.com>
@dkotter dkotter merged commit 36adad9 into WordPress:develop Feb 23, 2026
16 of 22 checks passed
@github-project-automation github-project-automation bot moved this from Needs review to Done in WordPress AI Planning & Roadmap Feb 23, 2026
@juanfra juanfra deleted the tweak/abilities-i18n-labels branch February 24, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants