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

string with placeholders get the placeholder replaced #22

Open
rabol opened this issue Dec 19, 2024 · 3 comments
Open

string with placeholders get the placeholder replaced #22

rabol opened this issue Dec 19, 2024 · 3 comments

Comments

@rabol
Copy link

rabol commented Dec 19, 2024

I use __() for all strings

Example:

I did a

php artisan translations:check en 

all strings was added to the lang/en.php file with NULL as the translation - I would have hoped that the translated string was the same as the key, but that's another issue :)

I then did

php artisan translations:check en --translate-missing

and the result is not as expected, e.g.

'Address: :address' => 'Address: :side5',

not sure why :address is changed to :side5 and in general all :placeholder is changed in the language file

@Bottelet
Copy link
Owner

Hi @rabol .

Null is default because it defaults to the key value in that case.

It should not translate the :address key ofc. What translation service are you using?

@rabol
Copy link
Author

rabol commented Dec 19, 2024

I'm using free_google as far as I know as that is the default.

@rabol
Copy link
Author

rabol commented Jan 12, 2025

@Bottelet Any news on this ?

Some extra observation, some is working some not

these are failing:

 'Go to page :page' => 'Go to page :base_asset2',
'Symbol :symbol Quantity to sell :symbolBalance is more than is available :availableSymbolBalance ' => 'Symbol :side1 Quantity to sell :side2 is more than is available :side3 ',
 'Welcome to :sitename' => 'Welcome to :id1',

This is working:

':symbol performance' => ':symbol performance',

All of the above was => null

before I executed

php artisan translations:check en --translate-missing

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