plugin tickets, merge_requests: renamed "tickets" feature to "lists":
this feature is more generic than only "tickets" for technical stuff, thus the name "lists" seems more appropriate.
This commit is contained in:
parent
505e93d833
commit
b6eb5a83f5
2 changed files with 22 additions and 20 deletions
|
|
@ -15,7 +15,7 @@
|
|||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from sat.core.i18n import _
|
||||
from sat.core.i18n import _, D_
|
||||
from sat.core.constants import Const as C
|
||||
from twisted.internet import defer
|
||||
from sat.tools.common import uri
|
||||
|
|
@ -24,24 +24,26 @@ from sat.core.log import getLogger
|
|||
|
||||
log = getLogger(__name__)
|
||||
|
||||
# XXX: this plugin was formely named "tickets", thus the namespace keeps this
|
||||
# name
|
||||
APP_NS_TICKETS = "org.salut-a-toi.tickets:0"
|
||||
|
||||
PLUGIN_INFO = {
|
||||
C.PI_NAME: _("Tickets management"),
|
||||
C.PI_IMPORT_NAME: "TICKETS",
|
||||
C.PI_NAME: _("Pubsub Lists"),
|
||||
C.PI_IMPORT_NAME: "LISTS",
|
||||
C.PI_TYPE: "EXP",
|
||||
C.PI_PROTOCOLS: [],
|
||||
C.PI_DEPENDENCIES: ["XEP-0060", "XEP-0346", "XEP-0277", "IDENTITY"],
|
||||
C.PI_MAIN: "Tickets",
|
||||
C.PI_MAIN: "PubsubLists",
|
||||
C.PI_HANDLER: "no",
|
||||
C.PI_DESCRIPTION: _("""Tickets management plugin"""),
|
||||
C.PI_DESCRIPTION: _("""Pubsub lists management plugin"""),
|
||||
}
|
||||
|
||||
|
||||
class Tickets:
|
||||
class PubsubLists:
|
||||
|
||||
def __init__(self, host):
|
||||
log.info(_("Tickets plugin initialization"))
|
||||
log.info(_("Pubsub lists plugin initialization"))
|
||||
self.host = host
|
||||
self._s = self.host.plugins["XEP-0346"]
|
||||
self.namespace = self._s.getSubmittedNS(APP_NS_TICKETS)
|
||||
|
|
@ -49,7 +51,7 @@ class Tickets:
|
|||
self._p = self.host.plugins["XEP-0060"]
|
||||
self._m = self.host.plugins["XEP-0277"]
|
||||
host.bridge.addMethod(
|
||||
"ticketsGet",
|
||||
"listGet",
|
||||
".plugin",
|
||||
in_sign="ssiassa{ss}s",
|
||||
out_sign="s",
|
||||
|
|
@ -72,7 +74,7 @@ class Tickets:
|
|||
async_=True,
|
||||
)
|
||||
host.bridge.addMethod(
|
||||
"ticketSet",
|
||||
"listSet",
|
||||
".plugin",
|
||||
in_sign="ssa{sas}ssss",
|
||||
out_sign="s",
|
||||
|
|
@ -80,7 +82,7 @@ class Tickets:
|
|||
async_=True,
|
||||
)
|
||||
host.bridge.addMethod(
|
||||
"ticketsSchemaGet",
|
||||
"listSchemaGet",
|
||||
".plugin",
|
||||
in_sign="sss",
|
||||
out_sign="s",
|
||||
|
|
@ -36,7 +36,7 @@ PLUGIN_INFO = {
|
|||
C.PI_IMPORT_NAME: "MERGE_REQUESTS",
|
||||
C.PI_TYPE: "EXP",
|
||||
C.PI_PROTOCOLS: [],
|
||||
C.PI_DEPENDENCIES: ["XEP-0060", "XEP-0346", "TICKETS", "TEXT_SYNTAXES"],
|
||||
C.PI_DEPENDENCIES: ["XEP-0060", "XEP-0346", "LISTS", "TEXT_SYNTAXES"],
|
||||
C.PI_MAIN: "MergeRequests",
|
||||
C.PI_HANDLER: "no",
|
||||
C.PI_DESCRIPTION: _("""Merge requests management plugin""")
|
||||
|
|
|
|||
Loading…
Reference in a new issue