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

Translation string with more than two options #11

Closed
LiaraAlis opened this issue Jun 13, 2019 · 3 comments
Closed

Translation string with more than two options #11

LiaraAlis opened this issue Jun 13, 2019 · 3 comments

Comments

@LiaraAlis
Copy link

LiaraAlis commented Jun 13, 2019

Hi,

I have this string:
{1} 1 Meeting|[0,2,*] :cnt Meetings
This doesn't work with this library for the option 0, 2, * (1 works) but perfect with laravel.

My workaround is to use this: {1} 1 Meeting|:cnt Meetings

But I think it would be great if the library does the same as laravel itself.

Otherwise big thanks for this great package. :)

Best regards,
Alexander

@iamgergo
Copy link
Member

@LiaraAlis Hi,

Thanks! Unfortunately, this translation string is invalid. But sure, it works with Laravel!
Please note, based on the documentation, your translation should look like this:

{0} 0 Meetings|{1} 1 Meeting|[2,*] :cnt Meetings

But I will fix this in the JS as well! So it should not cause any problem! Thanks!

@iamgergo
Copy link
Member

@LiaraAlis So, I fixed the problem.

This is a nice fallback, so I'm very thankful for the suggestion.
I release a small tag, so you may update the package and reimport script.

Let me know if it's bugged or something else! Thanks a lot!

@LiaraAlis
Copy link
Author

Thank you for the fix. It's working. :)

Flerex pushed a commit to Flerex/i18n that referenced this issue May 7, 2020
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

No branches or pull requests

2 participants