aboutsummaryrefslogtreecommitdiff
path: root/contrib/extract_translations/extract_translations.erl
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/extract_translations/extract_translations.erl')
-rw-r--r--contrib/extract_translations/extract_translations.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/contrib/extract_translations/extract_translations.erl b/contrib/extract_translations/extract_translations.erl
index 90f4ac519..97bef684c 100644
--- a/contrib/extract_translations/extract_translations.erl
+++ b/contrib/extract_translations/extract_translations.erl
@@ -91,6 +91,16 @@ parse_form(Dir, File, Form, Used) ->
{call,
_,
{remote, _, {atom, _, translate}, {atom, _, translate}},
+ [_,
+ {bin,_,
+ [{bin_element,_,
+ {string,Line,Str},
+ default,default}]}]
+ } ->
+ process_string(Dir, File, Line, Str, Used);
+ {call,
+ _,
+ {remote, _, {atom, _, translate}, {atom, _, translate}},
[_, {var, _, Name}]
} ->
case ets:lookup(vars, Name) of
@@ -281,8 +291,8 @@ build_additional_translators(List) ->
List).
print_translation(File, Line, Str, StrT) ->
- StrQ = ejabberd_regexp:greplace(Str, "\\\"", "\\\\\""),
- StrTQ = ejabberd_regexp:greplace(StrT, "\\\"", "\\\\\""),
+ StrQ = ejabberd_regexp:greplace(list_to_binary(Str), <<"\\\"">>, <<"\\\\\"">>),
+ StrTQ = ejabberd_regexp:greplace(list_to_binary(StrT), <<"\\\"">>, <<"\\\\\"">>),
io:format("#: ~s:~p~nmsgid \"~s\"~nmsgstr \"~s\"~n~n", [File, Line, StrQ, StrTQ]).
print_translation_obsolete(Str, StrT) ->