diff options
author | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-06-22 17:08:45 +0300 |
---|---|---|
committer | Evgeny Khramtsov <ekhramtsov@process-one.net> | 2019-06-22 17:08:45 +0300 |
commit | 00f2a736eb555206fd76b65ca32f00cb9df9f026 (patch) | |
tree | 5f3f704c329f7a5037e4dca067eb655b54810386 /src/mod_time.erl | |
parent | Change Travis OTP platform from 19.1 to 19.3 (diff) |
Improve extraction of translated strings
Now every such string MUST be encapsulated into ?T() macro.
The macro itself is defined in include/translate.hrl.
Example:
-module(foo).
-export([bar/1]).
-include("translate.hrl").
bar(Lang) ->
translate:translate(Lang, ?T("baz")).
Diffstat (limited to 'src/mod_time.erl')
-rw-r--r-- | src/mod_time.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_time.erl b/src/mod_time.erl index 1db3abe1..1355ba46 100644 --- a/src/mod_time.erl +++ b/src/mod_time.erl @@ -1,7 +1,7 @@ %%%---------------------------------------------------------------------- %%% File : mod_time.erl %%% Author : Alexey Shchepin <alexey@process-one.net> -%%% Purpose : +%%% Purpose : %%% Purpose : %%% Created : 18 Jan 2003 by Alexey Shchepin <alexey@process-one.net> %%% @@ -36,8 +36,8 @@ mod_options/1, depends/2]). -include("logger.hrl"). - -include("xmpp.hrl"). +-include("translate.hrl"). start(Host, _Opts) -> gen_iq_handler:add_iq_handler(ejabberd_local, Host, @@ -51,7 +51,7 @@ reload(_Host, _NewOpts, _OldOpts) -> ok. process_local_iq(#iq{type = set, lang = Lang} = IQ) -> - Txt = <<"Value 'set' of 'type' attribute is not allowed">>, + Txt = ?T("Value 'set' of 'type' attribute is not allowed"), xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang)); process_local_iq(#iq{type = get} = IQ) -> Now = erlang:timestamp(), |