Skip to content

Commit

Permalink
group select no case sensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Oct 3, 2019
1 parent 7828238 commit 11afc40
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion v2ray_util/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '3.6.6'
__version__ = '3.6.7'

from .util_core.trans import _
Binary file modified v2ray_util/locale_i18n/zh_CH/LC_MESSAGES/lang.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions v2ray_util/locale_i18n/zh_CH/LC_MESSAGES/lang.po
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ msgstr "请输入数字来"
msgid "last group can't delete!!!"
msgstr "仅剩最后一个端口无法删除!!!"

msgid "please input group alphabet to"
msgstr "请输入节点Group字母来"
msgid "please input group to"
msgstr "请输入节点Group来"

msgid "input error, please check group"
msgstr "输入有误,请检查组"
Expand Down
5 changes: 4 additions & 1 deletion v2ray_util/util_core/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ def read_json(self):
group = self.parse_group(json_part, index, local_ip)
if group != None:
group_ascii = group_ascii + 1
group.tag = chr(group_ascii)
if group_ascii > 90:
group.tag = str(group_ascii)
else:
group.tag = chr(group_ascii)
self.group_list.append(group)

if len(self.group_list) == 0:
Expand Down
4 changes: 2 additions & 2 deletions v2ray_util/util_core/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def __init__(self, action):

def select_group(self):
print(self.profile)
choice = input("{} {}: ".format(_("please input group alphabet to"), self.action))
group_list = [x for x in self.group_list if x.tag == choice]
choice = input("{} {}: ".format(_("please input group to"), self.action))
group_list = [x for x in self.group_list if x.tag == str.upper(choice)]
if len(group_list) == 0:
print(ColorStr.red('{0} {1} {2}'.format(_("input error, please check group"), choice, _("exist"))))
self.group = None
Expand Down

0 comments on commit 11afc40

Please sign in to comment.