Skip to content

Conversation

@mzner
Copy link
Contributor

@mzner mzner commented Sep 16, 2025

Description

Related Issue

  • Fixes <issue_link>

Motivation and Context

How Has This Been Tested?

  • test environment:
  • test case 1:
  • test case 2:
  • ...

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

Open tasks:

  • ...

@mzner mzner requested a review from LukasHirt September 16, 2025 04:54
@update-docs
Copy link

update-docs bot commented Sep 16, 2025

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@mzner mzner force-pushed the bugfix/OCISDEV-267/progress-bar-not-getting-translated-without-refresh branch from a43c01f to f4ce0dc Compare September 16, 2025 04:57
@sonarqubecloud
Copy link

Copy link
Collaborator

@LukasHirt LukasHirt left a comment

Choose a reason for hiding this comment

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

So I take it using composable for the extension was not enough? I fear this is not the right approach though.

  1. This fix would most probably apply only to this specific progress bar but wouldn't affect other ones.
  2. I think re-registering the extension point will break the system (see specific comments on the LOC).

description: $gettext('Customize your progress bar')
}
}
extensionRegistry.registerExtensionPoints(toRef([progressBarExtensionPoint]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm quite worried what re-registering extension point will do. If there are any other progress bar extensions, are they persisted or are they lost due to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good points. I have to check..I'm not sure. Do you have any other ideas in general? I couldn't come up with anything better. 🙈

Copy link
Collaborator

Choose a reason for hiding this comment

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

If the computed prop did not work, I have no other idea from top of my head. I would need to dig deeper.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the computed prop did not work, I have no other idea from top of my head. I would need to dig deeper.

Nope, it didn't work either. Already tried that. I will try to find something else and we can talk tomorrow. 👍🏻

const progressBarExtensionPoint = ref(registerProgressBarExtension())
watch(
() => $gettext('Global progress bar'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's needed to depend on the locale, wouldn't it be nicer to use current from the useGettext composable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

current is just a string, so it doesn't trigger reactivity when it changes. I thought the same, but didn't work, unfortunately. :(

() => $gettext('Global progress bar'),
() => {
extensionRegistry.unregisterExtensions([progressBarExtensionId])
extensionRegistry.unregisterExtensionPoints([progressBarExtensionPoint.value.id])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same worry as in the register function... I do not think other progress bars will survive this.

@LukasHirt
Copy link
Collaborator

Fixed in #13126

@LukasHirt
Copy link
Collaborator

Closing as the other PR has been merged.

@LukasHirt LukasHirt closed this Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants