From c84dea7b032b8d16ea847529e65a872da47a3cdd Mon Sep 17 00:00:00 2001 From: q-- Date: Thu, 26 Oct 2023 16:05:46 +0200 Subject: [PATCH] Fix \\ being added before ' in translations This is caused by an unnecessary call to addslashes() Resolves #67 --- src/TranslationFileTranslators/JsonArrayFileTranslator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TranslationFileTranslators/JsonArrayFileTranslator.php b/src/TranslationFileTranslators/JsonArrayFileTranslator.php index d6a26c3..9f42f90 100644 --- a/src/TranslationFileTranslators/JsonArrayFileTranslator.php +++ b/src/TranslationFileTranslators/JsonArrayFileTranslator.php @@ -36,7 +36,7 @@ public function handle($target_locale) : void $this->line('Exists Skipping -> ' . $to_be_translated . ' : ' . $translated_strings[$to_be_translated]); continue; } - $translated_strings[$to_be_translated] = addslashes(Str::apiTranslateWithAttributes($to_be_translated, $target_locale, $this->base_locale)); + $translated_strings[$to_be_translated] = Str::apiTranslateWithAttributes($to_be_translated, $target_locale, $this->base_locale); $this->line($to_be_translated . ' : ' . $translated_strings[$to_be_translated]); } $this->write_translated_strings_to_file($translated_strings, $target_locale);