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

fix: breadcrumbs navigation broken for non-english language #1066

Conversation

IdrisGit
Copy link
Contributor

Description

coreui/vue breadcrumbs take the name prop as the name of the component to redirect to and label to display the name in UI, since only the name prop was provided it would display that name and use that as the component name.

Since the component names are constant values in English in the Router config, it was causing a not-found issue for languages other than English. The router was not able to find components for those labels, as they were non-existent, causing the router to break.

In this change, I have added the sectionName as a constant value to be used in the name prop and i18n translation for the label prop in the breadcrumbs.

Addressed Issue

Fixes #880

Additional Details

I have used this approach as it is a good practice to keep the component and route names a constant value and only use i18n for the display label, as translations can change over time and we don't want to deal with constant updates, using constant values helps keep things organised.

Checklist

coreui/vue breadcrumbs takes name as the name the component to redirect to from the router and label to display the name in UI, since only name was provided it would display that name and use that as the component, and as the components are constant values in the Router config, it was causing not found issue

Signed-off-by: idrisGit <[email protected]>
@nscuro nscuro added defect Something isn't working backport/4.12.1 PRs to be backported to version 4.12.1 labels Oct 23, 2024
@nscuro nscuro added this to the 4.12.1 milestone Oct 23, 2024
@nscuro nscuro added the hacktoberfest-accepted Accepted Hacktoberfest contributions label Oct 23, 2024
Copy link
Member

@nscuro nscuro left a comment

Choose a reason for hiding this comment

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

Thanks!

@nscuro nscuro merged commit 11c1b8b into DependencyTrack:master Oct 23, 2024
10 checks passed
@nscuro nscuro added the hacktoberfest Issues eligible for Hacktoberfest contributions label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/4.12.1 PRs to be backported to version 4.12.1 defect Something isn't working hacktoberfest Issues eligible for Hacktoberfest contributions hacktoberfest-accepted Accepted Hacktoberfest contributions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breadcrumbs are not working if you switch language i.e. to German
2 participants