cyberwolf-studio / lingua

Integrate your Laravel translations into InertiaJS application.
MIT License
21 stars 2 forks source link

Fixes for translations with choices #7

Closed flexponsive closed 9 months ago

flexponsive commented 9 months ago

Many thanks for this useful package - a good integration of laravel translation strings has been a gap in the inertia/vue ecosystem for a long time!

I noticed that a couple of strings with choices were translated differently in the lingua package than in laravel.

To solve this problem, I added the test cases from the laravel TranslationMessageSelectorTest.php to this project. After adding the test cases, four tests were failing which are fixed in this PR:

Where the first element is the expected result for the translation of the second argument when evaluated with the count from the last argument.

mikield commented 9 months ago

Thank you for such big improvement contribution to this package 📦

With love ❤️ from Ukraine 🇺🇦