Skip to content

fix(next): add missing translations to version view #13208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

akhrarovsaid
Copy link
Contributor

What?

This PR translates the block and item label in the version view, as well as the version label in the step nav.

Why?

To appropriately translate labels in the version views.

How?

By using the TFunction from useTranslation as well as existing translation keys.

Fixes #13193
Fixes #13194

jacobsfletch
jacobsfletch previously approved these changes Jul 17, 2025
@jacobsfletch jacobsfletch changed the title fix: add missing block, item, and version translation to versions views fix(next): add missing translations to version view Jul 17, 2025
@jacobsfletch jacobsfletch enabled auto-merge (squash) July 17, 2025 16:31
auto-merge was automatically disabled July 17, 2025 17:21

Head branch was pushed to by a user without write access

@akhrarovsaid
Copy link
Contributor Author

akhrarovsaid commented Jul 17, 2025

Test was failing due to mismatched casing. An e2e locator in the versions suite was trying to find an exact "Block 01" but the translated label is "block". I changed the test to look for a lowercase label but here are some other options:

  • Change the translation of block to be capitalized and keep test the same (Might impact other tests elsewhere 'fields:block' is used).
  • Change the e2e test such that it doesn't use { exact: true }.

@jacobsfletch
Copy link
Member

An e2e locator in the versions suite was trying to find an exact "Block 01" but the translated label is "block".

Hmmmm I'm not so sure about this change then. A quick search is showing that translation is used only within the blocks field for row actions, etc. I'd rather explore how capitalization might impact these instances, and if needed, create a new translation key specifically for this. Unless there's a better way.

@akhrarovsaid
Copy link
Contributor Author

I reverted the test change and proceeded with just capitalizing the translation outright. I noticed that some translations are inconsistent across languages though, with some already being capitalized and others not. Should I correct the translations to be consistent here? Should I do the same for array items? Open to suggestions & thoughts.

@jacobsfletch
Copy link
Member

Yea I see what you mean. They should all be consistent across languages. Might want to also do the same with general:item, as now it will display item 1 (lowercase) for array rows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Versions" breadcrumb label is hardcoded in SetStepNav.tsx and not using i18n "Block" label in version diff view is hardcoded and not localized
2 participants