25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-30 16:36:29 +01:00

Use the term 'room' instead of 'chatroom' and 'conference'

This commit is contained in:
Badlop 2010-07-30 00:06:19 +02:00
parent 59a19ca87a
commit 1a368436b4
3 changed files with 16 additions and 16 deletions

View File

@ -586,7 +586,7 @@ do_route1(Host, ServerHost, Access, HistorySize, RoomShaper,
end; end;
_ -> _ ->
Lang = exmpp_stanza:get_lang(Packet), Lang = exmpp_stanza:get_lang(Packet),
ErrText = "Conference room does not exist", ErrText = "Room does not exist",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, exmpp_stanza:error(Packet#xmlel.ns,
'item-not-found', 'item-not-found',
@ -681,7 +681,7 @@ iq_disco_info(Lang) ->
?XMLATTR('type', ?XMLATTR('type',
<<"text">>), <<"text">>),
?XMLATTR('name', ?XMLATTR('name',
translate:translate(Lang, "Chatrooms"))]}, translate:translate(Lang, "Rooms"))]},
#xmlel{ns = ?NS_DISCO_INFO, name = 'feature', attrs = #xmlel{ns = ?NS_DISCO_INFO, name = 'feature', attrs =
[?XMLATTR('var', [?XMLATTR('var',
?NS_DISCO_INFO_s)]}, ?NS_DISCO_INFO_s)]},

View File

@ -373,14 +373,14 @@ add_message_to_log(Nick1, Message, RoomJID, Opts, State) ->
RoomConfig = roomconfig_to_string(Room#room.config, Lang, FileFormat), RoomConfig = roomconfig_to_string(Room#room.config, Lang, FileFormat),
put_room_config(F, RoomConfig, Lang, FileFormat), put_room_config(F, RoomConfig, Lang, FileFormat),
io_lib:format("<font class=\"mrcm\">~s</font><br/>", io_lib:format("<font class=\"mrcm\">~s</font><br/>",
[?T("Chatroom configuration modified")]); [?T("Room configuration modified")]);
{roomconfig_change, Occupants} -> {roomconfig_change, Occupants} ->
RoomConfig = roomconfig_to_string(Room#room.config, Lang, FileFormat), RoomConfig = roomconfig_to_string(Room#room.config, Lang, FileFormat),
put_room_config(F, RoomConfig, Lang, FileFormat), put_room_config(F, RoomConfig, Lang, FileFormat),
RoomOccupants = roomoccupants_to_string(Occupants, FileFormat), RoomOccupants = roomoccupants_to_string(Occupants, FileFormat),
put_room_occupants(F, RoomOccupants, Lang, FileFormat), put_room_occupants(F, RoomOccupants, Lang, FileFormat),
io_lib:format("<font class=\"mrcm\">~s</font><br/>", io_lib:format("<font class=\"mrcm\">~s</font><br/>",
[?T("Chatroom configuration modified")]); [?T("Room configuration modified")]);
join -> join ->
io_lib:format("<font class=\"mj\">~s ~s</font><br/>", io_lib:format("<font class=\"mj\">~s ~s</font><br/>",
[Nick, ?T("joins the room")]); [Nick, ?T("joins the room")]);
@ -451,10 +451,10 @@ add_message_to_log(Nick1, Message, RoomJID, Opts, State) ->
%%---------------------------------------------------------------------- %%----------------------------------------------------------------------
%% Utilities %% Utilities
get_room_existence_string(created, Lang) -> ?T("Chatroom is created"); get_room_existence_string(created, Lang) -> ?T("Room is created");
get_room_existence_string(destroyed, Lang) -> ?T("Chatroom is destroyed"); get_room_existence_string(destroyed, Lang) -> ?T("Room is destroyed");
get_room_existence_string(started, Lang) -> ?T("Chatroom is started"); get_room_existence_string(started, Lang) -> ?T("Room is started");
get_room_existence_string(stopped, Lang) -> ?T("Chatroom is stopped"). get_room_existence_string(stopped, Lang) -> ?T("Room is stopped").
get_dateweek(Date, Lang) -> get_dateweek(Date, Lang) ->
Weekday = case calendar:day_of_the_week(Date) of Weekday = case calendar:day_of_the_week(Date) of

View File

@ -271,7 +271,7 @@ normal_state({route, From, undefined,
{next_state, normal_state, StateData} {next_state, normal_state, StateData}
end; end;
chat -> chat ->
ErrText = "It is not allowed to send private messages to the conference", ErrText = "It is not allowed to send private messages to the room",
Err = exmpp_stanza:error(Packet#xmlel.ns, Err = exmpp_stanza:error(Packet#xmlel.ns,
'not-acceptable', 'not-acceptable',
{Lang, translate:translate(Lang, ErrText)}), {Lang, translate:translate(Lang, ErrText)}),
@ -453,7 +453,7 @@ normal_state({route, From, ToNick,
_ -> _ ->
case find_jid_by_nick(ToNick, StateData) of case find_jid_by_nick(ToNick, StateData) of
false -> false ->
ErrText = "Recipient is not in the conference room", ErrText = "Recipient is not in the room",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, 'item-not-found', exmpp_stanza:error(Packet#xmlel.ns, 'item-not-found',
{Lang, translate:translate(Lang, ErrText)})), {Lang, translate:translate(Lang, ErrText)})),
@ -474,7 +474,7 @@ normal_state({route, From, ToNick,
end end
end; end;
{true, false} -> {true, false} ->
ErrText = "Only occupants are allowed to send messages to the conference", ErrText = "Only occupants are allowed to send messages to the room",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable', exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable',
{Lang, translate:translate(Lang, ErrText)})), {Lang, translate:translate(Lang, ErrText)})),
@ -513,7 +513,7 @@ normal_state({route, From, ToNick,
error -> error ->
ok; ok;
_ -> _ ->
ErrText = "Recipient is not in the conference room", ErrText = "Recipient is not in the room",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, 'item-not-found', exmpp_stanza:error(Packet#xmlel.ns, 'item-not-found',
{Lang, translate:translate(Lang, ErrText)})), {Lang, translate:translate(Lang, ErrText)})),
@ -539,7 +539,7 @@ normal_state({route, From, ToNick,
error -> error ->
ok; ok;
_ -> _ ->
ErrText = "Only occupants are allowed to send queries to the conference", ErrText = "Only occupants are allowed to send queries to the room",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable', exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable',
{Lang, translate:translate(Lang, ErrText)})), {Lang, translate:translate(Lang, ErrText)})),
@ -554,7 +554,7 @@ normal_state({route, From, ToNick,
error -> error ->
ok; ok;
_ -> _ ->
ErrText = "Queries to the conference members are not allowed in this room", ErrText = "Queries to the room members are not allowed in this room",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, 'not-allowed', exmpp_stanza:error(Packet#xmlel.ns, 'not-allowed',
{Lang, translate:translate(Lang, ErrText)})), {Lang, translate:translate(Lang, ErrText)})),
@ -878,7 +878,7 @@ process_groupchat_message(From, #xmlel{name = 'message'} = Packet,
{next_state, normal_state, StateData} {next_state, normal_state, StateData}
end; end;
false -> false ->
ErrText = "Only occupants are allowed to send messages to the conference", ErrText = "Only occupants are allowed to send messages to the room",
Err = exmpp_stanza:reply_with_error(Packet, Err = exmpp_stanza:reply_with_error(Packet,
exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable', exmpp_stanza:error(Packet#xmlel.ns, 'not-acceptable',
{Lang, translate:translate(Lang, ErrText)})), {Lang, translate:translate(Lang, ErrText)})),
@ -3666,7 +3666,7 @@ replace_subelement(#xmlel{children = Els} = El, #xmlel{name = Name} = NewSubEl)
exmpp_xml:set_children(El, Els2). exmpp_xml:set_children(El, Els2).
send_error_only_occupants(Packet, Lang, RoomJID, From) -> send_error_only_occupants(Packet, Lang, RoomJID, From) ->
ErrText = "Only occupants are allowed to send messages to the conference", ErrText = "Only occupants are allowed to send messages to the room",
Err = exmpp_stanza:reply_with_error( Err = exmpp_stanza:reply_with_error(
Packet, ?ERR(Packet, 'not-acceptable', Lang, ErrText)), Packet, ?ERR(Packet, 'not-acceptable', Lang, ErrText)),
ejabberd_router:route(RoomJID, From, Err). ejabberd_router:route(RoomJID, From, Err).