mirror of
https://github.com/studio-neptune/yuuki.git
synced 2024-09-21 00:45:57 +08:00
v6.5.1_RC2
This commit is contained in:
parent
2b8e705f08
commit
fefe1ca461
|
@ -18,7 +18,7 @@ class Yuuki_LangSetting:
|
||||||
return self.support[lang].i18nText[text]
|
return self.support[lang].i18nText[text]
|
||||||
return self.support[self.default].i18nText[text]
|
return self.support[self.default].i18nText[text]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return text + "\n\n{\n\tLanguage Package is not Work.\n\tPlease inform the Admin of the Yuuki.\n}"
|
return text + "\n\n{\n\tLanguage Package not work.\n\tPlease inform the Admin of the Yuuki.\n}"
|
||||||
|
|
||||||
def _(self, text, lang=None):
|
def _(self, text, lang=None):
|
||||||
return self.gettext(text, lang)
|
return self.gettext(text, lang)
|
||||||
|
|
|
@ -27,6 +27,7 @@ class English:
|
||||||
"LINE System UserID:\n": "LINE System UserID:\n",
|
"LINE System UserID:\n": "LINE System UserID:\n",
|
||||||
"SecurityService of %s was disable": "SecurityService of %s was disable",
|
"SecurityService of %s was disable": "SecurityService of %s was disable",
|
||||||
"DO NOT KICK, thank you ^^": "DO NOT KICK, thank you ^^",
|
"DO NOT KICK, thank you ^^": "DO NOT KICK, thank you ^^",
|
||||||
|
"Notice: Unknown command line argument(s)": "Notice: Unknown command line argument(s)",
|
||||||
"DO NOT ENABLE THE GROUP URL STATUS, see you...": "DO NOT ENABLE THE GROUP URL STATUS, see you...",
|
"DO NOT ENABLE THE GROUP URL STATUS, see you...": "DO NOT ENABLE THE GROUP URL STATUS, see you...",
|
||||||
"Do not invite anyone...thanks": "Do not invite anyone...thanks",
|
"Do not invite anyone...thanks": "Do not invite anyone...thanks",
|
||||||
"The User(s) was in our blacklist database.": "The User(s) was in our blacklist database.",
|
"The User(s) was in our blacklist database.": "The User(s) was in our blacklist database.",
|
||||||
|
@ -36,10 +37,11 @@ class English:
|
||||||
"Kick Limit.": "Kick Limit.",
|
"Kick Limit.": "Kick Limit.",
|
||||||
"Cancel Limit.": "Cancel Limit.",
|
"Cancel Limit.": "Cancel Limit.",
|
||||||
"Testing...": "Testing...",
|
"Testing...": "Testing...",
|
||||||
"Speed:\n%ss": "Speed:\n%ss",
|
"Speed:\n %s com/s": "Speed:\n %s com/s",
|
||||||
"Bye Bye": "Bye Bye",
|
"Bye Bye": "Bye Bye",
|
||||||
"Not Found": "Not Found",
|
"Not Found": "Not Found",
|
||||||
"Okay": "Okay",
|
"Okay": "Okay",
|
||||||
|
"Unknown": "Unknown",
|
||||||
"Exit.": "Exit.",
|
"Exit.": "Exit.",
|
||||||
"Added": "Added"
|
"Added": "Added"
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ class Traditional_Chinese:
|
||||||
"LINE System UserID:\n": "LINE用戶識別碼:\n",
|
"LINE System UserID:\n": "LINE用戶識別碼:\n",
|
||||||
"SecurityService of %s was disable": "%s的安全防護模式被已關閉",
|
"SecurityService of %s was disable": "%s的安全防護模式被已關閉",
|
||||||
"DO NOT KICK, thank you ^^": "請不要踢人,謝謝 =3=",
|
"DO NOT KICK, thank you ^^": "請不要踢人,謝謝 =3=",
|
||||||
|
"Notice: Unknown command line argument(s)": "提醒:未知的指令參數",
|
||||||
"DO NOT ENABLE THE GROUP URL STATUS, see you...": "請不要開啟群組網址,再見了 0.0",
|
"DO NOT ENABLE THE GROUP URL STATUS, see you...": "請不要開啟群組網址,再見了 0.0",
|
||||||
"Do not invite anyone...thanks": "請不要邀請任何人,感謝配合 OwO",
|
"Do not invite anyone...thanks": "請不要邀請任何人,感謝配合 OwO",
|
||||||
"The User(s) was in our blacklist database.": "這個臭小子在我們的黑名單中 =.=",
|
"The User(s) was in our blacklist database.": "這個臭小子在我們的黑名單中 =.=",
|
||||||
|
@ -36,10 +37,11 @@ class Traditional_Chinese:
|
||||||
"Kick Limit.": "踢人次數已達上限",
|
"Kick Limit.": "踢人次數已達上限",
|
||||||
"Cancel Limit.": "取消次數已達上限",
|
"Cancel Limit.": "取消次數已達上限",
|
||||||
"Testing...": "測試中...",
|
"Testing...": "測試中...",
|
||||||
"Speed:\n%ss": "速度為:\n%ss",
|
"Speed:\n %s com/s": "速度為:\n%s 指令/秒",
|
||||||
"Bye Bye": "掰掰 ><",
|
"Bye Bye": "掰掰 ><",
|
||||||
"Not Found": "404 不存在 0.0...",
|
"Not Found": "404 不存在 0.0...",
|
||||||
"Okay": "好的",
|
"Okay": "好的",
|
||||||
|
"Unknown": "未知",
|
||||||
"Exit.": "已退出",
|
"Exit.": "已退出",
|
||||||
"Added": "已增加"
|
"Added": "已增加"
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ class Yuuki_Settings:
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
"name": "Yuuki",
|
"name": "Yuuki",
|
||||||
"version": "v6.5.1_RC1",
|
"version": "v6.5.1_RC2",
|
||||||
"project_url": "https://tinyurl.com/syb-yuuki",
|
"project_url": "https://tinyurl.com/syb-yuuki",
|
||||||
"man_page": "https://tinyurl.com/yuuki-manual",
|
"man_page": "https://tinyurl.com/yuuki-manual",
|
||||||
"privacy_page": "OpenSource - Licensed under MPL 2.0",
|
"privacy_page": "OpenSource - Licensed under MPL 2.0",
|
||||||
|
@ -437,7 +437,7 @@ class Yuuki:
|
||||||
Time1 = time.time()
|
Time1 = time.time()
|
||||||
self.sendText(self.sendToWho(ncMessage), _("Testing..."))
|
self.sendText(self.sendToWho(ncMessage), _("Testing..."))
|
||||||
Time2 = time.time()
|
Time2 = time.time()
|
||||||
self.sendText(self.sendToWho(ncMessage), _("Speed:\n%ss") % (Time2 - Time1,))
|
self.sendText(self.sendToWho(ncMessage), _("Speed:\n %s com/s") % (Time2 - Time1,))
|
||||||
elif self.YuukiConfigs["name"] + '/SecurityMode' == msgSep[0]:
|
elif self.YuukiConfigs["name"] + '/SecurityMode' == msgSep[0]:
|
||||||
if ncMessage.message.from_ in self.Admin:
|
if ncMessage.message.from_ in self.Admin:
|
||||||
if len(msgSep) == 2:
|
if len(msgSep) == 2:
|
||||||
|
@ -458,16 +458,26 @@ class Yuuki:
|
||||||
_("SecurityService of %s was disable") % (self.YuukiConfigs["name"],))
|
_("SecurityService of %s was disable") % (self.YuukiConfigs["name"],))
|
||||||
elif ncMessage.message.from_ in GroupPrivilege:
|
elif ncMessage.message.from_ in GroupPrivilege:
|
||||||
status = []
|
status = []
|
||||||
|
unknown_msg = []
|
||||||
|
unknown_msgtext = ""
|
||||||
for code in msgSep:
|
for code in msgSep:
|
||||||
try:
|
try:
|
||||||
status.append(int(code))
|
status.append(int(code))
|
||||||
except:
|
except:
|
||||||
pass
|
unknown_msg.append(code.replace(" ", ""))
|
||||||
self.configSecurityStatus(ncMessage.message.to, status)
|
self.configSecurityStatus(ncMessage.message.to, status)
|
||||||
|
if unknown_msg != []:
|
||||||
|
for count, msg in enumerate(unknown_msg):
|
||||||
|
if count+1 == len(unknown_msg) and count != 0:
|
||||||
|
unknown_msgtext += msg
|
||||||
|
elif count != 0:
|
||||||
|
unknown_msgtext += (msg + ", ")
|
||||||
if status != []:
|
if status != []:
|
||||||
self.sendText(self.sendToWho(ncMessage), _("Okay"))
|
self.sendText(self.sendToWho(ncMessage), _("Okay"))
|
||||||
else:
|
else:
|
||||||
self.sendText(self.sendToWho(ncMessage), _("Not Found"))
|
self.sendText(self.sendToWho(ncMessage), _("Not Found"))
|
||||||
|
if unknown_msgtext != "":
|
||||||
|
self.sendText(self.sendToWho(ncMessage), _("Notice: Unknown command line argument(s)") + "\n({})".format(unknown_msgtext))
|
||||||
elif self.YuukiConfigs["name"] + '/DisableAll' == ncMessage.message.text:
|
elif self.YuukiConfigs["name"] + '/DisableAll' == ncMessage.message.text:
|
||||||
if ncMessage.message.toType == MIDType.GROUP:
|
if ncMessage.message.toType == MIDType.GROUP:
|
||||||
GroupInfo = self.getClient(self.MyMID).getGroup(ncMessage.message.to)
|
GroupInfo = self.getClient(self.MyMID).getGroup(ncMessage.message.to)
|
||||||
|
@ -511,7 +521,7 @@ class Yuuki:
|
||||||
status_added.append(member.mid)
|
status_added.append(member.mid)
|
||||||
for userId in self.data.getGroup(GroupInfo.id)["Ext_Admin"]:
|
for userId in self.data.getGroup(GroupInfo.id)["Ext_Admin"]:
|
||||||
if userId not in status_added:
|
if userId not in status_added:
|
||||||
status += "Unknown: {}\n".format(userId)
|
status += "{}: {}\n".format(_("Unknown"), userId)
|
||||||
self.sendText(self.sendToWho(ncMessage), status + _("\nExtend Administrator(s)"))
|
self.sendText(self.sendToWho(ncMessage), status + _("\nExtend Administrator(s)"))
|
||||||
else:
|
else:
|
||||||
self.sendText(self.sendToWho(ncMessage), _("Not Found"))
|
self.sendText(self.sendToWho(ncMessage), _("Not Found"))
|
||||||
|
|
Loading…
Reference in a new issue