laravel-langman-gui
laravel-langman-gui copied to clipboard
[BUG] It should ignore backslashes
Hi,
Langman currently doesn't ignore backslashes. It scans if you\'re not the one and cannot recognize "if you're not the one" in strings.
What if you want to have a backslash in your text? 'Hello \World' for whatever reason that would be. Why not just fix your string?
cannot recognize "if you're not the one" in strings
Please explain this, can't get what you mean.
He wants this package to strip slashes from strings, but then laravels language parser wouldn't find the translation
@danijelk I know Hello \World doesn't right! Please attention the provided example above. I use single quotation in PHP most of the time, especially for strings (i.e. __('I don\'t like it')). JSON supports double quotation, well, you would find that string in language files as "{ I don't like it": "خوشم نمیاد" }. So I didn't use a backslash in JSON files but Langman scans and searches for exact strings, I mean it exactly search for "I don\'t like it" which doesn't exist.
I do see the point, one might need to use both ' and " in a string such as _('hello " world ' "'). It's Saids call though, but you could always do a pull request to show a solution.