laravel-langman-gui icon indicating copy to clipboard operation
laravel-langman-gui copied to clipboard

[BUG] It should ignore backslashes

Open meness opened this issue 8 years ago • 5 comments

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.

meness avatar Apr 28 '17 10:04 meness

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?

danijelk avatar Apr 28 '17 12:04 danijelk

cannot recognize "if you're not the one" in strings

Please explain this, can't get what you mean.

themsaid avatar Apr 28 '17 14:04 themsaid

He wants this package to strip slashes from strings, but then laravels language parser wouldn't find the translation

danijelk avatar Apr 28 '17 15:04 danijelk

@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.

meness avatar Apr 28 '17 16:04 meness

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.

danijelk avatar Apr 28 '17 19:04 danijelk