Skip to content
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

chore(translations): Clean up unused translations #6829

Merged
merged 12 commits into from
Jun 25, 2024

Conversation

VIKTORVAV99
Copy link
Member

@VIKTORVAV99 VIKTORVAV99 commented Jun 14, 2024

Issue

We have some legacy translations that are not used anymore but still included in the language bundles which are bloating things.

Closes: AVO-322

Description

This PR adds a script to remove any key that are not in the en.json file from any of the other language files.

It removes some translations from en.json that are no longer used.

Runs the script.

Double check

  • I have run pnpx prettier@2 --write . and poetry run format in the top level directory to format my changes.

@github-actions github-actions bot added translations 🗣 javascript Pull requests that update Javascript code labels Jun 14, 2024
@@ -134,7 +132,6 @@
},
"estimated_time_slicer_average": {
"title": "Data är för närvarande uppskattad",
"pill": "Otillgänglig",
Copy link
Member Author

Choose a reason for hiding this comment

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

I wonder if we should just add this key to the en file instead?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's okay to remove for now. We should re-add this with translations from "Preliminary" in the future, English also needs this for the badges in AVO-282. I'll add some context there

@@ -132,7 +132,6 @@
},
"estimated_time_slicer_average": {
"title": "Os dados atuais são estimados",
"pill": "Indisponível",
Copy link
Member Author

Choose a reason for hiding this comment

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

Same here as for the Swedish one

@VIKTORVAV99
Copy link
Member Author

BTW this can in theory be adapted to also run in CI to block any PRs that contain unused translation keys to prevent this in the future.

Copy link
Collaborator

@tonypls tonypls left a comment

Choose a reason for hiding this comment

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

LGTM, it's a little confusing now we have two en.json, nice work all the same!

@VIKTORVAV99
Copy link
Member Author

LGTM, it's a little confusing now we have two en.json, nice work all the same!

Yeah and I think we should consider moving it directly to the API project but we can discuss that on a later point if we need to actually move it.

@VIKTORVAV99 VIKTORVAV99 enabled auto-merge (squash) June 25, 2024 10:59
@VIKTORVAV99 VIKTORVAV99 merged commit 8e7c4ff into master Jun 25, 2024
21 checks passed
@VIKTORVAV99 VIKTORVAV99 deleted the vik/script_to_sync_language_files_with_en branch June 25, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code translations 🗣
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants