diff options
Diffstat (limited to 'src/pubsub_subscription.erl')
-rw-r--r-- | src/pubsub_subscription.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pubsub_subscription.erl b/src/pubsub_subscription.erl index 1ce1dc73f..32a79aef5 100644 --- a/src/pubsub_subscription.erl +++ b/src/pubsub_subscription.erl @@ -38,8 +38,8 @@ read_subscription/3, write_subscription/4]). -include("pubsub.hrl"). - -include("xmpp.hrl"). +-include("translate.hrl"). -define(PUBSUB_DELIVER, <<"pubsub#deliver">>). -define(PUBSUB_DIGEST, <<"pubsub#digest">>). @@ -206,14 +206,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; @@ -224,8 +224,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. @@ -234,8 +234,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. |