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

feat: allow array as replacements #201

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Fuzzyma
Copy link

@Fuzzyma Fuzzyma commented Feb 24, 2025

This little change in ts allows something that is already possible:

trans('Hello {0}', ['World'])

I often use this pattern because its just easier and less to remember. It also works with vue-i18n.

NOTE: I also removed the count property because I didnt see it used anywhere in the whole codebase. Let me know if that was a feature that you needed or public api and I will add it back.

I also commited the changed package-lock. Seems like the version wasnt updated there in a while

@xiCO2k
Copy link
Owner

xiCO2k commented Feb 24, 2025

Does this work on the php side?

@Fuzzyma
Copy link
Author

Fuzzyma commented Feb 24, 2025

@xiCO2k I only changed the access via javascript. No php involved at all.

Had to add back the count thing tho because its used for transChoice. Tests should pass again

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.

2 participants