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

Translate exercise names in search results #5274

Merged
merged 1 commit into from
Jan 9, 2024
Merged

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Jan 5, 2024

This pull request fixes exercise names appearing in the wrong language when searching through saved annotations.

  • Tests were added

Closes #5254

@jorg-vr jorg-vr added the bug Something isn't working label Jan 5, 2024
@jorg-vr jorg-vr self-assigned this Jan 5, 2024
@jorg-vr jorg-vr requested a review from a team as a code owner January 5, 2024 13:28
@jorg-vr jorg-vr requested review from bmesuere and chvp and removed request for a team January 5, 2024 13:28
@@ -34,6 +34,10 @@ class SavedAnnotationState extends State {
@stateProperty private paginationByURL = new StateMap<string, Pagination>();
@stateProperty private byId = new StateMap<number, SavedAnnotation>();

private get url(): string {
return `/${I18n.locale}${URL}`;
Copy link
Member

Choose a reason for hiding this comment

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

Can't we use I18n in a cleaner way? This is a hidden dependency which relies on a global variable being set without any fallback.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The way I18n is handled is indeed legacy.
If we change how it is used, we should probably do a refactor of all usages.

Do you want me to update all in this pr or make a new pr?

Copy link
Member

Choose a reason for hiding this comment

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

Since is has nothing to do with the rest of this fix, I think it's best done in a separate PR.

Feel free to check if there is similar technical debt we could fix.

@jorg-vr jorg-vr merged commit 320ceaf into main Jan 9, 2024
15 checks passed
@jorg-vr jorg-vr deleted the fix/translate-names branch January 9, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translate name of exercise in overview of saved annotations
3 participants