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

unnecessary spaces when translating plurals #14

Open
hoRacy opened this issue Aug 12, 2019 · 4 comments
Open

unnecessary spaces when translating plurals #14

hoRacy opened this issue Aug 12, 2019 · 4 comments
Labels
good first issue Good for newcomers

Comments

@hoRacy
Copy link

hoRacy commented Aug 12, 2019

I notice some unnecessary spaces when translating keys for plural. This cause the incorrect handling by laravel trans_choice() function.

there is

return array (
'restaurants' => '{0} :count Restaurants | {1} :count Restaurant | [2.4] :count Restaurants | [5, *] :count Restaurants',
);

should be

return array (
'restaurants' => '{0} :count Restaurants|{1} :count Restaurant|[2.4] :count Restaurants|[5, *] :count Restaurants'
);

@tanmuhittin
Copy link
Owner

This is probably due to google translate itself. When I tried to translate hello|world to Turkish it is translated as merhaba | Dünya.

@hoRacy
Copy link
Author

hoRacy commented Sep 10, 2019

Thanks, maybe good solution is to programmatically trim spaces around "|" char?

@tanmuhittin
Copy link
Owner

What if there is spaces in the input text where these spaces should be preserved? So, comparing the spaces around | character with the input text would be a better solution.

@tanmuhittin tanmuhittin reopened this Sep 10, 2019
@tanmuhittin tanmuhittin added the good first issue Good for newcomers label Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants
@hoRacy @tanmuhittin and others