Skip to content

Fix hardcoded string composition with internationalizations (#5293)#5312

Merged
Bubballoo3 merged 8 commits into
masterfrom
bug-fix/hardcoded-translation-strings-5293
May 19, 2026
Merged

Fix hardcoded string composition with internationalizations (#5293)#5312
Bubballoo3 merged 8 commits into
masterfrom
bug-fix/hardcoded-translation-strings-5293

Conversation

@bstepanovski
Copy link
Copy Markdown
Contributor

Fixes #5293

  • Replaced hardcoded string compositions where internationalized strings are used to avoid antipatterns
  • Added missing translations in all locales and updated tests accordingly
  • No behavior changes, just cleanup to make translations work correctly across languages

Comment thread spec/e2e/nginx_stage_spec.rb Outdated
Comment on lines +10 to +15
before(:all) do
upload_portal_config('portal.yml')
update_ood_portal
restart_apache
restart_dex
end
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm hesitant to add this. Seems like it could cause more flakiness to be bouncing things all the time.

Copy link
Copy Markdown
Contributor

@Bubballoo3 Bubballoo3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the only open question is the modifications to the E2E tests, so you should just split that out into a separate change so we can properly discuss them

@github-project-automation github-project-automation Bot moved this from Awaiting Review to Changes Requested in PR Review Pipeline Apr 24, 2026
@bstepanovski bstepanovski requested a review from Bubballoo3 May 1, 2026 00:05
@bstepanovski
Copy link
Copy Markdown
Contributor Author

I removed the E2E changes, and it passed the failing test on the rerun attempt. I'm thinking it might have just been a flaky run all along. I removed the E2E changes so this PR is just the i18n stuff now.

Copy link
Copy Markdown
Contributor

@Bubballoo3 Bubballoo3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The content here looks good and works well. I added a few notes on the locale file, such as making sure that keys are sorted and only en.yml is changed. I also wonder if we want to remove the unused keys that this creates (batch_connect_sessions_relaunch_title for example is not used elsewhere and would probably be duplicated as dashboard.relaunch if it is ever needed in the future), but leaving them is probably the safest option for the moment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only update this file. Weekly automation will bring the other locale files up to date

Comment thread apps/dashboard/config/locales/en.yml Outdated
files_title: File browsing
page_title: "%{page} - %{site}"
page_title_with_dir: "%{page} - %{site} - %{dir}"
root: Root
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new keys should be placed in alphabetical order

@bstepanovski bstepanovski force-pushed the bug-fix/hardcoded-translation-strings-5293 branch from 38b6ddd to 92f1d37 Compare May 8, 2026 04:06
@bstepanovski bstepanovski force-pushed the bug-fix/hardcoded-translation-strings-5293 branch from 84dd3a7 to f1eaf8b Compare May 8, 2026 04:20
@bstepanovski bstepanovski requested a review from Bubballoo3 May 8, 2026 04:21
Copy link
Copy Markdown
Contributor

@Bubballoo3 Bubballoo3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@Bubballoo3 Bubballoo3 merged commit 63d4ec5 into master May 19, 2026
68 of 72 checks passed
@github-project-automation github-project-automation Bot moved this from Changes Requested to Merged/Closed in PR Review Pipeline May 19, 2026
@Bubballoo3 Bubballoo3 deleted the bug-fix/hardcoded-translation-strings-5293 branch May 19, 2026 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Merged/Closed

Development

Successfully merging this pull request may close these issues.

Don't compose strings with internationalizations

4 participants