mirror of
https://github.com/star-inc/yuuki.git
synced 2024-09-20 15:26:30 +08:00
Merge pull request #5 from star-inc/rolling
v6.5.0-alpha_RC3 from Rolling
This commit is contained in:
commit
65a4b1cd08
|
@ -2,12 +2,14 @@
|
||||||
# coding=UTF-8
|
# coding=UTF-8
|
||||||
|
|
||||||
from .en import English
|
from .en import English
|
||||||
|
from .zh_TW import Traditional_Chinese
|
||||||
|
|
||||||
class Yuuki_LangSetting:
|
class Yuuki_LangSetting:
|
||||||
def __init__(self, default):
|
def __init__(self, default):
|
||||||
self.default = default
|
self.default = default
|
||||||
self.support = {
|
self.support = {
|
||||||
"en":English
|
"en":English,
|
||||||
|
"zh-tw":Traditional_Chinese
|
||||||
}
|
}
|
||||||
|
|
||||||
def gettext(self, text, lang=None):
|
def gettext(self, text, lang=None):
|
||||||
|
|
|
@ -19,12 +19,12 @@ class English:
|
||||||
"Helllo^^\nMy name is %s ><\nNice to meet you OwO": "Helllo^^\nMy name is %s ><\nNice to meet you OwO",
|
"Helllo^^\nMy name is %s ><\nNice to meet you OwO": "Helllo^^\nMy name is %s ><\nNice to meet you OwO",
|
||||||
"Type:\n\t%s/Help\nto get more information\n\nAdmin of the Group:\n%s": "Type:\n\t%s/Help\nto get more information\n\nAdmin of the Group:\n%s",
|
"Type:\n\t%s/Help\nto get more information\n\nAdmin of the Group:\n%s": "Type:\n\t%s/Help\nto get more information\n\nAdmin of the Group:\n%s",
|
||||||
"%s\n\t%s\n\nCommands Info:\n%s\n\nPrivacy:\n%s\n\nMore Information:\n%s\n\n%s": "%s\n\t%s\n\nCommands Info:\n%s\n\nPrivacy:\n%s\n\nMore Information:\n%s\n\n%s",
|
"%s\n\t%s\n\nCommands Info:\n%s\n\nPrivacy:\n%s\n\nMore Information:\n%s\n\n%s": "%s\n\t%s\n\nCommands Info:\n%s\n\nPrivacy:\n%s\n\nMore Information:\n%s\n\n%s",
|
||||||
"URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s": "URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s",
|
"URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s": "URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s",
|
||||||
"Wrong UserID or the guy is not in Group": "Wrong UserID or the guy is not in Group",
|
"Wrong UserID or the guy is not in Group": "Wrong UserID or the guy is not in Group",
|
||||||
"Default without Initialize\nAdmin of the Group:\n%s": "Default without Initialize\nAdmin of the Group:\n%s",
|
"Default without Initialize\nAdmin of the Group:\n%s": "Default without Initialize\nAdmin of the Group:\n%s",
|
||||||
"Sorry...\nThe number of members is not satisfied (%s needed)": "Sorry...\nThe number of members is not satisfied (%s needed)",
|
"Sorry...\nThe number of members is not satisfied (%s needed)": "Sorry...\nThe number of members is not satisfied (%s needed)",
|
||||||
"Name:%s\nPicture URL:%s/%s\nStatusMessage:\n%s\nLINE System UserID:%s": "Name:%s\nPicture URL:%s/%s\nStatusMessage:\n%s\nLINE System UserID:%s",
|
"Name:%s\nPicture URL:%s/%s\nStatusMessage:\n%s\nLINE System UserID:%s": "Name:%s\nPicture URL:%s/%s\nStatusMessage:\n%s\nLINE System UserID:%s",
|
||||||
"LINE System UserID:\n": "LINE System UserID:\n",
|
"LINE System UserID:\n": "LINE System UserID:\n",
|
||||||
"DO NOT KICK, thank you ^^": "DO NOT KICK, thank you ^^",
|
"DO NOT KICK, thank you ^^": "DO NOT KICK, thank you ^^",
|
||||||
"DO NOT TOUCH THE GROUP URL SETTINGs, see you...": "DO NOT TOUCH THE GROUP URL SETTINGs, see you...",
|
"DO NOT TOUCH THE GROUP URL SETTINGs, see you...": "DO NOT TOUCH THE GROUP URL SETTINGs, see you...",
|
||||||
"Do not invite anyone...thanks": "Do not invite anyone...thanks",
|
"Do not invite anyone...thanks": "Do not invite anyone...thanks",
|
||||||
|
|
43
libs/i18n/zh_TW.py
Normal file
43
libs/i18n/zh_TW.py
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
# coding=UTF-8
|
||||||
|
"""
|
||||||
|
Star Yuuki Bot - Yuuki_i18n
|
||||||
|
~~~~~~~~~~~
|
||||||
|
This is a Language Package in SYB.
|
||||||
|
It`s belong to Star Yuuki(pYthon) Bot Project of Star Neptune Bot
|
||||||
|
|
||||||
|
The Language Package Contributor:
|
||||||
|
supersonictw <https://github.com/supersonictw>
|
||||||
|
|
||||||
|
Copyright(c) 2019 Star Inc. All Rights Reserved.
|
||||||
|
The software licensed under Mozilla Public License Version 2.0
|
||||||
|
"""
|
||||||
|
|
||||||
|
class Traditional_Chinese:
|
||||||
|
|
||||||
|
i18nText = {
|
||||||
|
"Helllo^^\nMy name is %s ><\nNice to meet you OwO": "安安^^\n我是%s呦><\n請多多指教OwO",
|
||||||
|
"Type:\n\t%s/Help\nto get more information\n\nAdmin of the Group:\n%s": "請輸入:\n\t%s/Help\n以獲得更多資訊\n\n本群組管理員為:\n%s",
|
||||||
|
"%s\n\t%s\n\nCommands Info:\n%s\n\nPrivacy:\n%s\n\nMore Information:\n%s\n\n%s": "%s\n\t%s\n\n指令資訊:\n%s\n\n隱私權政策:\n%s\n\n更多資訊:\n%s\n\n%s",
|
||||||
|
"URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s": "網址:%s\n邀請:%s\n加入:%s\n成員:%s\n\n本群組管理員為:\n%s",
|
||||||
|
"Wrong UserID or the guy is not in Group": "錯誤的用戶識別碼或這傢伙不在群組",
|
||||||
|
"Default without Initialize\nAdmin of the Group:\n%s": "使用系統預設值,並未初始化\n本群組管理員為:\n%s",
|
||||||
|
"Sorry...\nThe number of members is not satisfied (%s needed)": "抱歉...\n這個群尚未達到可安裝人數 (需要%s人)",
|
||||||
|
"Name:%s\nPicture URL:%s/%s\nStatusMessage:\n%s\nLINE System UserID:%s": "名字:%s\n頭像網址:%s/%s\n個性簽名:\n%s\nLINE用戶識別碼:%s",
|
||||||
|
"LINE System UserID:\n": "LINE用戶識別碼:\n",
|
||||||
|
"DO NOT KICK, thank you ^^": "請不要踢人,謝謝 =3=",
|
||||||
|
"DO NOT TOUCH THE GROUP URL SETTINGs, see you...": "請不要動到網址設定,再見了 0.0",
|
||||||
|
"Do not invite anyone...thanks": "請不要邀請任何人,感謝配合 OwO",
|
||||||
|
"The User(s) was in our blacklist database.": "這個臭小子在我們的黑名單中 =.=",
|
||||||
|
"You are our blacklist. Bye~": "再見了~黑名單用戶。",
|
||||||
|
"You had been blocked by our database.": "您目前已被本程序封鎖。",
|
||||||
|
"Kick Limit.": "踢人次數已達上限",
|
||||||
|
"Cancel Limit.": "取消次數已達上限",
|
||||||
|
"Testing...": "測試中...",
|
||||||
|
"Speed:\n%ss": "速度為:\n%ss",
|
||||||
|
"Bye Bye": "掰掰 ><",
|
||||||
|
"Not Found": "404 不存在 0.0...",
|
||||||
|
"Okay": " 好的",
|
||||||
|
"Exit.": "已退出",
|
||||||
|
"Added": "已增加"
|
||||||
|
}
|
|
@ -19,7 +19,7 @@ class Yuuki_Settings:
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
"name": "Yuuki",
|
"name": "Yuuki",
|
||||||
"version": "v6.5.0-alpha_RC2",
|
"version": "v6.5.0-alpha_RC3",
|
||||||
"project_url": "https://tinyurl.com/syb-yuuki",
|
"project_url": "https://tinyurl.com/syb-yuuki",
|
||||||
"man_page": "None",
|
"man_page": "None",
|
||||||
"privacy_page": "OpenSource - Licensed under MPL 2.0",
|
"privacy_page": "OpenSource - Licensed under MPL 2.0",
|
||||||
|
@ -350,7 +350,7 @@ class Yuuki:
|
||||||
elif self.YuukiConfigs["name"] + '/Version' == ncMessage.message.text:
|
elif self.YuukiConfigs["name"] + '/Version' == ncMessage.message.text:
|
||||||
self.sendText(self.sendToWho(ncMessage), self.YuukiConfigs["version"])
|
self.sendText(self.sendToWho(ncMessage), self.YuukiConfigs["version"])
|
||||||
elif self.YuukiConfigs["name"] + '/UserID' == ncMessage.message.text:
|
elif self.YuukiConfigs["name"] + '/UserID' == ncMessage.message.text:
|
||||||
self.sendText(self.sendToWho(ncMessage), _("LINE System UserID:\n") + ncMessage.message.from_)
|
self.sendText(self.sendToWho(ncMessage), _("LINE System UserID:\n") + ncMessage.message.from_)
|
||||||
elif self.YuukiConfigs["name"] + '/Speed' == ncMessage.message.text:
|
elif self.YuukiConfigs["name"] + '/Speed' == ncMessage.message.text:
|
||||||
Time1 = time.time()
|
Time1 = time.time()
|
||||||
self.sendText(self.sendToWho(ncMessage), _("Testing..."))
|
self.sendText(self.sendToWho(ncMessage), _("Testing..."))
|
||||||
|
@ -421,11 +421,11 @@ class Yuuki:
|
||||||
GroupInfo = self.client.getGroup(ncMessage.message.to)
|
GroupInfo = self.client.getGroup(ncMessage.message.to)
|
||||||
group_status = self.data.getSEGroup(ncMessage.message.to)
|
group_status = self.data.getSEGroup(ncMessage.message.to)
|
||||||
if group_status == None:
|
if group_status == None:
|
||||||
status = _("Default without Initialize\nAdmin of the Group:\n%s") % (
|
status = _("Default without Initialize\nAdmin of the Group:\n%s") % (
|
||||||
self.sybGetGroupCreator(GroupInfo).displayName,
|
self.sybGetGroupCreator(GroupInfo).displayName,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
status = _("URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s") % (
|
status = _("URL:%s\nInvite:%s\nJoin:%s\nMembers:%s\n\nAdmin of the Group:\n%s") % (
|
||||||
group_status[OpType.NOTIFIED_UPDATE_GROUP],
|
group_status[OpType.NOTIFIED_UPDATE_GROUP],
|
||||||
group_status[OpType.NOTIFIED_INVITE_INTO_GROUP],
|
group_status[OpType.NOTIFIED_INVITE_INTO_GROUP],
|
||||||
group_status[OpType.NOTIFIED_ACCEPT_GROUP_INVITATION],
|
group_status[OpType.NOTIFIED_ACCEPT_GROUP_INVITATION],
|
||||||
|
|
Loading…
Reference in a new issue