Skip to content

Propagate locale throughout the application#702

Merged
timja merged 1 commit intojenkinsci:mainfrom
lewisbirks:propagate-locale
May 1, 2025
Merged

Propagate locale throughout the application#702
timja merged 1 commit intojenkinsci:mainfrom
lewisbirks:propagate-locale

Conversation

@lewisbirks
Copy link
Contributor

Introduce a new context/provider object for the locale which allows it to be accessed throughout the application given that the component has been wrapped in the provider.

The MultiPipelineGraph component has been updated to make use of this rather than always using en-US as the local for the date which is being displayed. By using the users locale we can render the date in the language/format preferred by that locale.

Fixes #647

Testing done

The multi-pipeline page now has the dates in the users locale, tested in English (UK) and Japanese

English (UK)

Before

image

After

image

Japanese

Before

image

After

image

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

Signed-off-by: lewisbirks <22620804+lewisbirks@users.noreply.github.com>
@lewisbirks lewisbirks requested a review from a team as a code owner May 1, 2025 15:32
@timja timja added the bug Something isn't working label May 1, 2025
@timja timja enabled auto-merge (squash) May 1, 2025 15:41
@timja timja merged commit 11235f4 into jenkinsci:main May 1, 2025
16 of 17 checks passed
@lewisbirks lewisbirks deleted the propagate-locale branch May 1, 2025 16:00
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.

Pass user locale down for grouping of dates in stage view

2 participants