Skip to content

Conversation

@peyronth
Copy link
Contributor

@peyronth peyronth commented Apr 1, 2025

… value

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the issue with the translation function when using multiple parameters by replacing the parameter replacement logic from using indexOf to explicitly iterating over the indexes. Additionally, tests have been added to validate that multiple parameters— including duplicate values—are correctly handled.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
tests/Bones.UI.Tests/tests/plugins.test.ts Added tests to verify $tr with various formatted parameters.
src/Bones.UI/composables/useTranslations.ts Updated parameter replacement to correctly replace placeholders using loop indices.

@SchroterQuentin SchroterQuentin merged commit cd9076a into dev Apr 1, 2025
5 checks passed
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