-
-
Notifications
You must be signed in to change notification settings - Fork 317
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
Fix untranslatable strings #1371
Conversation
I like the idea and intent, but I am not sure of the execution as we will also be using those strings in Php. |
|
I haven't had a look at it. I like the idea and it isa step in the right direction. It is an improvement in any case compared to what has been there before. In the long run (not this PR) we should try to replace |
Our core issue is that we always need to work with two platforms: PHP and JS. We need easy support for both. If we fully switch over to Livewire, this is easier I believe. With a quick internet search I found https://www.codeandweb.com/babeledit/tutorials/how-to-translate-your-laravel-project which looks promising. It supports pluralization etc. in any way (yes, the Russian way is supported as well). This issue probably needs to wait for a full-livewire frontend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP side LGTM.
I would love to merge this soon, but I think we should wait for #1382 |
I see that you are using echo sprintf("Weet je zeker dat je dit album wilt samenvoegen '%1$s' met het album '%2$s'?", 'test', 'test'); Leads to:
The reason being that $s is being interpolated from php variables. echo sprintf("Weet je zeker dat je dit album wilt samenvoegen '%s' met het album '%s'?", 'test', 'test');
|
While you're right, this doesn't affect us, I believe. The echo sprintf('Weet je zeker dat je dit album wilt samenvoegen \'%1$s\' met het album \'%2$s\'?', 'test', 'test'); the output is:
That's exactly how we are doing it. |
Thanks, TIL. :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP & JS side LGTM & tested.
%s
,%d
...) instead of just writing multiple strings behind each other