aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--contrib/extract_translations/extract_translations.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/extract_translations/extract_translations.erl b/contrib/extract_translations/extract_translations.erl
index 488357ba6..90f4ac519 100644
--- a/contrib/extract_translations/extract_translations.erl
+++ b/contrib/extract_translations/extract_translations.erl
@@ -281,14 +281,14 @@ build_additional_translators(List) ->
List).
print_translation(File, Line, Str, StrT) ->
- {ok, StrQ, _} = regexp:gsub(Str, "\"", "\\\""),
- {ok, StrTQ, _} = regexp:gsub(StrT, "\"", "\\\""),
+ StrQ = ejabberd_regexp:greplace(Str, "\\\"", "\\\\\""),
+ StrTQ = ejabberd_regexp:greplace(StrT, "\\\"", "\\\\\""),
io:format("#: ~s:~p~nmsgid \"~s\"~nmsgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]).
print_translation_obsolete(Str, StrT) ->
File = "unknown.erl",
Line = 1,
- {ok, StrQ, _} = regexp:gsub(Str, "\"", "\\\""),
- {ok, StrTQ, _} = regexp:gsub(StrT, "\"", "\\\""),
+ StrQ = ejabberd_regexp:greplace(Str, "\\\"", "\\\\\""),
+ StrTQ = ejabberd_regexp:greplace(StrT, "\\\"", "\\\\\""),
io:format("#: ~s:~p~n#~~ msgid \"~s\"~n#~~ msgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]).