Skip to content

Conversation

q--
Copy link

@q-- q-- commented Feb 27, 2024

Decode PHP strings, so in the final JSON e.g. __('Don\'t') becomes "Don't" instead of "Don\\'t"

Steps to reproduce:

Blade file

({{ __('This is a text with an apostrophe in it; let\'s add it to my translations file!') }})

Run php artisan translation:sync-missing-translation-keys

How laravel-translation stores it in <language>.json after running that:

"This is a text with an apostrophe in it; let\\'s add it to my translations file!": "",

What it should be storing:

"This is a text with an apostrophe in it; let's add it to my translations file!": "",

Decode PHP strings, so in the final JSON e.g. __('Don\'t') becomes
"Don't" instead of "Don\\'t"
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

Successfully merging this pull request may close these issues.

2 participants