# HG changeset patch # User Matthew Wild # Date 1531484560 -3600 # Node ID 1c709e3d2e5e0bd1bee24c32209425a0d2e09594 # Parent f1b6efd5b37996780a574303973c70f739cb3fae MUC: Improve labels of all config form items diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/description.lib.lua --- a/plugins/muc/description.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/description.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -32,6 +32,7 @@ name = "muc#roomconfig_roomdesc"; type = "text-single"; label = "Description"; + desc = "A brief description of the room"; value = get_description(event.room) or ""; }); end diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/hidden.lib.lua --- a/plugins/muc/hidden.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/hidden.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -22,7 +22,8 @@ table.insert(event.form, { name = "muc#roomconfig_publicroom"; type = "boolean"; - label = "Make Room Publicly Searchable?"; + label = "Include room in public lists"; + desc = "Enable this to allow people to find the room"; value = not get_hidden(event.room); }); end, 100-5); diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/history.lib.lua --- a/plugins/muc/history.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/history.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -48,13 +48,15 @@ table.insert(event.form, { name = "muc#roomconfig_historylength"; type = "text-single"; - label = "Maximum Number of History Messages Returned by Room"; + label = "Maximum number of history messages returned by room"; + desc = "Specify the maximum number of previous messages that should be sent to users when they join the room"; value = tostring(get_historylength(event.room)); }); table.insert(event.form, { name = 'muc#roomconfig_defaulthistorymessages', type = 'text-single', - label = 'Default Number of History Messages Returned by Room', + label = 'Default number of history messages returned by room', + desc = "Specify the number of previous messages sent to new users when they join the room"; value = tostring(get_defaulthistorymessages(event.room)) }); end, 100-10); diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/language.lib.lua --- a/plugins/muc/language.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/language.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -29,8 +29,9 @@ local function add_form_option(event) table.insert(event.form, { name = "muc#roomconfig_lang"; - label = "Language tag for Room (e.g. 'en', 'de', 'fr' etc.)"; + label = "Language tag for room (e.g. 'en', 'de', 'fr' etc.)"; type = "text-single"; + desc = "Indicate the primary language spoken in this room"; value = get_language(event.room) or ""; }); end diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/members_only.lib.lua --- a/plugins/muc/members_only.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/members_only.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -64,7 +64,7 @@ event.reply:tag("feature", {var = get_members_only(event.room) and "muc_membersonly" or "muc_open"}):up(); table.insert(event.form, { name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; - label = "Allow members to invite new members?"; + label = "Allow members to invite new members"; type = "boolean"; value = not not get_allow_member_invites(event.room); }); @@ -75,13 +75,14 @@ table.insert(event.form, { name = "muc#roomconfig_membersonly"; type = "boolean"; - label = "Make Room Members-Only?"; + label = "Only allow members to join"; + desc = "Enable this to only allow access for room owners, admins and members"; value = get_members_only(event.room); }); table.insert(event.form, { name = "{http://prosody.im/protocol/muc}roomconfig_allowmemberinvites"; type = "boolean"; - label = "Allow members to invite new members?"; + label = "Allow members to invite new members"; value = get_allow_member_invites(event.room); }); end, 100-6); diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/moderated.lib.lua --- a/plugins/muc/moderated.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/moderated.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -26,7 +26,8 @@ table.insert(event.form, { name = "muc#roomconfig_moderatedroom"; type = "boolean"; - label = "Make Room Moderated?"; + label = "Moderated (require permission to speak)"; + desc = "In moderated rooms occupants must be given permission to speak by a room moderator"; value = get_moderated(event.room); }); end, 100-4); @@ -40,6 +41,8 @@ module:hook("muc-get-default-role", function(event) if event.affiliation == nil then if get_moderated(event.room) then + -- XEP-0045: + -- An implementation MAY grant voice by default to visitors in unmoderated rooms. return "visitor" end end diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/name.lib.lua --- a/plugins/muc/name.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/name.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -24,7 +24,7 @@ table.insert(event.form, { name = "muc#roomconfig_roomname"; type = "text-single"; - label = "Name"; + label = "Title"; value = event.room._data.name; }); end diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/persistent.lib.lua --- a/plugins/muc/persistent.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/persistent.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -22,7 +22,8 @@ table.insert(event.form, { name = "muc#roomconfig_persistentroom"; type = "boolean"; - label = "Make Room Persistent?"; + label = "Persistent (room should remain even when it is empty)"; + desc = "Rooms are automatically deleted when they are empty, unless this option is enabled"; value = get_persistent(event.room); }); end, 100-3); diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/request.lib.lua --- a/plugins/muc/request.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/request.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -25,16 +25,18 @@ name = "muc#jid"; type = "jid-single"; label = "User ID"; + desc = "The user's JID (address)"; }, { name = "muc#roomnick"; type = "text-single"; - label = "Room Nickname"; + label = "Room nickname"; + desc = "The user's nickname within the room"; }, { name = "muc#role"; type = "list-single"; - label = "Requested Role"; + label = "Requested role"; value = "participant"; options = { "none", @@ -47,6 +49,7 @@ name = "muc#request_allow"; type = "boolean"; label = "Grant voice to this person?"; + desc = "Specify whether this person is able to speak in a moderated room"; value = false; } }); diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/subject.lib.lua --- a/plugins/muc/subject.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/subject.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -41,7 +41,8 @@ table.insert(event.form, { name = "muc#roomconfig_changesubject"; type = "boolean"; - label = "Allow Occupants to Change Subject?"; + label = "Allow anyone to set the room's subject"; + desc = "Choose whether anyone, or only moderators, may set the room's subject"; value = get_changesubject(event.room); }); end, 100-8); diff -r f1b6efd5b379 -r 1c709e3d2e5e plugins/muc/whois.lib.lua --- a/plugins/muc/whois.lib.lua Fri Jul 13 04:52:43 2018 +0200 +++ b/plugins/muc/whois.lib.lua Fri Jul 13 13:22:40 2018 +0100 @@ -32,9 +32,9 @@ table.insert(event.form, { name = 'muc#roomconfig_whois', type = 'list-single', - label = 'Who May Discover Real JIDs?', + label = 'Addresses (JIDs) of room occupants may be viewed by:', value = { - { value = 'moderators', label = 'Moderators Only', default = whois == 'moderators' }, + { value = 'moderators', label = 'Moderators only', default = whois == 'moderators' }, { value = 'anyone', label = 'Anyone', default = whois == 'anyone' } } });