+2007-05-29 Mickael Remond <mickael.remond@process-one.net>
+
+ * src/mod_vcard.erl: Make services description translatable in
+ discovery (EJAB-236 - thanks to Badlop)
+ * src/mod_muc/mod_muc.erl: Likewise
+ * src/mod_irc/mod_irc.erl: Likewise
+ * src/mod_pubsub/mod_pubsub.erl: Likewise
+ * src/mod_proxy65/mod_proxy65_service.erl: Likewise
+ * src/msgs/fr.msg: Added service description translation
+
2007-05-21 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberdctl.template: Updated version of ejabberdctl (thanks
"" ->
case jlib:iq_query_info(Packet) of
#iq{type = get, xmlns = ?NS_DISCO_INFO = XMLNS,
- sub_el = SubEl} = IQ ->
+ sub_el = SubEl, lang = Lang} = IQ ->
Res = IQ#iq{type = result,
sub_el = [{xmlelement, "query",
[{"xmlns", XMLNS}],
- iq_disco()}]},
+ iq_disco(Lang)}]},
ejabberd_router:route(To,
From,
jlib:iq_to_xml(Res));
ets:delete(irc_connection, {From, Server, Host}).
-iq_disco() ->
+iq_disco(Lang) ->
[{xmlelement, "identity",
[{"category", "conference"},
{"type", "irc"},
- {"name", "IRC Transport"}], []},
+ {"name", translate:translate(Lang, "IRC Transport")}], []},
{xmlelement, "feature",
[{"var", ?NS_MUC}], []},
{xmlelement, "feature",
"iq" ->
case jlib:iq_query_info(Packet) of
#iq{type = get, xmlns = ?NS_DISCO_INFO = XMLNS,
- sub_el = _SubEl} = IQ ->
+ sub_el = _SubEl, lang = Lang} = IQ ->
Res = IQ#iq{type = result,
sub_el = [{xmlelement, "query",
[{"xmlns", XMLNS}],
- iq_disco_info()}]},
+ iq_disco_info(Lang)}]},
ejabberd_router:route(To,
From,
jlib:iq_to_xml(Res));
mnesia:transaction(F).
-iq_disco_info() ->
+iq_disco_info(Lang) ->
[{xmlelement, "identity",
[{"category", "conference"},
{"type", "text"},
- {"name", "Chatrooms"}], []},
+ {"name", translate:translate(Lang, "Chatrooms")}], []},
{xmlelement, "feature", [{"var", ?NS_MUC}], []},
{xmlelement, "feature", [{"var", ?NS_REGISTER}], []},
{xmlelement, "feature", [{"var", ?NS_VCARD}], []}].
%%%------------------------
%% disco#info request
-process_iq(_, #iq{type = get, xmlns = ?NS_DISCO_INFO} = IQ, #state{name=Name}) ->
+process_iq(_, #iq{type = get, xmlns = ?NS_DISCO_INFO, lang = Lang} = IQ, #state{name=Name}) ->
IQ#iq{type = result, sub_el =
- [{xmlelement, "query", [{"xmlns", ?NS_DISCO_INFO}], iq_disco_info(Name)}]};
+ [{xmlelement, "query", [{"xmlns", ?NS_DISCO_INFO}], iq_disco_info(Lang, Name)}]};
%% disco#items request
process_iq(_, #iq{type = get, xmlns = ?NS_DISCO_ITEMS} = IQ, _) ->
%%%-------------------------
-define(FEATURE(Feat), {xmlelement,"feature",[{"var", Feat}],[]}).
-iq_disco_info(Name) ->
+iq_disco_info(Lang, Name) ->
[{xmlelement, "identity",
[{"category", "proxy"},
{"type", "bytestreams"},
- {"name", Name}], []},
+ {"name", translate:translate(Lang, Name)}], []},
?FEATURE(?NS_DISCO_INFO),
?FEATURE(?NS_DISCO_ITEMS),
?FEATURE(?NS_VCARD),
"iq" ->
case jlib:iq_query_info(Packet) of
#iq{type = get, xmlns = ?NS_DISCO_INFO = XMLNS,
- sub_el = SubEl} = IQ ->
+ sub_el = SubEl, lang = Lang} = IQ ->
{xmlelement, _, QAttrs, _} = SubEl,
Node = xml:get_attr_s("node", QAttrs),
Res = IQ#iq{type = result,
sub_el = [{xmlelement, "query",
QAttrs,
- iq_disco_info(Node)}]},
+ iq_disco_info(Node, Lang)}]},
ejabberd_router:route(To,
From,
jlib:iq_to_xml(Res));
right, $/).
-iq_disco_info(SNode) ->
+iq_disco_info(SNode, Lang) ->
Node = string:tokens(SNode, "/"),
case Node of
[] ->
[{xmlelement, "identity",
[{"category", "pubsub"},
{"type", "generic"},
- {"name", "Publish-Subscribe"}], []},
+ {"name", translate:translate(Lang, "Publish-Subscribe")}], []},
{xmlelement, "feature", [{"var", ?NS_PUBSUB}], []},
{xmlelement, "feature", [{"var", ?NS_PUBSUB_EVENT}], []},
{xmlelement, "feature", [{"var", ?NS_PUBSUB_OWNER}], []},
From,
jlib:iq_to_xml(ResIQ))
end;
- #iq{type = Type, xmlns = ?NS_DISCO_INFO} ->
+ #iq{type = Type, xmlns = ?NS_DISCO_INFO, lang = Lang} ->
case Type of
set ->
Err = jlib:make_error_reply(
[{"category", "directory"},
{"type", "user"},
{"name",
- "vCard User Search"}],
+ translate:translate(Lang, "vCard User Search")}],
[]},
{xmlelement, "feature",
[{"var", ?NS_SEARCH}], []},
{"You need an x:data capable client to search",
"Vous avez besoin d'un client supportant x:data pour faire une recherche"}.
{"Search users in ", "Rechercher des utilisateurs "}.
-
+{"vCard User Search", "Recherche dans l'annnuaire"}.
{"Fill in fields to search for any matching Jabber User",
"Remplissez les champs pour rechercher un utilisateur Jabber"}.
{"Fill in the form to search for any matching Jabber User (Add * to the end of field to match substring)", "Remplissez le formulaire pour recherche un utilisateur Jabber (Ajouter * à la fin du champ pour chercher n'importe quelle fin de chaîne"}.
{"Send items to new subscribers", "Envoyer les anciens éléments aux nouveaux abonnés"}.
{"Only deliver notifications to available users", "Envoyer les notifications uniquement aux utilisateurs disponibles"}.
{"Specify the current subscription approver", "Définir l'utilisateur qui valide les abonnements"}.
+{"Publish-Subscribe", "Publication-Abonnement"}.
+
% mod_muc/mod_muc_log.erl
{"Chatroom configuration modified", "Configuration du salon modifiée"}.
{"Access denied by service policy", "L'accès au service est refusé"}.
{"Specified nickname is already registered", "Le pseudo demandé est déjà enregistré"}.
{"You must fill in field \"Nickname\" in the form", "Vous devez préciser le champ \"pseudo\" dans le formulaire"}.
+{"Chatrooms", "Salons de discussion"}.
+
% mod_muc/mod_muc_room.erl
{" has set the subject to: ", " a changé le sujet pour: "}.
{"If you want to specify different encodings for IRC servers, fill this list with values in format '{\"irc server\", \"encoding\"}'. By default this service use \"~s\" encoding.", "Si vous voulez préciser différents encodages pour les serveurs IRC, remplissez cette liste avec des valeurs dans le format '{\"serveur irc\", \"encodage\"}'. Par défaut ce service utilise l'encodage \"~s\"."}.
{"Example: [{\"irc.lucky.net\", \"koi8-r\"}, {\"vendetta.fef.net\", \"iso8859-1\"}].", "Exemple: [{\"irc.lucky.net\", \"koi8-r\"}, {\"vendetta.fef.net\", \"iso8859-1\"}]."}.
{"Encodings", "Encodages"}.
+{"IRC Transport", "Passerelle IRC"}.
% web/ejabberd_web_admin.erl
{"Administration", "Administration"}.
{"Shared Roster Groups", "Groupes de liste de contacts partagée"}.
{"Last Activity", "Dernière Activité"}.
+% mod_proxy65_service.erl
+{"ejabberd SOCKS5 Bytestreams module\nCopyright (c) 2003-2006 Alexey Shchepin",
+ "ejabberd SOCKS5 Bytestreams module\nCopyright (c) 2003-2006 Alexey Shchepin"}.
+
+
% Local Variables:
% mode: erlang
% End:
+
+
+