diff options
Diffstat (limited to 'src/pubsub_subscription_sql.erl')
-rw-r--r-- | src/pubsub_subscription_sql.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pubsub_subscription_sql.erl b/src/pubsub_subscription_sql.erl index 2b60ad0b3..af31008be 100644 --- a/src/pubsub_subscription_sql.erl +++ b/src/pubsub_subscription_sql.erl @@ -34,8 +34,8 @@ get_options_xform/2, parse_options_xform/1]). -include("pubsub.hrl"). - -include("xmpp.hrl"). +-include("translate.hrl"). -define(PUBSUB_DELIVER, <<"pubsub#deliver">>). -define(PUBSUB_DIGEST, <<"pubsub#digest">>). @@ -171,14 +171,14 @@ val_xfield(digest_frequency = Opt, [Val]) -> case catch binary_to_integer(Val) of N when is_integer(N) -> N; _ -> - Txt = {<<"Value of '~s' should be integer">>, [Opt]}, - {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())} + Txt = {?T("Value of '~s' should be integer"), [Opt]}, + {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())} end; val_xfield(expire = Opt, [Val]) -> try xmpp_util:decode_timestamp(Val) catch _:{bad_timestamp, _} -> - Txt = {<<"Value of '~s' should be datetime string">>, [Opt]}, - {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())} + Txt = {?T("Value of '~s' should be datetime string"), [Opt]}, + {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())} end; val_xfield(include_body = Opt, [Val]) -> xopt_to_bool(Opt, Val); val_xfield(show_values, Vals) -> Vals; @@ -189,8 +189,8 @@ val_xfield(subscription_depth = Opt, [Depth]) -> case catch binary_to_integer(Depth) of N when is_integer(N) -> N; _ -> - Txt = {<<"Value of '~s' should be integer">>, [Opt]}, - {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())} + Txt = {?T("Value of '~s' should be integer"), [Opt]}, + {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())} end. %% Convert XForm booleans to Erlang booleans. @@ -199,8 +199,8 @@ xopt_to_bool(_, <<"1">>) -> true; xopt_to_bool(_, <<"false">>) -> false; xopt_to_bool(_, <<"true">>) -> true; xopt_to_bool(Option, _) -> - Txt = {<<"Value of '~s' should be boolean">>, [Option]}, - {error, xmpp:err_not_acceptable(Txt, ejabberd_config:get_mylang())}. + Txt = {?T("Value of '~s' should be boolean"), [Option]}, + {error, xmpp:err_not_acceptable(Txt, ejabberd_option:language())}. %% Return a field for an XForm for Key, with data filled in, if %% applicable, from Options. |