From 019f8b3a86cc5a8a56b7000636680d7884eb085d Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Sat, 6 Apr 2024 20:51:41 +0100 Subject: [PATCH 01/30] feat: English language --- .gitignore | 2 + auto_translate.py | 121 ++ gui/components/dialog_panel.py | 8 +- gui/components/expand/arenaPriority.py | 16 +- gui/components/expand/arenaShopPriority.py | 4 +- gui/components/expand/cafeInvite.py | 33 +- gui/components/expand/createPriority.py | 6 +- gui/components/expand/eventMapConfig.py | 11 +- gui/components/expand/expandTemplate.py | 16 +- gui/components/expand/exploreConfig.py | 36 +- gui/components/expand/featureSwitch.py | 22 +- gui/components/expand/hardTaskConfig.py | 20 +- gui/components/expand/mainlinePriority.py | 22 +- gui/components/expand/otherConfig.py | 8 +- gui/components/expand/proceedPlot.py | 12 +- gui/components/expand/schedulePriority.py | 12 +- gui/components/expand/scriptConfig.py | 6 +- gui/components/expand/serverConfig.py | 16 +- gui/components/expand/shopPriority.py | 9 +- gui/components/expand/sweepCountConfig.py | 30 +- .../expand/totalForceFightPriority.py | 7 +- gui/components/template_card.py | 10 +- gui/fragments/home.py | 70 +- gui/fragments/process.py | 11 +- gui/fragments/readme.py | 12 +- gui/fragments/settings.py | 42 +- gui/fragments/switch.py | 5 +- gui/i18n/config_translation.py | 83 ++ gui/i18n/en_US.qm | Bin 0 -> 23672 bytes gui/i18n/en_US.ts | 1071 +++++++++++++++++ gui/i18n/language.py | 70 ++ gui/util/config_set.py | 20 +- i18n.pro | 30 + .../Activity Sweep Filling Description.html | 88 ++ .../Auto-Material Description.html | 104 ++ .../Common emulator adb address.html | 4 + .../Description of normal graphs.html | 173 +++ ...icult Chart Configuration Description.html | 9 + ...lue Archive game (first-use readable).html | 91 ++ .../Normal Sweeping Scanning Description.html | 68 ++ ...k force attributes required by region.html | 8 + ...ting guidelines on issues (important).html | 92 ++ window.py | 30 +- 43 files changed, 2300 insertions(+), 208 deletions(-) create mode 100644 auto_translate.py create mode 100644 gui/i18n/config_translation.py create mode 100644 gui/i18n/en_US.qm create mode 100644 gui/i18n/en_US.ts create mode 100644 gui/i18n/language.py create mode 100644 i18n.pro create mode 100644 src/descriptions_en_US/Activity Sweep Filling Description.html create mode 100644 src/descriptions_en_US/Auto-Material Description.html create mode 100644 src/descriptions_en_US/Common emulator adb address.html create mode 100644 src/descriptions_en_US/Description of normal graphs.html create mode 100644 src/descriptions_en_US/Difficult Chart Configuration Description.html create mode 100644 src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html create mode 100644 src/descriptions_en_US/Normal Sweeping Scanning Description.html create mode 100644 src/descriptions_en_US/Task force attributes required by region.html create mode 100644 src/descriptions_en_US/reporting guidelines on issues (important).html diff --git a/.gitignore b/.gitignore index dd06aa030..31e440ef0 100644 --- a/.gitignore +++ b/.gitignore @@ -23,6 +23,8 @@ !ui.png !window.py !window.spec +!i18n.pro +!auto_translate.py src/explore_task_data/__pycache__/normal_task_11.cpython-39.pyc *.pyc *.xml diff --git a/auto_translate.py b/auto_translate.py new file mode 100644 index 000000000..cd0a2171d --- /dev/null +++ b/auto_translate.py @@ -0,0 +1,121 @@ +import os +import sys +from lxml import etree +from argostranslate import package, translate +import translatehtml +import codecs + +# Load Argos Translate model +from_code = "zh" +to_code = "en" + +available_packages = package.get_available_packages() +available_package = list( + filter( + lambda x: x.from_code == from_code and x.to_code == to_code, available_packages + ) +)[0] +download_path = available_package.download() +package.install_from_path(download_path) + +# Translate +installed_languages = translate.get_installed_languages() +from_lang = list(filter(lambda x: x.code == from_code, installed_languages))[0] +to_lang = list(filter(lambda x: x.code == to_code, installed_languages))[0] + +MODEL = from_lang.get_translation(to_lang) + +def translate_to_english(text): + result = MODEL.translate(text) + print(result) + return result + +def translate_xml(input_file, output_file): + # Load the XML from a file + tree = etree.parse(input_file) + root = tree.getroot() + + # Find all 'source' tags and translate their text + for source in root.iter('source'): + source_text = source.text + translated_text = translate_to_english(source_text) + + # Find the 'translation' tag within the parent 'message' tag + translation = source.getparent().find('translation') + + # Check the 'type' attribute of the 'translation' tag + if 'type' in translation.attrib: + if translation.attrib['type'] == 'obsolete': + # Delete the parent 'message' tag if 'type' is 'obsolete' + source.getparent().getparent().remove(source.getparent()) + else: + # Update the 'translation' tag if 'type' is not 'obsolete' + translation.text = translated_text + else: + # Don't update the 'translation' tag if 'type' attribute doesn't exist + continue + + # Write the updated XML back to the file + tree.write(output_file, encoding='utf8') + + +def translate_mission_types(input_dir, output_dir): + input_path = os.path.join(input_dir, '各区域所需队伍属性.html') + output_path = os.path.join(output_dir, translate_to_english('各区域所需队伍属性') + '.html') + + translations = { + '爆发': 'Explosive', + '贯穿': 'Piercing', + '神秘': 'Mystic', + '振动': 'Sonic' + } + + with open(input_path, 'r') as f: + text = f.read() + + for original, translated in translations.items(): + text = text.replace(original, translated) + + with open(output_path, 'w') as f: + f.write(text) + + +def translate_html_files(input_dir, output_dir): + # Ensure the output directory exists + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + # Iterate over all files in the input directory + for filename in os.listdir(input_dir): + if filename == '各区域所需队伍属性.html': + translate_mission_types(input_dir, output_dir) + continue + + if filename.endswith('.html'): + # Parse the HTML file with BeautifulSoup + with codecs.open(os.path.join(input_dir, filename), 'r', 'utf-8') as f_in: + + # Translate all text in the HTML file + soup = translatehtml.translate_html(MODEL, f_in) + + # Write the translated HTML to the output directory + name, extension = os.path.splitext(filename) + output_name = f'{translate_to_english(name)}.html' + with codecs.open(os.path.join(output_dir, output_name), 'w', 'utf-8') as f_out: + f_out.write(str(soup.prettify())) + + +if __name__ == "__main__": + if len(sys.argv) != 2: + print("Usage: python auto_translate.py [gui|descriptions]") + sys.exit(1) + + mode = sys.argv[1] + + if mode == 'gui': + translate_xml("gui/i18n/en_US.ts", 'gui/i18n/en_US.ts') + elif mode == 'descriptions': + translate_html_files("src/descriptions", "src/descriptions_en_US") + else: + print("Invalid mode. Use 'gui' or 'descriptions'.") + sys.exit(1) diff --git a/gui/components/dialog_panel.py b/gui/components/dialog_panel.py index 97e28a6e3..55c8bfd54 100644 --- a/gui/components/dialog_panel.py +++ b/gui/components/dialog_panel.py @@ -7,10 +7,10 @@ class SaveSettingMessageBox(MessageBoxBase): def __init__(self, parent=None): super().__init__(parent) - self.titleLabel = SubtitleLabel('新建配置', self) + self.titleLabel = SubtitleLabel(self.tr('新建配置'), self) self.pathLineEdit = LineEdit(self) - self.pathLineEdit.setPlaceholderText('输入新建的配置名:') + self.pathLineEdit.setPlaceholderText(self.tr('输入新建的配置名:')) self.pathLineEdit.setClearButtonEnabled(True) # add widget to view layout @@ -18,8 +18,8 @@ def __init__(self, parent=None): self.viewLayout.addWidget(self.pathLineEdit) # change the text of button - self.yesButton.setText('确定') - self.cancelButton.setText('取消') + self.yesButton.setText(self.tr('确定')) + self.cancelButton.setText(self.tr('取消')) self.widget.setMinimumWidth(350) self.yesButton.setDisabled(True) diff --git a/gui/components/expand/arenaPriority.py b/gui/components/expand/arenaPriority.py index fe057db78..49f09afde 100644 --- a/gui/components/expand/arenaPriority.py +++ b/gui/components/expand/arenaPriority.py @@ -13,12 +13,12 @@ def __init__(self, parent=None, config=None): self.hBoxLayout = QVBoxLayout(self) self.lay_1 = QHBoxLayout(self) self.lay_2 = QHBoxLayout(self) - self.label_1 = QLabel('输入你需要对手比你低几级,高几级则填负数:', self) - self.label_2 = QLabel('输入你最多需要刷新几次:', self) + self.label_1 = QLabel(self.tr('输入你需要对手比你低几级,高几级则填负数:'), self) + self.label_2 = QLabel(self.tr('输入你最多需要刷新几次:'), self) self.input_1 = LineEdit(self) self.input_2 = LineEdit(self) - self.accept_1 = QPushButton('确定', self) - self.accept_2 = QPushButton('确定', self) + self.accept_1 = QPushButton(self.tr('确定'), self) + self.accept_2 = QPushButton(self.tr('确定'), self) self.level_diff = self.config.get('ArenaLevelDiff') validator_1 = QIntValidator(-50, 50) @@ -54,8 +54,8 @@ def __accept_1(self): self.config.set('ArenaLevelDiff', self.level_diff) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你需要对手比你低{self.level_diff}级', + title=self.tr('设置成功'), + content=self.tr('你需要对手比你低') + f'{self.level_diff}' + self.tr('级'), orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, @@ -68,8 +68,8 @@ def __accept_2(self, _=None): self.config.set('maxArenaRefreshTimes', self.refresh_times) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你最大刷新次数设置为:{self.refresh_times}', + title=self.tr('设置成功'), + content=self.tr('你最大刷新次数设置为:') + f'{self.refresh_times}', orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/expand/arenaShopPriority.py b/gui/components/expand/arenaShopPriority.py index 00ae9fa87..bc61613e4 100644 --- a/gui/components/expand/arenaShopPriority.py +++ b/gui/components/expand/arenaShopPriority.py @@ -18,12 +18,12 @@ def __init__(self, parent=None, config=None): self.setFixedHeight(400) self.setStyleSheet('Demo{background: white} QPushButton{padding: 5px 10px; font:15px "Microsoft YaHei"}') - self.label = QLabel('刷新次数', self) + self.label = QLabel(self.tr('刷新次数'), self) self.input = LineEdit(self) self.input.setValidator(QIntValidator(0, 3)) self.input.setText(self.config.get('TacticalChallengeShopRefreshTime')) - self.accept = QPushButton('确定', self) + self.accept = QPushButton(self.tr('确定'), self) self.boxes = [] for i in range(0, goods_count): t_cbx = CheckBox(self) diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 84cf6325c..33c8d6ffa 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -2,6 +2,8 @@ from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QVBoxLayout, QPushButton from qfluentwidgets import ComboBox, LineEdit, CheckBox +from gui.i18n.language import baasTranslator as bt + class Layout(QWidget): def __init__(self, parent=None, config=None): @@ -19,7 +21,7 @@ def __init__(self, parent=None, config=None): self.lay5 = QHBoxLayout(self) # 是否使用邀请券 self.lay6 = QHBoxLayout(self) # 是否有二号咖啡厅 - self.label_for_invitation_ticket_affection_lowest_priority = QLabel('优先邀请好感等级低学生:', self) + self.label_for_invitation_ticket_affection_lowest_priority = QLabel(self.tr('优先邀请好感等级低学生:'), self) self.invitation_ticket_affection_lowest_priority = CheckBox(self) self.invitation_ticket_affection_lowest_priority.setChecked( self.config.get('cafe_reward_lowest_affection_first')) @@ -28,14 +30,14 @@ def __init__(self, parent=None, config=None): self.lay_for_invitation_ticket_affection_lowest_priority.addWidget( self.invitation_ticket_affection_lowest_priority, 0, Qt.AlignRight) - self.label_1 = QLabel('是否要领取奖励:', self) + self.label_1 = QLabel(self.tr('是否要领取奖励:'), self) self.income_switch = CheckBox(self) self.income_switch.setChecked(self.config.get('cafe_reward_collect_hour_reward')) self.lay4.addWidget(self.label_1, 1, Qt.AlignLeft) self.lay4.addWidget(self.income_switch, 0, Qt.AlignRight) - self.label_2 = QLabel('是否使用邀请券:', self) + self.label_2 = QLabel(self.tr('是否使用邀请券:'), self) self.invite_switch = CheckBox(self) self.invite_switch.setChecked(self.config.get('cafe_reward_use_invitation_ticket')) @@ -43,26 +45,27 @@ def __init__(self, parent=None, config=None): self.lay5.addWidget(self.invite_switch, 0, Qt.AlignRight) if self.config.server_mode == 'JP': - self.label_3 = QLabel('是否有二号咖啡厅:', self) + self.label_3 = QLabel(self.tr('是否有二号咖啡厅:'), self) self.second_switch = CheckBox(self) self.second_switch.setChecked(self.config.get('cafe_reward_has_no2_cafe')) self.lay6.addWidget(self.label_3, 1, Qt.AlignLeft) self.lay6.addWidget(self.second_switch, 0, Qt.AlignRight) - self.pat_styles = ['拖动礼物'] + # self.pat_styles = [self.tr('拖动礼物')] + self.pat_styles = [bt.tr('ConfigTranslation', '拖动礼物')] self.student_name = [] - self.label1 = QLabel('列表选择你要添加邀请的学生,修改后请点击确定:', self) + self.label1 = QLabel(self.tr('列表选择你要添加邀请的学生,修改后请点击确定:'), self) for i in range(0, len(self.config.static_config['student_names'])): if self.config.static_config['student_names'][i][self.config.server_mode + '_implementation']: self.student_name.append( self.config.static_config['student_names'][i][self.config.server_mode + '_name']) self.input1 = ComboBox(self) - self.input1.addItem("添加学生") + self.input1.addItem(self.tr("添加学生")) self.input = LineEdit(self) self.input.setFixedWidth(650) - self.ac_btn = QPushButton('确定', self) + self.ac_btn = QPushButton(self.tr('确定'), self) self.favor_student1 = self.config.get('favorStudent1') self.input1.addItems(self.student_name) @@ -70,10 +73,10 @@ def __init__(self, parent=None, config=None): self.config.set('favorStudent1', self.favor_student1) self.input.setText(','.join(self.favor_student1)) - self.label2 = QLabel('选择摸头方式:', self) + self.label2 = QLabel(self.tr('选择摸头方式:'), self) self.input2 = ComboBox(self) - self.pat_style = self.config.get('patStyle') or '普通' + self.pat_style = self.config.get('patStyle') or bt.tr('ConfigTranslation', '普通') self.input2.addItems(self.pat_styles) self.input2.setText(self.pat_style) self.input2.setCurrentIndex(self.pat_styles.index(self.pat_style)) @@ -104,7 +107,7 @@ def __init__(self, parent=None, config=None): self.__init_Signals_and_Slots() def __add_student_name_in_the_last(self): - if self.input1.currentText() == '添加学生': + if self.input1.currentText() == self.tr('添加学生'): return self.favor_student1.append(self.input1.currentText()) self.favor_student1 = self.check_valid_student_names() @@ -112,7 +115,7 @@ def __add_student_name_in_the_last(self): self.input.setText(','.join(self.favor_student1)) def __add_student_name_in_the_last_second(self): - if self.input4.currentText() == '添加学生': + if self.input4.currentText() == self.tr('添加学生'): return self.favor_student2.append(self.input4.currentText()) self.favor_student2 = self.check_valid_student_names_() @@ -189,12 +192,12 @@ def Slot_for_no_2_cafe_Checkbox(self, state): sub_layout.removeItem(item) def set_buttons_for_no2_cafe(self): - self.label4 = QLabel('选择第二咖啡厅邀请的学生', self) + self.label4 = QLabel(self.tr('选择第二咖啡厅邀请的学生'), self) self.input4 = ComboBox(self) - self.input4.addItem("添加学生") + self.input4.addItem(self.tr("添加学生")) self.input_ = LineEdit(self) self.input_.setFixedWidth(650) - self.ac_btn_ = QPushButton('确定', self) + self.ac_btn_ = QPushButton(self.tr('确定'), self) self.favor_student2 = self.config.get('favorStudent2') self.input4.addItems(self.student_name) self.favor_student2 = self.check_valid_student_names_() diff --git a/gui/components/expand/createPriority.py b/gui/components/expand/createPriority.py index 46604b108..9dd225cd6 100644 --- a/gui/components/expand/createPriority.py +++ b/gui/components/expand/createPriority.py @@ -16,11 +16,11 @@ def __init__(self, parent=None, config=None): self.lay3 = QHBoxLayout(self) self.layout_for_acc_ticket = QHBoxLayout(self) - self.label = QLabel('目前制造物品优先级,排在前面的会优先选择', self) + self.label = QLabel(self.tr('目前制造物品优先级,排在前面的会优先选择'), self) self.input1 = QLabel(self) self.input2 = LineEdit(self) - self.accept = QPushButton('确定', self) - self.label_for_use_acc_ticket_check_box = QLabel('是否使用加速券', self) + self.accept = QPushButton(self.tr('确定'), self) + self.label_for_use_acc_ticket_check_box = QLabel(self.tr('是否使用加速券'), self) self.use_acc_ticket_checkbox = CheckBox(self) self.use_acc_ticket_checkbox.setChecked(self.config.get('use_acceleration_ticket')) self.use_acc_ticket_checkbox.stateChanged.connect(self.Slot_for_use_acc_ticket_check_box) diff --git a/gui/components/expand/eventMapConfig.py b/gui/components/expand/eventMapConfig.py index b6d43e680..c403b5e81 100644 --- a/gui/components/expand/eventMapConfig.py +++ b/gui/components/expand/eventMapConfig.py @@ -1,27 +1,30 @@ +from PyQt5.QtCore import QObject from .expandTemplate import TemplateLayout from ...util.common_methods import get_context_thread class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + # name it EventMapConfig to have context with same name + EventMapConfig = QObject() configItems = [ { - 'label': '推故事', + 'label': EventMapConfig.tr('推故事'), 'type': 'button', 'selection': self.activity_story }, { - 'label': '推任务', + 'label': EventMapConfig.tr('推任务'), 'type': 'button', 'selection': self.activity_mission }, { - 'label': '推挑战', + 'label': EventMapConfig.tr('推挑战'), 'type': 'button', 'selection': self.activity_challenge }, ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context='EventMapConfig') def activity_story(self): import threading diff --git a/gui/components/expand/expandTemplate.py b/gui/components/expand/expandTemplate.py index a40f00ee1..eda798195 100644 --- a/gui/components/expand/expandTemplate.py +++ b/gui/components/expand/expandTemplate.py @@ -5,6 +5,7 @@ from qfluentwidgets import ComboBox, SwitchButton, PushButton, LineEdit, InfoBar, InfoBarIcon, InfoBarPosition from functools import partial +from gui.i18n.language import baasTranslator as bt class ConfigItem: @@ -23,7 +24,7 @@ def __init__(self, **kwargs): class TemplateLayout(QWidget): patch_signal = pyqtSignal(str) - def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None, config=None): + def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None, config=None, context=None): super().__init__(parent=parent) self.config = config if isinstance(configItems[0], dict): @@ -40,7 +41,7 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None for ind, cfg in enumerate(configItems): confirmButton = None optionPanel = QHBoxLayout(self) - labelComponent = QLabel(cfg.label, self) + labelComponent = QLabel(bt.tr(context, cfg.label), self) optionPanel.addWidget(labelComponent, 0, Qt.AlignLeft) optionPanel.addStretch(1) if cfg.type == 'switch': @@ -51,19 +52,22 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None elif cfg.type == 'combo': currentKey = cfg.key inputComponent = ComboBox(self) + cfg.selection = [bt.tr(context, x) for x in cfg.selection] if context else cfg.selection inputComponent.addItems(cfg.selection) inputComponent.setCurrentIndex(cfg.selection.index(self.config.get(currentKey))) inputComponent.currentIndexChanged.connect( partial(self._commit, currentKey, inputComponent, labelComponent)) elif cfg.type == 'button': - inputComponent = PushButton('执行', self) + # impossible to translate without specifying TemplateLayout context + text = bt.tr('TemplateLayout', self.tr('执行')) + inputComponent = PushButton(text, self) inputComponent.clicked.connect(cfg.selection) elif cfg.type == 'text': currentKey = cfg.key inputComponent = LineEdit(self) inputComponent.setText(str(self.config.get(currentKey))) self.patch_signal.connect(inputComponent.setText) - confirmButton = PushButton('确定', self) + confirmButton = PushButton(self.tr('确定'), self) confirmButton.clicked.connect(partial(self._commit, currentKey, inputComponent, labelComponent)) elif cfg.type == 'label': inputComponent = QLabel(cfg.selection, self) @@ -87,8 +91,8 @@ def _commit(self, key, target, labelTarget): self.config.set(key, value) infoChanged = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'{labelTarget.text()}已经被设置为:{value}', + title=self.tr('设置成功'), + content=f'{labelTarget.text()}{bt.tr("TemplateLayout", "已经被设置为:")}{value}', orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/expand/exploreConfig.py b/gui/components/expand/exploreConfig.py index d578d8c73..0da131b09 100644 --- a/gui/components/expand/exploreConfig.py +++ b/gui/components/expand/exploreConfig.py @@ -1,4 +1,4 @@ -from PyQt5.QtCore import Qt +from PyQt5.QtCore import Qt, QObject from PyQt5.QtWidgets import QHBoxLayout, QLabel from qfluentwidgets import LineEdit, PushButton, InfoBar, InfoBarIcon, InfoBarPosition @@ -8,55 +8,56 @@ class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + ExploreConfig = QObject() self.config = config configItems = [ { - 'label': '是否手动boss战(进入关卡后暂停等待手操)', + 'label': ExploreConfig.tr('是否手动boss战(进入关卡后暂停等待手操)'), 'key': 'manual_boss', 'type': 'switch' }, { - 'label': '是否不强制打到sss(启用后跳过已通过但未sss的关卡)', + 'label': ExploreConfig.tr('是否不强制打到sss(启用后跳过已通过但未sss的关卡)'), 'key': 'explore_normal_task_force_sss', 'type': 'switch' }, { - 'label': '开启后强制打每一个指定的关卡(不管是否sss)', + 'label': ExploreConfig.tr('开启后强制打每一个指定的关卡(不管是否sss)'), 'key': 'explore_normal_task_force_each_fight', 'type': 'switch' }, { - 'label': '爆发一队', + 'label': ExploreConfig.tr('爆发一队'), 'key': 'burst1', 'selection': ['1', '2', '3', '4'], 'type': 'combo' }, { - 'label': '爆发二队', + 'label': ExploreConfig.tr('爆发二队'), 'key': 'burst2', 'selection': ['1', '2', '3', '4'], 'type': 'combo' }, { - 'label': '贯穿一队', + 'label': ExploreConfig.tr('贯穿一队'), 'key': 'pierce1', 'selection': ['1', '2', '3', '4'], 'type': 'combo' }, { - 'label': '贯穿二队', + 'label': ExploreConfig.tr('贯穿二队'), 'key': 'pierce2', 'selection': ['1', '2', '3', '4'], 'type': 'combo' }, { - 'label': '神秘一队', + 'label': ExploreConfig.tr('神秘一队'), 'key': 'mystic1', 'selection': ['1', '2', '3', '4'], 'type': 'combo' }, { - 'label': '神秘二队', + 'label': ExploreConfig.tr('神秘二队'), 'key': 'mystic2', 'selection': ['1', '2', '3', '4'], 'type': 'combo' @@ -65,27 +66,26 @@ def __init__(self, parent=None, config=None): if self.config.server_mode == 'JP' or self.config.server_mode == 'Global': configItems.extend([ { - 'label': '振动一队', + 'label': ExploreConfig.tr('振动一队'), 'key': 'shock1', 'selection': ['1', '2', '3', '4'], 'type': 'combo' }, { - 'label': '振动二队', + 'label': ExploreConfig.tr('振动二队'), 'key': 'shock2', 'selection': ['1', '2', '3', '4'], 'type': 'combo' } ]) - - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context='ExploreConfig') self.push_card = QHBoxLayout(self) self.push_card_label = QHBoxLayout(self) self.label_tip_push = QLabel( - '推图选项 请在下面填写要推的图,填写方式见-普通图自动推图说明-', self) + '' + self.tr('推图选项') + ' ' + self.tr('请在下面填写要推的图,填写方式见-普通图自动推图说明-'), self) self.input_push = LineEdit(self) - self.accept_push = PushButton('开始推图', self) + self.accept_push = PushButton(self.tr('开始推图'), self) self.input_push.setText( self.config.get('explore_normal_task_regions').__str__().replace('[', '').replace(']', '')) @@ -112,8 +112,8 @@ def _accept_push(self): value = self.input_push.text() w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你的普通关配置已经被设置为:{value},正在推普通关。', + title=self.tr('设置成功'), + content=self.tr('你的普通关配置已经被设置为:') + f'{value}' + self.tr(',正在推普通关。'), orient=Qt.Vertical, # vertical layout position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/expand/featureSwitch.py b/gui/components/expand/featureSwitch.py index ca52c2619..c28e75b44 100644 --- a/gui/components/expand/featureSwitch.py +++ b/gui/components/expand/featureSwitch.py @@ -8,6 +8,8 @@ from qfluentwidgets import CheckBox, TableWidget, LineEdit, PushButton, ComboBox import threading +from gui.i18n.language import baasTranslator as bt + class Layout(QWidget): def __init__(self, parent=None, config=None): @@ -24,20 +26,20 @@ def __init__(self, parent=None, config=None): self.vBox = QVBoxLayout(self) self.option_layout = QHBoxLayout(self) - self.all_check_box = QPushButton('全部(不)启用', self) + self.all_check_box = QPushButton(self.tr('全部(不)启用'), self) self.all_check_box.clicked.connect(self.all_check) self.option_layout.addWidget(self.all_check_box) self.option_layout.addStretch(1) - self.op_2 = PushButton('刷新执行时间', self) + self.op_2 = PushButton(self.tr('刷新执行时间'), self) self.option_layout.addWidget(self.op_2) self.op_2.clicked.connect(self._refresh) self.option_layout.addStretch(1) - self.label_3 = QLabel('排序方式:', self) + self.label_3 = QLabel(self.tr('排序方式:'), self) self.op_3 = ComboBox(self) - self.op_3.addItems(['默认排序', '按下次执行时间排序']) + self.op_3.addItems([self.tr('默认排序'), self.tr('按下次执行时间排序')]) self.op_3.currentIndexChanged.connect(self._sort) self.option_layout.addWidget(self.label_3) @@ -48,7 +50,7 @@ def __init__(self, parent=None, config=None): self.tableView.setRowCount(len(self.qLabels)) self.tableView.setColumnCount(3) self.tableView.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) - self.tableView.setHorizontalHeaderLabels(['事件', '下次刷新时间', '启用']) + self.tableView.setHorizontalHeaderLabels([self.tr('事件'), self.tr('下次刷新时间'), self.tr('启用')]) self.tableView.setColumnWidth(0, 200) self.tableView.setColumnWidth(1, 200) self.tableView.setColumnWidth(2, 50) @@ -71,7 +73,7 @@ def _init_components(self, config_list): cbx_layout.addWidget(t_cbx, 1, Qt.AlignCenter) cbx_layout.setContentsMargins(30, 0, 0, 0) cbx_wrapper.setLayout(cbx_layout) - t_ccs = QLabel(self.labels[i]) + t_ccs = QLabel(self.config.deserialize(self.labels[i])) t_ncs = LineEdit(self) t_ncs.setText(str(datetime.fromtimestamp(self.next_ticks[i]))) t_ncs.textChanged.connect(self._update_config) @@ -105,7 +107,7 @@ def _sort(self): self.tableView.setRowCount(len(temp)) self.tableView.setColumnCount(3) self.tableView.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch) - self.tableView.setHorizontalHeaderLabels(['事件', '下次刷新时间', '启用']) + self.tableView.setHorizontalHeaderLabels([self.tr('事件'), self.tr('下次刷新时间'), self.tr('启用')]) # mode 0: default, mode 1: by next_tick if self.op_3.currentIndex() == 0: @@ -115,7 +117,7 @@ def _sort(self): # Add components to table for ind, unit in enumerate(temp): - t_ccs = QLabel(unit['event_name']) + t_ccs = QLabel(bt.tr('ConfigTranslation', unit['event_name'])) self.tableView.setCellWidget(ind, 0, t_ccs) self.qLabels.append(t_ccs) @@ -142,7 +144,7 @@ def _sort(self): def _update_config(self): for i in range(len(self.enable_list)): dic = { - 'event_name': self.qLabels[i].text(), + 'event_name': self.config.serialize(self.qLabels[i].text()), 'next_tick': self.get_next_tick(self.times[i].text()), 'enabled': self.check_boxes[i].isChecked() } @@ -179,7 +181,7 @@ def _refresh_time(self): for item in changed_map: for i in range(len(self.qLabels)): - if self.qLabels[i].text() == item[0]: + if self.config.serialize(self.qLabels[i].text()) == item[0]: self.times[i].blockSignals(True) self.times[i].setText(str(datetime.fromtimestamp(item[1]))) self.times[i].blockSignals(False) diff --git a/gui/components/expand/hardTaskConfig.py b/gui/components/expand/hardTaskConfig.py index c5c18c766..0e82bdc91 100644 --- a/gui/components/expand/hardTaskConfig.py +++ b/gui/components/expand/hardTaskConfig.py @@ -1,40 +1,40 @@ -from PyQt5.QtCore import Qt +from PyQt5.QtCore import Qt, QObject from PyQt5.QtWidgets import QHBoxLayout, QLabel from qfluentwidgets import LineEdit, PushButton, InfoBar, InfoBarIcon, InfoBarPosition from .expandTemplate import TemplateLayout from ...util.common_methods import get_context_thread - class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + HardTaskConfig = QObject() configItems = [ { - 'label': '打到SSS', + 'label': HardTaskConfig.tr('打到SSS'), 'key': 'explore_hard_task_need_sss', 'type': 'switch' }, { - 'label': '拿礼物', + 'label': HardTaskConfig.tr('拿礼物'), 'key': 'explore_hard_task_need_present', 'type': 'switch' }, { - 'label': '完成成就任务', + 'label': HardTaskConfig.tr('完成成就任务'), 'key': 'explore_hard_task_need_task', 'type': 'switch' } ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context="HardTaskConfig") self.push_card = QHBoxLayout(self) self.push_card_label = QHBoxLayout(self) self.label_tip_push = QLabel( - '困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍', + self.tr('困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍'), self) self.input_push = LineEdit(self) - self.accept_push = PushButton('开始推图', self) + self.accept_push = PushButton(self.tr('开始推图'), self) self.input_push.setText(self.config.get('explore_hard_task_list')) self.input_push.setFixedWidth(700) @@ -60,8 +60,8 @@ def _accept_push(self): self.config.set('explore_hard_task_list', value) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你的困难关配置已经被设置为:{value},正在推困难关。', + title=self.tr('设置成功'), + content=self.tr('你的困难关配置已经被设置为:') + f'{value}' + self.tr(',正在推困难关。'), orient=Qt.Vertical, # vertical layout position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/expand/mainlinePriority.py b/gui/components/expand/mainlinePriority.py index 6893252c7..c84076256 100644 --- a/gui/components/expand/mainlinePriority.py +++ b/gui/components/expand/mainlinePriority.py @@ -14,17 +14,17 @@ def __init__(self, parent=None, config=None): self.lay1_hard = QHBoxLayout(self) self.lay2_hard = QHBoxLayout(self) - self.label = QLabel('普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次):', self) + self.label = QLabel(self.tr('普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次):'), self) self.input = LineEdit(self) - self.accept = QPushButton('确定', self) - self.label_hard = QLabel('困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max:', self) + self.accept = QPushButton(self.tr('确定'), self) + self.label_hard = QLabel(self.tr('困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max:'), self) self.input_hard = LineEdit(self) - self.accept_hard = QPushButton('确定', self) + self.accept_hard = QPushButton(self.tr('确定'), self) self.hard_task_combobox = ComboBox(self) self.each_student_task_number_dict = { - "根据学生添加关卡":[], - "爱丽丝宝贝": [], + self.tr("根据学生添加关卡"): [], + self.tr("爱丽丝宝贝"): [], } for i in range(0, len(self.config.static_config["hard_task_student_material"])): self.each_student_task_number_dict.setdefault(self.config.static_config["hard_task_student_material"][i][1], []) @@ -85,8 +85,8 @@ def __accept_main(self): self.config.set('mainlinePriority', input_content) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你的普通关卡已经被设置为:{input_content}', + title=self.tr('设置成功'), + content=self.tr('你的普通关卡已经被设置为:') + f'{input_content}', orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, @@ -99,8 +99,8 @@ def __accept_hard(self): self.config.set('hardPriority', input_content) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你的困难关卡已经被设置为:{input_content}', + title=self.tr('设置成功'), + content=self.tr('你的困难关卡已经被设置为:') + f'{input_content}', orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, @@ -109,7 +109,7 @@ def __accept_hard(self): w.show() def __hard_task_combobox_change(self): - if self.hard_task_combobox.currentText() == "根据学生添加关卡": + if self.hard_task_combobox.currentText() == self.tr("根据学生添加关卡"): return st = "" if self.input_hard.text() != "": diff --git a/gui/components/expand/otherConfig.py b/gui/components/expand/otherConfig.py index 3517e6b00..225038841 100644 --- a/gui/components/expand/otherConfig.py +++ b/gui/components/expand/otherConfig.py @@ -1,24 +1,26 @@ +from PyQt5.QtCore import QObject from .expandTemplate import TemplateLayout from ...util.common_methods import get_context_thread class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + OtherConfig = QObject() configItems = [ { - 'label': '一键反和谐', + 'label': OtherConfig.tr('一键反和谐'), 'type': 'button', 'selection': self.fhx, 'key': None }, { - 'label': '显示首页头图(下次启动时生效)', + 'label': OtherConfig.tr('显示首页头图(下次启动时生效)'), 'type': 'switch', 'key': 'bannerVisibility' } ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context="OtherConfig") def fhx(self): get_context_thread(self).start_fhx() diff --git a/gui/components/expand/proceedPlot.py b/gui/components/expand/proceedPlot.py index f2fec6206..a2499372c 100644 --- a/gui/components/expand/proceedPlot.py +++ b/gui/components/expand/proceedPlot.py @@ -1,36 +1,38 @@ from .expandTemplate import TemplateLayout +from PyQt5.QtCore import QObject from ...util.common_methods import get_context_thread class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + ProceedPlot = QObject() configItems = [ { - 'label': '主线剧情需要推的章节数', + 'label': ProceedPlot.tr('主线剧情需要推的章节数'), 'type': 'text', 'key': 'main_story_regions' }, { - 'label': '开始推主线剧情', + 'label': ProceedPlot.tr('开始推主线剧情'), 'type': 'button', 'selection': self.proceed_main_plot, 'key': None }, { - 'label': '开始推小组剧情', + 'label': ProceedPlot.tr('开始推小组剧情'), 'type': 'button', 'selection': self.proceed_group_plot, 'key': None }, { - 'label': '开始推支线剧情', + 'label': ProceedPlot.tr('开始推支线剧情'), 'type': 'button', 'selection': self.proceed_branch_plot, 'key': None } ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context="ProceedPlot") def proceed_main_plot(self): import threading diff --git a/gui/components/expand/schedulePriority.py b/gui/components/expand/schedulePriority.py index b7f4b5f02..74f660bb8 100644 --- a/gui/components/expand/schedulePriority.py +++ b/gui/components/expand/schedulePriority.py @@ -1,4 +1,4 @@ -from PyQt5.QtCore import Qt +from PyQt5.QtCore import Qt, QTranslator, QLocale from PyQt5.QtGui import QIntValidator from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QVBoxLayout from qfluentwidgets import LineEdit, CheckBox @@ -17,7 +17,7 @@ def __init__(self, parent=None, config=None): self.needed_levels = self.config.get('lesson_each_region_object_priority') self.check_config_validation() self.vBoxLayout = QVBoxLayout(self) - self.relationship_check_box_description = QLabel('优先做好感等级多的日程', self) + self.relationship_check_box_description = QLabel(self.tr('优先做好感等级多的日程'), self) self.relationship_check_box = CheckBox('', self) self.relationship_check_box.setChecked(self.config.get('lesson_relationship_first')) self.hBoxLayout = QHBoxLayout(self) @@ -70,7 +70,7 @@ def Slot_for_lesson_time_change(self): self.priority_list = res self.config.set('lesson_times', self.priority_list) info_widget = self.parent().parent().parent().parent().parent().parent().parent() - return notification.success('日程次数', f'日程次数设置成功为:{self.priority_list}', info_widget) + return notification.success(self.tr('日程次数'), f'{self.tr("日程次数设置成功为:")}{self.priority_list}', info_widget) def __init_Signals_and_Slots(self): self.relationship_check_box.stateChanged.connect(self.Slot_for_relationship_check_box) @@ -94,13 +94,13 @@ def __init_relationship_check_box_layout(self): def __init_region_name_layout(self): temp = QVBoxLayout(self) - temp.addWidget(QLabel("区域名称", self), 0, Qt.AlignLeft) + temp.addWidget(QLabel(self.tr("区域名称"), self), 0, Qt.AlignLeft) for i in range(0, len(self.lesson_names)): temp.addWidget(QLabel(self.lesson_names[i], self), 0, Qt.AlignLeft) self.hBoxLayout.addLayout(temp) def __init_lesson_level_layout(self): - name = ["初级", "普通", "高级", "特级"] + name = [self.tr("初级"), self.tr("普通"), self.tr("高级"), self.tr("特级")] for i in range(0, 4): temp = QVBoxLayout(self) temp.setContentsMargins(0, 5, 0, 5) @@ -112,7 +112,7 @@ def __init_lesson_level_layout(self): def __init_lesson_times_layout(self): temp = QVBoxLayout(self) - temp.addWidget(QLabel("日程次数", self), 0, Qt.AlignLeft) + temp.addWidget(QLabel(self.tr("日程次数"), self), 0, Qt.AlignLeft) for i in range(0, len(self.lesson_names)): temp.addWidget(self.lesson_time_input[i], 0, Qt.AlignLeft) self.hBoxLayout.addLayout(temp) diff --git a/gui/components/expand/scriptConfig.py b/gui/components/expand/scriptConfig.py index bf19ed742..44f931a6a 100644 --- a/gui/components/expand/scriptConfig.py +++ b/gui/components/expand/scriptConfig.py @@ -11,7 +11,7 @@ def __init__(self, parent=None, config=None): super().__init__(parent=parent) self.config = config self.info_widget = self.parent().parent().parent() - self.serverLabel = QLabel('请填写您的截图间隔:', self) + self.serverLabel = QLabel(self.tr('请填写您的截图间隔:'), self) self.screenshot_box = LineEdit(self) validator = QDoubleValidator(0.0, 65535.0, 2, self) self.screenshot_box.setValidator(validator) @@ -33,8 +33,8 @@ def _save_port(self, changed_text=None): self.config.set('screenshot_interval', changed_text) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你的截屏间隔已经被设置为:{changed_text}', + title=self.tr('设置成功'), + content=self.tr('你的截屏间隔已经被设置为:') + f'{changed_text}', orient=Qt.Vertical, # vertical layout position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/expand/serverConfig.py b/gui/components/expand/serverConfig.py index 08b46ad61..1da6f507e 100644 --- a/gui/components/expand/serverConfig.py +++ b/gui/components/expand/serverConfig.py @@ -1,3 +1,4 @@ +from PyQt5.QtCore import QObject from PyQt5.QtWidgets import QHeaderView, QTableWidgetItem from qfluentwidgets import TableWidget @@ -14,25 +15,26 @@ def get_address_from_str(st): class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + ServerConfig = QObject() configItems = [ { - 'label': '请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本', + 'label': ServerConfig.tr('请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本'), 'type': 'combo', 'key': 'server', - 'selection': ['官服', 'B服', '国际服', '日服'] + 'selection': [ServerConfig.tr('官服'), ServerConfig.tr('B服'), ServerConfig.tr('国际服'), ServerConfig.tr('日服')] }, { - 'label': '请填写您的adb端口号', + 'label': ServerConfig.tr('请填写您的adb端口号'), 'type': 'text', 'key': 'adbPort' }, { - 'label': '检测adb地址(检测目前开启的模拟器adb地址)', + 'label': ServerConfig.tr('检测adb地址(检测目前开启的模拟器adb地址)'), 'type': 'button', 'selection': self.detect_adb_addr, } ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context='ServerConfig') self.tableView = TableWidget(self) self.tableView.setFixedHeight(100) @@ -55,7 +57,7 @@ def detect_adb_addr_thread(self): import device_operation results = device_operation.autosearch() if len(results) == 0: - results = ["自动查询模拟器失败!请尝试手动输入端口"] + results = [self.tr("自动查询模拟器失败!请尝试手动输入端口")] self.tableView.setRowCount(len(results)) for i in range(len(results)): self.tableView.setItem(i, 0, QTableWidgetItem(results[i])) @@ -63,7 +65,7 @@ def detect_adb_addr_thread(self): except Exception as e: print(e) self.tableView.setRowCount(1) - self.tableView.setItem(0, 0, QTableWidgetItem("adb地址获取失败")) + self.tableView.setItem(0, 0, QTableWidgetItem(self.tr("adb地址获取失败"))) # import device_operation # results = device_operation.autosearch() diff --git a/gui/components/expand/shopPriority.py b/gui/components/expand/shopPriority.py index 81d466572..f9033096d 100644 --- a/gui/components/expand/shopPriority.py +++ b/gui/components/expand/shopPriority.py @@ -20,13 +20,13 @@ def __init__(self, parent=None, config=None): self.setFixedHeight(500) self.setStyleSheet('Demo{background: white} QPushButton{padding: 5px 10px; font:15px "Microsoft YaHei"}') - self.label = QLabel('刷新次数', self) + self.label = QLabel(self.tr('刷新次数'), self) self.label.setFixedWidth(160) self.input = LineEdit(self) self.input.setValidator(QIntValidator(0, 5)) print(self.config.get('CommonShopRefreshTime')) self.input.setText(str(self.config.get('CommonShopRefreshTime'))) - self.accept = QPushButton('确定', self) + self.accept = QPushButton(self.tr('确定'), self) self.boxes = [] for i in range(len(self.goods)): t_cbx = CheckBox(self) @@ -35,9 +35,9 @@ def __init__(self, parent=None, config=None): ccs.setFixedWidth(150) price_text = str(self.default_goods[i][1]) if self.default_goods[i][2] == 'creditpoints': - price_text += '信用点' + price_text += self.tr('信用点') else: - price_text += '青辉石' + price_text += self.tr('青辉石') price_label = QLabel(price_text, self) price_label.setFixedWidth(150) wrapper_widget = QWidget() @@ -66,4 +66,3 @@ def __accept(self, input_content=None): def __check_server(self): if len(self.config.get('CommonShopList')) != len(self.default_goods): self.config.set('CommonShopList', len(self.default_goods) * [0]) - diff --git a/gui/components/expand/sweepCountConfig.py b/gui/components/expand/sweepCountConfig.py index 28c4402ab..2e06e5f5b 100644 --- a/gui/components/expand/sweepCountConfig.py +++ b/gui/components/expand/sweepCountConfig.py @@ -1,12 +1,14 @@ +from PyQt5.QtCore import QObject from .expandTemplate import TemplateLayout class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + SweepCountConfig = QObject() sweep_label_description = { - 'CN': '各区域扫荡次数以英文逗号分隔', - 'Global': '各区域扫荡次数以英文逗号分隔,扫荡次数可以为max', - 'JP': '各区域扫荡次数以英文逗号分隔,扫荡次数可以为max', + 'CN': SweepCountConfig.tr('各区域扫荡次数以英文逗号分隔'), + 'Global': SweepCountConfig.tr('各区域扫荡次数以英文逗号分隔,扫荡次数可以为max'), + 'JP': SweepCountConfig.tr('各区域扫荡次数以英文逗号分隔,扫荡次数可以为max'), } configItems = [ { @@ -14,57 +16,57 @@ def __init__(self, parent=None, config=None): 'type': 'label' }, { - 'label': '悬赏委托扫荡', + 'label': SweepCountConfig.tr('悬赏委托扫荡'), 'type': 'text', 'key': 'rewarded_task_times' }, { - 'label': '学园交流会扫荡', + 'label': SweepCountConfig.tr('学园交流会扫荡'), 'type': 'text', 'key': 'scrimmage_times' }, { - 'label': '活动关卡扫荡关卡', + 'label': SweepCountConfig.tr('活动关卡扫荡关卡'), 'type': 'text', 'key': 'activity_sweep_task_number' }, { - 'label': '活动关卡扫荡次数', + 'label': SweepCountConfig.tr('活动关卡扫荡次数'), 'type': 'text', 'key': 'activity_sweep_times' }, { - 'label': '特殊委托扫荡', + 'label': SweepCountConfig.tr('特殊委托扫荡'), 'type': 'text', 'key': 'special_task_times' }, ] additional_items = [ { - 'label': '国服购买邀请券可在商店购买中实现', + 'label': SweepCountConfig.tr('国服购买邀请券可在商店购买中实现'), 'type': 'label' } ] if config.server_mode in ['JP', 'Global']: additional_items = [ { - 'label': '用券数目设置,下拉框选择', + 'label': SweepCountConfig.tr('用券数目设置,下拉框选择'), 'type': 'label' }, { - 'label': '悬赏委托扫荡券购买次数', + 'label': SweepCountConfig.tr('悬赏委托扫荡券购买次数'), 'type': 'combo', 'key': 'purchase_rewarded_task_ticket_times', 'selection': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', 'max'] }, { - 'label': '日程券购买次数', + 'label': SweepCountConfig.tr('日程券购买次数'), 'type': 'combo', 'key': 'purchase_lesson_ticket_times', 'selection': ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', 'max'] }, { - 'label': '学园交流会扫荡券购买次数', + 'label': SweepCountConfig.tr('学园交流会扫荡券购买次数'), 'type': 'combo', 'key': 'purchase_scrimmage_ticket_times', 'selection': ['0', '1', '2', '3', '4', 'max'] @@ -72,4 +74,4 @@ def __init__(self, parent=None, config=None): ] for item in additional_items: configItems.append(item) - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context='SweepCountConfig') diff --git a/gui/components/expand/totalForceFightPriority.py b/gui/components/expand/totalForceFightPriority.py index 9df3b7080..7a137fc37 100644 --- a/gui/components/expand/totalForceFightPriority.py +++ b/gui/components/expand/totalForceFightPriority.py @@ -9,8 +9,7 @@ def __init__(self, parent=None, config=None): self.config = config self.info_widget = self.parent() self.hBoxLayout = QHBoxLayout(self) - # self.label = QLabel('输入最高难度', self) - self.label = QLabel('最高难度', self) + self.label = QLabel(self.tr('最高难度'), self) self.input = ComboBox(self) self.difficulties = self.config.static_config['total_assault_difficulties'][self.config.server_mode] self.input.addItems(self.difficulties) @@ -33,8 +32,8 @@ def __accept(self): self.config.set('totalForceFightDifficulty', self.input.text()) w = InfoBar( icon=InfoBarIcon.SUCCESS, - title='设置成功', - content=f'你的总力战最高难度已经被设置为:{self.input.text()}', + title=self.tr('设置成功'), + content=self.tr(f'你的总力战最高难度已经被设置为:') + f'{self.input.text()}', orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/template_card.py b/gui/components/template_card.py index e54aad978..7862c1113 100644 --- a/gui/components/template_card.py +++ b/gui/components/template_card.py @@ -5,6 +5,8 @@ IndicatorPosition, LineEdit from qfluentwidgets import FluentIcon as FIF +from gui.i18n.language import baasTranslator as bt + class TemplateSettingCard(ExpandSettingCard): """ Folder list setting card """ @@ -12,7 +14,9 @@ class TemplateSettingCard(ExpandSettingCard): # statusChanged = pyqtSignal(bool) # timeChanged = pyqtSignal(str) - def __init__(self, title: str = '', content: str = None, parent=None, sub_view=None, config=None): + def __init__(self, title: str = '', content: str = None, parent=None, sub_view=None, config=None, context=None): + if context is not None: + title, content = bt.tr(context, title), bt.tr(context, content) super().__init__(FIF.CHECKBOX, title, content, parent) # Card Top Widgets # self.status_switch = SwitchButton(self.tr('Off'), self, IndicatorPosition.RIGHT) @@ -56,7 +60,9 @@ def setChecked(self, isChecked: bool): class SimpleSettingCard(ExpandSettingCard): """ Folder list setting card """ - def __init__(self, sub_view, title: str = '', content: str = None, parent=None, config=None): + def __init__(self, sub_view, title: str = '', content: str = None, parent=None, config=None, context=None): + if context is not None: + title, content = bt.tr(context, title), bt.tr(context, content) super().__init__(FIF.CHECKBOX, title, content, parent) self.expand_view = sub_view.Layout(self, config) self._adjustViewSize() diff --git a/gui/fragments/home.py b/gui/fragments/home.py index 80976ca52..e4f307930 100644 --- a/gui/fragments/home.py +++ b/gui/fragments/home.py @@ -16,8 +16,10 @@ ) from core.notification import notify +from gui.i18n.language import baasTranslator as bt from window import Window + MAIN_BANNER = 'gui/assets/banner_home_bg.png' @@ -48,10 +50,10 @@ def __init__(self, parent: Window = None, config=None): self.info_box.setFixedHeight(45) self.infoLayout = QHBoxLayout(self.info_box) - title = f'蔚蓝档案自动脚本 {self.config.get("name")}' + title = self.tr("蔚蓝档案自动脚本") + f' {self.config.get("name")}' self.banner_visible = self.config.get('bannerVisibility') self.label = SubtitleLabel(title, self) - self.info = SubtitleLabel('无任务', self) + self.info = SubtitleLabel(self.tr('无任务'), self) setFont(self.label, 24) setFont(self.info, 24) @@ -72,7 +74,7 @@ def __init__(self, parent: Window = None, config=None): self.tr('启动'), FIF.CARE_RIGHT_SOLID, self.tr('档案,启动'), - '开始你的档案之旅', + self.tr('开始你的档案之旅'), self ) @@ -112,9 +114,9 @@ def call_update(self, parent=None): with open('./config/' + self.config.config_dir + '/display.json', 'r', encoding='utf-8') as f: config = json.load(f) if config['running'] is None or config['running'] == 'Empty': - self.info.setText('无任务') + self.info.setText(self.tr('无任务')) else: - self.info.setText('正在运行:' + config['running']) + self.info.setText(self.tr('正在运行:') + f" {bt.tr('ConfigTranslation', config['running'])}") if parent: parent.call_update() except JSONDecodeError: @@ -122,8 +124,9 @@ def call_update(self, parent=None): print("Empty JSON data") def set_button_state(self, state): + state = bt.tr('MainThread', state) self.startup_card.button.setText(state) - self._main_thread_attach.running = True if state == "停止" else False + self._main_thread_attach.running = True if state == bt.tr("MainThread", "停止") else False def __initLayout(self): self.expandLayout.setSpacing(28) @@ -176,7 +179,7 @@ def __init__(self): def run(self): self.running = True - self.display('停止') + self.display(self.tr("停止")) self._init_script() self._main_thread.logger.info("Starting Blue Archive Auto Script...") self._main_thread.send('start') @@ -185,7 +188,7 @@ def stop_play(self): self.running = False if self._main_thread is None: return - self.display('启动') + self.display(self.tr("启动")) self._main_thread.send('stop') self.exit(0) @@ -202,68 +205,67 @@ def display(self, text): def start_hard_task(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'explore_hard_task'): - notify(title='BAAS', body='困难图推图已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('困难图推图已完成')) + self.display(self.tr("启动")) def start_normal_task(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'explore_normal_task'): - notify(title='BAAS', body='普通图推图已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('普通图推图已完成')) + self.display(self.tr("启动")) def start_fhx(self): self._init_script() if self._main_thread.send('solve', 'de_clothes'): - notify(title='BAAS', body='反和谐成功,请重启BA下载资源') + notify(title='BAAS', body=self.tr('反和谐成功,请重启BA下载资源')) def start_main_story(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'main_story'): if self._main_thread.flag_run: - notify(title='BAAS', body='主线剧情已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('主线剧情已完成')) + self.display(self.tr("启动")) def start_group_story(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'group_story'): if self._main_thread.flag_run: - notify(title='BAAS', body='小组剧情已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('小组剧情已完成')) + self.display(self.tr("启动")) def start_mini_story(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'mini_story'): if self._main_thread.flag_run: - notify(title='BAAS', body='支线剧情已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('支线剧情已完成')) + self.display(self.tr("启动")) def start_explore_activity_story(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'explore_activity_story'): if self._main_thread.flag_run: - notify(title='BAAS', body='活动剧情已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('活动剧情已完成')) + self.display(self.tr("启动")) def start_explore_activity_mission(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'explore_activity_mission'): if self._main_thread.flag_run: - notify(title='BAAS', body='活动任务已完成') - self.display('启动') + notify(title='BAAS', body=self.tr('活动任务已完成')) + self.display(self.tr("启动")) def start_explore_activity_challenge(self): self._init_script() - self.display('停止') + self.display(self.tr("停止")) if self._main_thread.send('solve', 'explore_activity_challenge'): if self._main_thread.flag_run: - notify(title='BAAS', body='活动挑战推图已完成') - self.display('启动') - + notify(title='BAAS', body=self.tr('活动挑战推图已完成')) + self.display(self.tr("启动")) diff --git a/gui/fragments/process.py b/gui/fragments/process.py index 206e055c0..0457fa408 100644 --- a/gui/fragments/process.py +++ b/gui/fragments/process.py @@ -9,6 +9,9 @@ from PyQt5.QtWidgets import QWidget from qfluentwidgets import (ExpandLayout, ScrollArea, TitleLabel, SubtitleLabel, ListWidget, StrongBodyLabel) +from gui.i18n.language import baasTranslator as bt + + lock = threading.Lock() DISPLAY_CONFIG_PATH = './config/display.json' @@ -42,15 +45,15 @@ def refresh_status(self): with open(DISPLAY_CONFIG_PATH, 'r', encoding='utf-8') as f: _event_display = json.load(f) if _event_display['running'] is not None: - self.on_status.setText(_event_display['running']) + self.on_status.setText(bt.tr('ConfigTranslation', _event_display['running'])) else: - self.on_status.setText("暂无正在执行的任务") + self.on_status.setText(self.tr("暂无正在执行的任务")) if _event_display['queue'] is not None: self.listWidget.clear() - self.listWidget.addItems(_event_display['queue']) + self.listWidget.addItems(bt.tr('ConfigTranslation', _event_display['queue'])) else: self.listWidget.clear() - self.listWidget.addItems(["暂无队列中的任务"]) + self.listWidget.addItems([self.tr("暂无队列中的任务")]) time.sleep(2) def __initLayout(self): diff --git a/gui/fragments/readme.py b/gui/fragments/readme.py index a6e916a38..2a07c99cc 100644 --- a/gui/fragments/readme.py +++ b/gui/fragments/readme.py @@ -4,6 +4,8 @@ from qfluentwidgets import FluentIcon as FIF, FluentWindow, TextEdit import os +from gui.i18n.language import cfg + class ReadMeInterface(QFrame): def __init__(self, content: str): @@ -24,7 +26,7 @@ def __init__(self): super().__init__() docs = [] - path = './src/descriptions/' + path = self.getPath() for file in os.listdir(path): filepath = os.path.join(path, file) filename = file.split('.')[0] @@ -36,6 +38,14 @@ def __init__(self): self.addSubInterface(interface=ReadMeInterface(doc['content']), icon=FIF.TAG, text=doc['title']) self.show() + def getPath(self): + locale = cfg.get(cfg.language).value + suffix = locale.name() + directory = f'./src/descriptions_{suffix}' + if os.path.isdir(directory): + return directory + return './src/descriptions/' + if __name__ == '__main__': import sys diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index d88611801..987b3fa0c 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -4,10 +4,11 @@ from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QWidget -from qfluentwidgets import (ExpandLayout, ScrollArea, TitleLabel, SettingCardGroup) +from qfluentwidgets import (ComboBoxSettingCard, ExpandLayout, FluentIcon as FIF, ScrollArea, TitleLabel, SettingCardGroup) from gui.components import expand from gui.components.template_card import SimpleSettingCard +from gui.i18n.language import cfg class SettingsFragment(ScrollArea): @@ -16,23 +17,32 @@ def __init__(self, parent=None, config=None): self.config = config self.scrollWidget = QWidget() self.expandLayout = ExpandLayout(self.scrollWidget) - self.settingLabel = TitleLabel(self.tr(f"普通设置 {self.config['name']}"), self.scrollWidget) + self.settingLabel = TitleLabel(self.tr(f"普通设置") + f' {self.config["name"]}', self.scrollWidget) self.basicGroup = SettingCardGroup( self.tr("基本"), self.scrollWidget) self.basicGroupItems = [ + ComboBoxSettingCard( + cfg.language, + FIF.LANGUAGE, + self.tr('语言'), + self.tr('设置界面的首选语言'), + texts=['简体中文', 'English', self.tr('使用系统设置')], + parent=self.basicGroup + ), + SimpleSettingCard( - title='应用相关设置', - content='选择你的服务器平台,设置你的端口(不知道端口请设置为0)', + title=self.tr('应用相关设置'), + content=self.tr('选择你的服务器平台,设置你的端口(不知道端口请设置为0)'), sub_view=expand.__dict__['serverConfig'], parent=self.basicGroup, config=self.config ), SimpleSettingCard( - title='脚本相关设置', - content='根据你的电脑配置,调整相应的参数。', + title=self.tr('脚本相关设置'), + content=self.tr('根据你的电脑配置,调整相应的参数。'), sub_view=expand.__dict__['scriptConfig'], parent=self.basicGroup, config=self.config @@ -44,40 +54,40 @@ def __init__(self, parent=None, config=None): self.exploreGroupItems = [ SimpleSettingCard( - title='普通图推图设置', - content='根据你的推图需求,调整相应的参数。', + title=self.tr('普通图推图设置'), + content=self.tr('根据你的推图需求,调整相应的参数。'), sub_view=expand.__dict__['exploreConfig'], parent=self.exploreGroup, config=self.config ), SimpleSettingCard( - title='困难图推图设置', - content='根据你所需困难图刷关,设置参数。', + title=self.tr('困难图推图设置'), + content=self.tr('根据你所需困难图刷关,设置参数。'), sub_view=expand.__dict__['hardTaskConfig'], parent=self.exploreGroup, config=self.config ), SimpleSettingCard( - title='推剧情', - content='主线剧情,小组剧情,支线剧情', + title=self.tr('推剧情'), + content=self.tr('主线剧情,小组剧情,支线剧情'), sub_view=expand.__dict__['proceedPlot'], parent=self.exploreGroup, config=self.config ), SimpleSettingCard( - title='活动图设置', - content='推故事,推任务,推挑战', + title=self.tr('活动图设置'), + content=self.tr('推故事,推任务,推挑战'), sub_view=expand.__dict__['eventMapConfig'], parent=self.exploreGroup, config=self.config ), SimpleSettingCard( - title='其他设置', - content='其他的一些小功能与设置', + title=self.tr('其他设置'), + content=self.tr('其他的一些小功能与设置'), sub_view=expand.__dict__['otherConfig'], parent=self.exploreGroup, config=self.config diff --git a/gui/fragments/switch.py b/gui/fragments/switch.py index a4af89b2c..284366399 100644 --- a/gui/fragments/switch.py +++ b/gui/fragments/switch.py @@ -25,7 +25,7 @@ def __init__(self, parent=None, config=None): # 创建一个ExpandLayout实例作为滚动区域的布局管理器 self.expandLayout = ExpandLayout(self.scrollWidget) # 创建一个标题为“调度设置”的TitleLabel实例 - self.settingLabel = TitleLabel(self.tr(f"配置设置 {self.config['name']}"), self.scrollWidget) + self.settingLabel = TitleLabel(self.tr(f"配置设置") + f" {self.config['name']}", self.scrollWidget) # 初始化basicGroup变量,_setting_cards列表 self.basicGroup = None self._setting_cards = [] @@ -102,7 +102,8 @@ def _create_card(self, name: str, tip: str, setting_name: str) -> TemplateSettin content=tip, parent=self.basicGroup, sub_view=expand.__dict__[setting_name] if setting_name else None, - config=self.config + config=self.config, + context='ConfigTranslation' ) # 创建TemplateSettingCard实例 # _switch_card.status_switch.setChecked(enabled) # 设置状态开关的选中状态 # _switch_card.statusChanged.connect(lambda x: self._change_status(name, x)) # 连接状态开关的状态更改信号和_change_status()方法 diff --git a/gui/i18n/config_translation.py b/gui/i18n/config_translation.py new file mode 100644 index 000000000..800c74ebc --- /dev/null +++ b/gui/i18n/config_translation.py @@ -0,0 +1,83 @@ +from PyQt5.QtCore import QObject + + +class ConfigTranslation(QObject): + """ Contains translations of config strings""" + + def __init__(self, parent=None): + super().__init__(parent) + self.entries = { + # display + self.tr("每日特别委托"): "每日特别委托", + self.tr("悬赏通缉"): "悬赏通缉", + self.tr("竞技场"): "竞技场", + self.tr("收集每日体力"): "收集每日体力", + self.tr("收集小组体力"): "收集小组体力", + self.tr("商店购买"): "商店购买", + self.tr("日程"): "日程", + self.tr("主线清除体力"): "主线清除体力", + self.tr("自动MomoTalk"): "自动MomoTalk", + self.tr("咖啡厅"): "咖啡厅", + self.tr("查收邮箱"): "查收邮箱", + self.tr("自动制造"): "自动制造", + self.tr("收集奖励"): "收集奖励", + + # event + self.tr("咖啡厅"): "咖啡厅", + self.tr("日程"): "日程", + self.tr("收集每日体力"): "收集每日体力", + self.tr("收集小组体力"): "收集小组体力", + self.tr("查收邮箱"): "查收邮箱", + self.tr("商店购买"): "商店购买", + self.tr("普通关清体力"): "普通关清体力", + self.tr("困难关清体力"): "困难关清体力", + self.tr("每日特别委托"): "每日特别委托", + self.tr("悬赏通缉"): "悬赏通缉", + self.tr("竞技场"): "竞技场", + self.tr("自动制造"): "自动制造", + self.tr("总力战"): "总力战", + self.tr("自动MomoTalk"): "自动MomoTalk", + self.tr("收集奖励"): "收集奖励", + self.tr("学院交流会"): "学院交流会", + self.tr("凌晨四点重启"): "凌晨四点重启", + self.tr("活动扫荡"): "活动扫荡", + + # switch + self.tr("新的配置"): "新的配置", + self.tr("功能开关"): "功能开关", + self.tr("咖啡厅"): "咖啡厅", + self.tr("日程"): "日程", + self.tr("商店购买"): "商店购买", + self.tr("竞技场商店购买"): "竞技场商店购买", + self.tr("主线清除体力"): "主线清除体力", + self.tr("竞技场"): "竞技场", + self.tr("自动制造"): "自动制造", + self.tr("总力战"): "总力战", + self.tr("扫荡及购买券设置"): "扫荡及购买券设置", + + # static + self.tr("重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。"): "重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。", + self.tr("帮助你收集咖啡厅体力和信用点"): "帮助你收集咖啡厅体力和信用点", + self.tr("自动每日日程"): "自动每日日程", + self.tr("商店里买东西"): "商店里买东西", + self.tr("竞技场商店里买东西"): "竞技场商店里买东西", + self.tr("主线关卡自动清除体力与每日困难"): "主线关卡自动清除体力与每日困难", + self.tr("帮助你自动打竞技场"): "帮助你自动打竞技场", + self.tr("帮助你自动制造"): "帮助你自动制造", + self.tr("总力战期间自动打总力战"): "总力战期间自动打总力战", + self.tr("各种扫荡及购买券次数设置"): "各种扫荡及购买券次数设置", + + # server combobox + self.tr('官服'): '官服', + self.tr('B服'): 'B服', + self.tr('国际服'): '国际服', + self.tr('日服'): '日服', + + # patstyles + self.tr('拖动礼物'): '拖动礼物' + } + + + def get(self, key): + return self.entries.get(key) + diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm new file mode 100644 index 0000000000000000000000000000000000000000..2b153c4813ab34b89bec399201da76510d392186 GIT binary patch literal 23672 zcmb_^3v^ZGo$r^B9FlO70}(I^VxXvj0_8P6B2tN>XhG1#I=5Z75=?+-UQNQouCCsI z1QK3Bc|$M+L83^20U;y=y6Q}4+F4_(&aB>PueR#h`$Lj*Pr)b-SojirN-Vi?DpM@LD#Zj56{}E)T2)gd-y%zHE#K^<_jMv^|iUfUKw== zf4@8I_45s&=bm97O}h*}zCY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O9udj&}=Oip~VyUWe~_QC%npN z?^zUTqD3Htvt-*^%#O{XoXPRuu4jwn0MF?rX~l87fS#8Z0W+!@DR32z&qz5h?9ppu z1;l5VSr19qkqRg+Qd=z;T4|-OW4Q~HdoU+?HIg%U#VNkFPRiBu;v|xX{*lr3a%89O zK>91;Oi$N5=8ZtWhP^?Vb97C|4OU|?f@2&$?Yt?-eV2m&PHUZ={A5p~^S-x=dLrDA z$!3~^{hB2jhs!NnqgY3>ea%xJPSBIDb)M{JvM;_+6XB+qv3O@cYrWe+pWEB-O_8|H z0Y4rzSZ}Vt_I?b@mG{pW`VAI?aqAlcI<>*JjxE-QkP%8EOto%w+r54SsbGe02Bd<~?eys8#2Q7rd7wKquPH^*nm zpER`P2PhY92F`$!6U$(6NF5zL450UeV=bZ`c&ehhtY)3=e{UY}@eX<#1_8S-!4vrf zP>{^7n%1npXrHLkmV|;x+3yGOEm($jX$v#YQpeJUZ;x8yh z24FqWefR>Ncd&;dJQUqOzzj1FY+Ni{yyM=tKcw&Vb~ zzupC0jq`H-Pm;J70H0MSo85x|kE8|9cu7x+SyF=V#C(nQt&=)9%98j(FG5RQA*Y8! zgcLMAuL + + + BAASTitleBar + + + 帮助 + Help + + + + ConfigTranslation + + + 每日特别委托 + Special daily commission + + + + 悬赏通缉 + Wanted for reward. + + + + 竞技场 + The arena. + + + + 收集每日体力 + Collect daily strength + + + + 收集小组体力 + Collect team strength. + + + + 商店购买 + Shop purchase + + + + 日程 + Schedule + + + + 主线清除体力 + Main line removes strength + + + + 自动MomoTalk + AutoMomoTalk + + + + 咖啡厅 + Café + + + + 查收邮箱 + Check Mailbox + + + + 自动制造 + Auto-manufacturing + + + + 收集奖励 + Collection of awards + + + + 普通关清体力 + It's normal. + + + + 困难关清体力 + It's hard to clean up. + + + + 总力战 + General + + + + 学院交流会 + College Exchange + + + + 凌晨四点重启 + Restarted at 4:00 a.m. + + + + 活动扫荡 + Activity sweep + + + + 新的配置 + New Configuration + + + + 功能开关 + Function Switches + + + + 竞技场商店购买 + The arena store. + + + + 扫荡及购买券设置 + Sweeping and voucher settings + + + + 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 + Important, this is a functional switch, controls whether the functions are on, and check before starting. + + + + 帮助你收集咖啡厅体力和信用点 + Helps you collect the Café's strength and credit points. + + + + 自动每日日程 + Automatic Daily Calendar + + + + 商店里买东西 + Buying things in the store. + + + + 竞技场商店里买东西 + Buying things in the arena store. + + + + 主线关卡自动清除体力与每日困难 + Main level automatically removes physical strength and daily difficulties + + + + 帮助你自动打竞技场 + Helps you play the arena. + + + + 帮助你自动制造 + Helps you make it. + + + + 总力战期间自动打总力战 + It's a force battle. + + + + 各种扫荡及购买券次数设置 + Various sweeps and number of coupons settings + + + + 官服 + The uniform. + + + + B服 + B suit. + + + + 国际服 + International uniform + + + + 日服 + Daysuit. + + + + 拖动礼物 + Drag the present. + + + + EventMapConfig + + + 推故事 + Push the story. + + + + 推任务 + Push the job. + + + + 推挑战 + Push the challenge. + + + + ExploreConfig + + + 是否手动boss战(进入关卡后暂停等待手操) + Is there a manual Boss fight? + + + + 是否不强制打到sss(启用后跳过已通过但未sss的关卡) + Whether to call to sss (jump pass but not sss after active) + + + + 开启后强制打每一个指定的关卡(不管是否sss) + Force every specified level after opening (whether sss or not) + + + + 爆发一队 + Let's go! + + + + 爆发二队 + Break two. + + + + 贯穿一队 + Across the line. + + + + 贯穿二队 + Break through Team Two. + + + + 神秘一队 + Mystery team. + + + + 神秘二队 + Mystery Two. + + + + 振动一队 + Vibration one. + + + + 振动二队 + Vibration two. + + + + HardTaskConfig + + + 打到SSS + Call SSS. + + + + 拿礼物 + Get the present. + + + + 完成成就任务 + Achievement of the mandate + + + + HomeFragment + + + 蔚蓝档案自动脚本 + AutoScript for Blue Files + + + + 无任务 + No task + + + + 启动 + Start + + + + 档案,启动 + Archives, start. + + + + 开始你的档案之旅 + Start your file trip. + + + + 正在运行: + Running: + + + + Layout + + + 输入你需要对手比你低几级,高几级则填负数: + You're gonna need grades lower than you, and grades lower and negative: + + + + 输入你最多需要刷新几次: + Enter how many times you need to refresh: + + + + 确定 + Sure. + + + + 设置成功 + Setup Success + + + + 你需要对手比你低 + You need to be lower than you. + + + + 级 + Level + + + + 你最大刷新次数设置为: + The maximum number of times you refresh is: + + + + 刷新次数 + Refresh Number + + + + 优先邀请好感等级低学生: + Priority is given to low-sense students: + + + + 是否要领取奖励: + Incentives: + + + + 是否使用邀请券: + _Other Organiser + + + + 是否有二号咖啡厅: + Is there a Café No. 2: + + + + 列表选择你要添加邀请的学生,修改后请点击确定: + list selects the student you want to invite, and click to make sure: + + + + 添加学生 + Add Student + + + + 选择摸头方式: + Select how to touch the head: + + + + 选择第二咖啡厅邀请的学生 + Select the students invited to the second cafe. + + + + 目前制造物品优先级,排在前面的会优先选择 + Current manufacture priority, ahead priority + + + + 是否使用加速券 + Whether to use an accelerator voucher + + + + 推图选项 + Slide Options + + + + 请在下面填写要推的图,填写方式见-普通图自动推图说明- + Please fill in the drawings to be pushed below, as indicated in the AutoPage Note for the Normal Map. + + + + 开始推图 + Start Pushing + + + + 你的普通关配置已经被设置为: + Your general level configuration has been set to: + + + + ,正在推普通关。 + It's pushing the normal level. + + + + 全部(不)启用 + Enable All + + + + 刷新执行时间 + Refresh execution time + + + + 排序方式: + Sort by: + + + + 默认排序 + Default Sorting + + + + 按下次执行时间排序 + Sort by next execution time + + + + 事件 + Events + + + + 下次刷新时间 + Next time to refresh + + + + 启用 + Enable + + + + <b>困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍</b> + <b> Hardchart teams have the same attributes as normal ones (see normal slide settings) and please indicate the selection of hardchart level and set the team </b> according to the corresponding graph + + + + 你的困难关配置已经被设置为: + Your difficult configuration has been set to: + + + + ,正在推困难关。 + It's pushing hard. + + + + 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): + Normal level and number (e.g. " 1-1, 1-2-3" means 1-1 and then 1-2): + + + + 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: + The hardship level is set as above, note: maximum 3 times, commas are all English commas, daily and international. + + + + 根据学生添加关卡 + Add level by student + + + + 爱丽丝宝贝 + Alice baby. + + + + 你的普通关卡已经被设置为: + Your normal level has been set to: + + + + 你的困难关卡已经被设置为: + Your difficulty level has been set to: + + + + 优先做好感等级多的日程 + It's a high-profile agenda. + + + + 日程次数 + Number of programmes + + + + 区域名称 + Area Name + + + + 初级 + Primary + + + + 普通 + Normal + + + + 高级 + Advanced + + + + 特级 + Super + + + + 请填写您的截图间隔: + Please fill in your screenshot interval: + + + + 你的截屏间隔已经被设置为: + Your screen interval has been set to: + + + + ADB地址(点击选择) + ADB Address (click selection) + + + + 自动查询模拟器失败!请尝试手动输入端口 + AutoQuery Simulator Failed! Please try to enter port manually + + + + adb地址获取失败 + Could not close temporary folder: %s + + + + 信用点 + Credit Point + + + + 青辉石 + Plumstone. + + + + 最高难度 + Maximum difficulty + + + + 你的总力战最高难度已经被设置为: + You've been set up as the most difficult force: + + + + MainThread + + + 停止 + Stop + + + + 启动 + Start + + + + 困难图推图已完成 + Hardchart extrapolation completed + + + + 普通图推图已完成 + Normal Thumbnail Completed + + + + 反和谐成功,请重启BA下载资源 + Counterharmonic success. Restart BA download resource. + + + + 主线剧情已完成 + The lead story is complete. + + + + 小组剧情已完成 + The team is finished. + + + + 支线剧情已完成 + The feeder story is complete. + + + + 活动剧情已完成 + The event is complete. + + + + 活动任务已完成 + Active tasks completed + + + + 活动挑战推图已完成 + Activity challenge mapping completed + + + + OtherConfig + + + 一键反和谐 + One key against harmony. + + + + 显示首页头图(下次启动时生效) + Show header chart of the front page (effective at next start) + + + + ProceedPlot + + + 主线剧情需要推的章节数 + Number of chapters the main line plays need to push + + + + 开始推主线剧情 + Start pushing the main line. + + + + 开始推小组剧情 + Let's start with the team. + + + + 开始推支线剧情 + Start pushing the feeder. + + + + ProcessFragment + + + 调度状态 + Schedule status + + + + 执行中 + Under implementation + + + + 暂无正在执行的任务 + No ongoing tasks + + + + 队列中 + Queue + + + + 暂无队列中的任务 + No Queue Tasks + + + + SaveSettingMessageBox + + + 新建配置 + New Configuration + + + + 输入新建的配置名: + Enter the new configuration name: + + + + 确定 + Sure. + + + + 取消 + Cancel + + + + ServerConfig + + + 请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本 + Select your server, please switch the server carefully and restart the script after switching the server + + + + 官服 + The uniform. + + + + B服 + B suit. + + + + 国际服 + International uniform + + + + 日服 + Daysuit. + + + + 请填写您的adb端口号 + Please fill in your adb port number. + + + + 检测adb地址(检测目前开启的模拟器adb地址) + Testadb address (test for simulator adb address currently on). + + + + SettingsFragment + + + 普通设置 + General Settings + + + + 基本 + Basic + + + + 语言 + Languages + + + + 设置界面的首选语言 + Set the preferred language for the interface + + + + 使用系统设置 + Use System Settings + + + + 应用相关设置 + Apply relevant settings + + + + 选择你的服务器平台,设置你的端口(不知道端口请设置为0) + Select your server platform and set your port (please set it to 0) + + + + 脚本相关设置 + Script Related Settings + + + + 根据你的电脑配置,调整相应的参数。 + Adjust the parameters according to your computer configuration. + + + + 相关设置 + Related Settings + + + + 普通图推图设置 + Normal Thumbnail Settings + + + + 根据你的推图需求,调整相应的参数。 + Adjust the parameters according to the needs of your slide. + + + + 困难图推图设置 + Hard Chart Pushchart Settings + + + + 根据你所需困难图刷关,设置参数。 + Set parameters according to your difficult chart brush off. + + + + 推剧情 + A story. + + + + 主线剧情,小组剧情,支线剧情 + Main, team, branch. + + + + 活动图设置 + Activity Chart Settings + + + + 推故事,推任务,推挑战 + Story, mission, challenge. + + + + 其他设置 + Other Settings + + + + 其他的一些小功能与设置 + Other small functions and settings + + + + SweepCountConfig + + + <b>各区域扫荡次数以英文逗号分隔</b> + Number of regional sweeps separated by comma </b> + + + + <b>各区域扫荡次数以英文逗号分隔,扫荡次数可以为max</b> + <b> Regions are separated by commas and can be max</b> + + + + 悬赏委托扫荡 + The reward commission sweep. + + + + 学园交流会扫荡 + The exchange will sweep. + + + + 活动关卡扫荡关卡 + Activity level sweep level + + + + 活动关卡扫荡次数 + Number of activity level sweeps + + + + 特殊委托扫荡 + Special missions. + + + + 国服购买邀请券可在<b>商店购买</b>中实现 + Invitations to purchase national uniforms can be obtained at <b> store + + + + <b>用券数目设置,下拉框选择</b> + <b> set by the number of tickets, drop box selected </b> + + + + 悬赏委托扫荡券购买次数 + Number of reward commission tickets purchased + + + + 日程券购买次数 + Number of ticket purchases + + + + 学园交流会扫荡券购买次数 + The number of coupons that were cleared at the school fair. + + + + SwitchFragment + + + 配置设置 + Configure Settings + + + + 功能开关 + Function Switches + + + + TemplateLayout + + + 执行 + Implementation + + + + 确定 + Sure. + + + + 设置成功 + Setup Success + + + + Window + + + 主页 + Home Page + + + + 配置 + Configure + + + + 设置 + Settings + + + + 设置成功 + Setup Success + + + + 是否要删除配置: + Whether to delete configuration: + + + + 你需要在确认后重启BAAS以完成更改。 + You need to restart BAAS after confirmation to complete the change. + + + + bt + + + ConfigTranslation + 拖动礼物 + ConfigTranslation + + + + ConfigTranslation + 普通 + ConfigTranslation + + + + TemplateLayout + TemplateLayout + + + + ConfigTranslation + ConfigTranslation + + + + MainThread + MainThread + + + + MainThread + 停止 + MainThread + + + + helpModal + + + 帮助 + Help + + + \ No newline at end of file diff --git a/gui/i18n/language.py b/gui/i18n/language.py new file mode 100644 index 000000000..02575ab56 --- /dev/null +++ b/gui/i18n/language.py @@ -0,0 +1,70 @@ +from enum import Enum +from PyQt5.QtCore import QLocale, QTranslator +from qfluentwidgets import ConfigSerializer, OptionsConfigItem, OptionsValidator, QConfig, qconfig + + +class Language(Enum): + """ Language enumeration """ + + CHINESE_SIMPLIFIED = QLocale(QLocale.Chinese, QLocale.China) + ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) + # AUTO = QLocale() + + +class LanguageSerializer(ConfigSerializer): + """ Language serializer """ + + def serialize(self, language): + return language.value.name() #if language != Language.AUTO else "Auto" + + def deserialize(self, value: str): + return Language(QLocale(value)) #if value != "Auto" else Language.AUTO + + +class Config(QConfig): + """ Config of application """ + language = OptionsConfigItem( + "MainWindow", "Language", Language.ENGLISH, OptionsValidator(Language), LanguageSerializer(), restart=True) + + def __init__(self): + super().__init__() + + +class Translator(QTranslator): + def __init__(self, parent=None): + super().__init__(parent) + + def encode(self, *args): + return [arg.encode('utf-8') if arg else arg for arg in args] + + def decode(self, *args): + return [arg.decode('utf-8') if arg else arg for arg in args] + + def toString(self, tranlation: str | bytes) -> str: + if isinstance(tranlation, bytes): + tranlation = self.decode(tranlation) + return tranlation + + def tr(self, context: str | None, sourceText: str | None, disambiguation: str | None = None, n: int = -1) -> str: + """ + Convert sourceText by looking in the qm file. + Use this to access specific context tags outside source file. + + Parameters + ---------- + context: str + context tag in .ts file e.g ConfigTranslation + + sourceText: str + the text to translate + """ + bytesArgs = self.encode(context, sourceText, disambiguation) + translation = super().translate(*bytesArgs, n) + if translation: + return self.toString(translation) + return sourceText + + +cfg = Config() +qconfig.load('config/language.json', cfg) +baasTranslator = Translator() diff --git a/gui/util/config_set.py b/gui/util/config_set.py index f67baeef7..8e6116186 100644 --- a/gui/util/config_set.py +++ b/gui/util/config_set.py @@ -1,5 +1,7 @@ import json from core.notification import notify +from gui.i18n.language import baasTranslator as bt +from gui.i18n.config_translation import ConfigTranslation class ConfigSet: @@ -10,6 +12,7 @@ def __init__(self, config_dir): self.static_config = None self.config_dir = config_dir self.signals = {} + self.translation = ConfigTranslation() self._init_config() def _init_config(self): @@ -24,12 +27,27 @@ def _init_config(self): elif self.config['server'] == '日服': self.server_mode = 'JP' + def serialize(self, value): + # i18n to Chinese + if isinstance(value, str): + if self.translation.get(value): + value = self.translation.get(value) + return value + + def deserialize(self, value): + # Chinese to i18n + if isinstance(value, str): + value = bt.tr('ConfigTranslation', value) + return value + def get(self, key): self._init_config() - return self.config.get(key) + value = self.config.get(key) + return self.deserialize(value) def set(self, key, value): self._init_config() + value = self.serialize(value) self.config[key] = value with open(f'./config/{self.config_dir}/config.json', 'w', encoding='utf-8') as f: json.dump(self.config, f, indent=4, ensure_ascii=False) diff --git a/i18n.pro b/i18n.pro new file mode 100644 index 000000000..108582a6f --- /dev/null +++ b/i18n.pro @@ -0,0 +1,30 @@ +SOURCES += \ + gui/components/expand/arenaPriority.py \ + gui/components/expand/arenaShopPriority.py \ + gui/components/expand/cafeInvite.py \ + gui/components/expand/createPriority.py \ + gui/components/expand/eventMapConfig.py \ + gui/components/expand/expandTemplate.py \ + gui/components/expand/exploreConfig.py \ + gui/components/expand/featureSwitch.py \ + gui/components/expand/hardTaskConfig.py \ + gui/components/expand/mainlinePriority.py \ + gui/components/expand/otherConfig.py \ + gui/components/expand/proceedPlot.py \ + gui/components/expand/schedulePriority.py \ + gui/components/expand/scriptConfig.py \ + gui/components/expand/serverConfig.py \ + gui/components/expand/shopPriority.py \ + gui/components/expand/sweepCountConfig.py \ + gui/components/expand/totalForceFightPriority.py \ + gui/components/dialog_panel.py \ + gui/components/template_card.py \ + gui/fragments/home.py \ + gui/fragments/process.py \ + gui/fragments/readme.py \ + gui/fragments/settings.py \ + gui/fragments/switch.py \ + gui/i18n/config_translation.py \ + window.py \ + +TRANSLATIONS += gui/i18n/en_US.ts diff --git a/src/descriptions_en_US/Activity Sweep Filling Description.html b/src/descriptions_en_US/Activity Sweep Filling Description.html new file mode 100644 index 000000000..6647bda23 --- /dev/null +++ b/src/descriptions_en_US/Activity Sweep Filling Description.html @@ -0,0 +1,88 @@ + + + + +

+ Information for the activity map sweep: +

+

+ + + Sweep it. + + + : +

+

+ Active level sweep level filled in: 1 - Maximum difficulty 1 + + Integer + +

+

+ Number of sweeps: +

+

+ 1. + + Integer + + Means number of sweeps +

+

+ 2. + + Decimal + + 0.5 indicates that the current physical strength *0.5 is used to sweep the level +

+

+ 3. + + Score + + 1/3 = 1/3 clearance of the level using current physical strength +

+

+ + + It's too much. + + + : +

+

+ Use ', ', 'segregating multiple clearances at one level, which means sweep them in turn +

+

+ Example: +

+

+ Sweep level: +

+

+ 9, 10, 11 +

+

+ Number of sweeps: +

+

+ 0.5, 3, 1/3 +

+

+ Physical: 999 +

+

+ Means sweep in turn. +

+

+ Level 9 (999*0.5) / 20 = 25 times +

+

+ 10th Level 3 +

+

+ Level 11 (999* 1/3)/ 20 = 16 +

+ + diff --git a/src/descriptions_en_US/Auto-Material Description.html b/src/descriptions_en_US/Auto-Material Description.html new file mode 100644 index 000000000..afeceb323 --- /dev/null +++ b/src/descriptions_en_US/Auto-Material Description.html @@ -0,0 +1,104 @@ + + + + +

+ + + Main-line scenario settings + + +

+

+ + + Autoplay helps move the grid. + + + But... + + + Finally, some of the battles cannot be fought automatically. + + +

+

+ + Numbers vs. Chapter Tables + +

+

+ + 1: Chapter I + +

+

+ + 2: Chapter II + +

+

+ + 3: Chapter III + +

+

+ + 4: Chapter IV + +

+

+ + 5: Final Chapter + +

+

+ + 6: Chapter V + +

+

+ + Use "," to separate the numbers to indicate the secondary sections. + +

+

+ + Example: + +

+

+ + One, three, five. + +

+

+ + Expressed in turn in chapter I, chapter III, final chapter + +

+

+ + Default configuration for nothing + +

+

+ + State uniform: 1,2,3 + +

+

+ + International uniforms: 1,2,3,4,5,4 + +

+

+ + Daily clothing: 1, 2, 3, 4, 5, 4, 6 + +

+
+

+  
+ + diff --git a/src/descriptions_en_US/Common emulator adb address.html b/src/descriptions_en_US/Common emulator adb address.html new file mode 100644 index 000000000..e2c506b4e --- /dev/null +++ b/src/descriptions_en_US/Common emulator adb address.html @@ -0,0 +1,4 @@ +

+

+
For more starters, please check yourself.

Single Emulator Port

1. MuMu: 7555
2. Blue stacks/trays: 5555 (Blue stack emulator to check open adb port debug function)
Night God: 62001 / 59865
4. Mumu12:16384
Free: 21503
+


diff --git a/src/descriptions_en_US/Description of normal graphs.html b/src/descriptions_en_US/Description of normal graphs.html new file mode 100644 index 000000000..4704f220d --- /dev/null +++ b/src/descriptions_en_US/Description of normal graphs.html @@ -0,0 +1,173 @@ + + + + +

+ Description of normal graphs: +

+

+ 1. Description of use: +

+

+ (1): Must + + + Unlock + + + Automatically end rounds and + + + Autofight. + + + (automated detection and opening) +

+

+ (2): Supported level main line ordinary + + + 4 - 25 + + +

+

+ (3): Teams move click coordinates and routes when BAAS slides are fixed and all moves are only one click, and because of the number of teams in the Blue Archive slides, the numbering coordinates and the order of movement vary according to the team. +

+

+ (4): As (3), when automatically extrapolating + + + You have to make sure the selection team numbers are smaller and bigger. + + I don't know. + + + +

+

+ + + (5): BAAS will choose the basis + + + < Normal Thumbnail Settings > + + + + + the selected group properties + + + + and + + + ♪ Team logic ♪ + + + Find the right configuration for the slide + +

+

+ The first of the corresponding properties in the following diagrams is [1] and the second is [2]. +

+

+ Team logic: +

+

+ 1 Prioritize the selection of the remaining team numbers on the basis of the relationship of restraint and gradually reduce the relationship of attribution to the remaining counterpart. +

+

+ 2 When selecting a team (4 - the team number) > = the number of remaining teams required. +

+

+ 3 Gradual reduction of the relationship of restraint among the [1] counterparts, if no assurance is provided for 1 or 2 +

+

+ 4 If some teams have been selected and 4 - the maximum number of these teams > = the number of remaining teams required, the remaining teams will be filled with an optional number. +

+

+ 5 None of the above conditions are met, and the selected team number is 1, 2, 3 +

+

+ + Example: + +

+

+ Selecting the order of the 23 [Explosion, Crossing] task force +

+

+ One team, one team. +

+

+ If an outbreak is numbered 3 and not selected in the above order, select 4 as the second +

+

+ Choose 12 as the final team if not elected +

+

+ + + Description of normal graph push-chart level: + + +

+

+ + 1. If + + + Could not close temporary folder: %s + + + , each number to be filled indicates the area to be pushed, and the program will judge whether each level in the area is to be hit according to whether the current level is sss + +

+

+ + Example: + +

+

+ + 15, 16, 14 + +

+

+ + This represents a roll-down of figure 15,16,14. + +

+

+ + 2. + + + If + + + Enable mandatory hits at each specified level + + + , enter a number to push the relevant card in the area once and enter a number-number to specify level + +

+

+ + Example: + +

+

+ + 15, 16-3 + +

+

+ + 15-1, 15-2, 15-3, 15-4, 15-5, 16-3 + +

+ + diff --git a/src/descriptions_en_US/Difficult Chart Configuration Description.html b/src/descriptions_en_US/Difficult Chart Configuration Description.html new file mode 100644 index 000000000..de6c80f23 --- /dev/null +++ b/src/descriptions_en_US/Difficult Chart Configuration Description.html @@ -0,0 +1,9 @@ + + + + +
+
The hardship map is used in the same way as the team logic and normal figure, and some of the difficult maps require three teams, all of which have the same attributes as the first for the region.

Fill in the following instructions:

The string that should be filled in the slide level should not exceed the characters or words "-", "sss", "present", "task", ",", and numbers
Split into several strings after commas
No keyword "sss", "present", "task"
Example: 15,12-2
Three switches (15-1, 15-2, 15-3, 12-2) according to the difficult map settings will be called to sss/take presents/take challenge tasks

2. A number and a string separated by "-"
Example: 15-sss-present
Will be called to sss with gifts (15-1, 15-2, 15-3)

3. Two numbers (specify the corresponding level)
Example: 15-3-sss-task
They'll call 15-3 to sss and complete the challenge.

4. Examples
Switches are all open, fill in: 7,8-sss, 9-3-task
It is indicated that the calls (7-1, 7-2, 7-3) to sss, the gifts and the challenging tasks, (8-1, 8-2, 8-3) to sss, 9-3
Note: Baas will automatically determine whether the level has reached sss, whether it has taken a gift or, if it has reached sss or has taken a gift, skips the level.
+
+ + diff --git a/src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html b/src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html new file mode 100644 index 000000000..5f93badc5 --- /dev/null +++ b/src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html @@ -0,0 +1,91 @@ + + + + +

+ Blanche Files + + Game Internal Settings + + : +

+

+ + + ** Required** + + + : +

+

+ + Option - > Image + + : The battle scene up and down the black side: OFF +

+

+ + Memory Hall + + : I don't want Yako, Alo, Yuka +

+

+ + International language of service + + English +

+

+ + Recommended Selection + + (does not affect script running) +

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Resolution + + Highest +
+ Frame + + 60 +
+ Accelerate rendering mode + + Compatibility +
+ Postprocessing + + ON +
+ It's against sawn teeth. + + ON +
+

+

+ + diff --git a/src/descriptions_en_US/Normal Sweeping Scanning Description.html b/src/descriptions_en_US/Normal Sweeping Scanning Description.html new file mode 100644 index 000000000..6314c8b75 --- /dev/null +++ b/src/descriptions_en_US/Normal Sweeping Scanning Description.html @@ -0,0 +1,68 @@ + + + + +

+ Each sweep configuration is like 'region ' - 'task number ' - 'sweep times ' +

+

+ Organisation + + Regional + + 'region' + + Level + + "task-number" + + Number of sweeps + + @sweeptimes +

+

+ Each configuration is separated by ', ' +

+

+ 1. + + + Available Sweep Levels + + + : +

+

+ All maps after Academy 1 and 5 +

+

+ 2. + + + Special description + + +

+

+ International, `sweep times' can be `max' +

+

+ The tutorial requires 'region' as a fixed string'tutorian' +

+

+ BAAS calculates whether the current level can be cleaned, depending on the current physical strength and the level of the level. +

+

+ Example: +

+

+ When the international uniform is physically adequate +

+

+ TUTORIAL-1-20, 15-3, 20-3-max +

+

+ It means cleaning the curriculum 1 20 times, then cleaning 15-3, 3 times, and then all the physical sweeps 20-3 times. +

+ + diff --git a/src/descriptions_en_US/Task force attributes required by region.html b/src/descriptions_en_US/Task force attributes required by region.html new file mode 100644 index 000000000..38e20f22e --- /dev/null +++ b/src/descriptions_en_US/Task force attributes required by region.html @@ -0,0 +1,8 @@ + + + + + +

25[ Sonic , Piercing ]
24[ Sonic , Explosive ]
23[ Explosive , Piercing ]
22[ Piercing , Mystic ]
21[ Mystic , Explosive ]
20[ Explosive , Piercing ]
19[ Piercing , Mystic ]
18[ Mystic , Explosive ]
17[ Explosive , Piercing ]
16[ Piercing , Mystic ] 
15[ Mystic , Mystic ] 
14[ Explosive , Mystic ] 
13[ Piercing , Piercing ] 
12[ Mystic , Explosive ] 
11[ Piercing , Mystic ] 
10[ Explosive , Mystic ]
9  [ Explosive , Piercing ]
8  [ Piercing , Piercing ]   
7  [ Explosive , Explosive ]    
6  [ Piercing , Piercing ]   
5  [ Explosive ]
4  [ Piercing ]
3  [ Piercing ]
2  [ Explosive ]
1  [ Explosive ]

+ + diff --git a/src/descriptions_en_US/reporting guidelines on issues (important).html b/src/descriptions_en_US/reporting guidelines on issues (important).html new file mode 100644 index 000000000..eda95dc6c --- /dev/null +++ b/src/descriptions_en_US/reporting guidelines on issues (important).html @@ -0,0 +1,92 @@ +

+ + Let's think about it before we report it: + +

+

+ + 1. This question has never arisen before and can I try to solve it myself (Baidu, curriculum). + +

+

+ + It can't be solved. + +

+

+ + 2. The question arises whether I am running every time. + +

+

+ + 3. How can I provide sufficient information for others to help me solve the problem? + +

+

+ + 4. The distribution of colour maps within the qq group may be more attractive to others to help solve problems. + +

+

+ + + Type of problem versus corresponding + + Reporting (yellow necessary) + + + +

+

+ + I'm stuck on page XXX! : + +

+

+ + (1). + + 1280 x 720 games when stuck + + + (Mumu on F9) + + +

+

+ (2). Baas Logshot +

+

+ (3). Try to switch pages to see if they only get stuck on this page +

+

+ + I can't move it! : + +

+

+ (1) Attempts to repulse the observation of one or two times whether each time the card is in one position. +

+

+ + + (1). Recording the complete video from the "start-up slide" to the time of the stop, with attention to the simulator and the Bas log interface being recorded on the same screen. + + +

+

+ + I set up the XXX configuration but didn't fight! I didn't set up XXX but I did! : + +

+

+ (1) Read the configuration instructions carefully to see if they correctly understand how to fill them out. +

+

+ + + (2) Configure screenshots and program logs. + + +

diff --git a/window.py b/window.py index 79e3f4f39..ef81a94bc 100644 --- a/window.py +++ b/window.py @@ -7,16 +7,17 @@ import threading from functools import partial -from PyQt5.QtCore import Qt, QSize, QPoint, pyqtSignal +from PyQt5.QtCore import Qt, QLocale, QSize, QTranslator, QPoint, pyqtSignal from PyQt5.QtGui import QIcon, QColor from PyQt5.QtWidgets import QApplication, QHBoxLayout -from qfluentwidgets import FluentIcon as FIF, SplashScreen, MSFluentWindow, TabBar, \ +from qfluentwidgets import FluentIcon as FIF, FluentTranslator, SplashScreen, MSFluentWindow, TabBar, \ MSFluentTitleBar, MessageBox, InfoBar, InfoBarIcon, InfoBarPosition, TransparentToolButton from qfluentwidgets import (SubtitleLabel, setFont, setThemeColor) from core import default_config from gui.components.dialog_panel import SaveSettingMessageBox from gui.fragments.readme import ReadMeWindow +from gui.i18n.language import cfg, baasTranslator as bt from gui.util.config_set import ConfigSet # sys.stderr = open('error.log', 'w+', encoding='utf-8') @@ -182,7 +183,7 @@ def __init__(self, parent): self.tabBar.setTabSelectedBackgroundColor(QColor(255, 255, 255, 125), QColor(255, 255, 255, 50)) self.searchButton = TransparentToolButton(FIF.HELP.icon(), self) - self.searchButton.setToolTip('帮助') + self.searchButton.setToolTip(self.tr('帮助')) self.searchButton.clicked.connect(self.onHelpButtonClicked) # self.tabBar.tabCloseRequested.connect(self.tabRemoveRequest) @@ -263,9 +264,9 @@ def call_update(self): def initNavigation(self): self.navi_btn_list = [ - self.addSubInterface(self.homeInterface, FIF.HOME, '主页'), - self.addSubInterface(self.schedulerInterface, FIF.CALENDAR, '配置'), - self.addSubInterface(self.settingInterface, FIF.SETTING, '设置') + self.addSubInterface(self.homeInterface, FIF.HOME, self.tr('主页')), + self.addSubInterface(self.schedulerInterface, FIF.CALENDAR, self.tr('配置')), + self.addSubInterface(self.settingInterface, FIF.SETTING, self.tr('设置')) ] for ind, btn in enumerate(self.navi_btn_list): @@ -298,7 +299,7 @@ def closeEvent(self, event): @staticmethod def showHelpModal(): helpModal = ReadMeWindow() - helpModal.setWindowTitle('帮助') + helpModal.setWindowTitle(helpModal.tr('帮助')) helpModal.setWindowIcon(QIcon(ICON_DIR)) helpModal.resize(800, 600) helpModal.setFocus() @@ -336,7 +337,7 @@ def onTabAddRequested(self): if text in list(map(lambda x: x.config['name'], self.config_dir_list)): ib = InfoBar( icon=InfoBarIcon.ERROR, - title='设置成功', + title=self.tr('设置成功'), content=f'名为“{text}”的配置已经存在!', orient=Qt.Vertical, # vertical layout position=InfoBarPosition.TOP_RIGHT, @@ -370,8 +371,8 @@ def onTabAddRequested(self): def onTabCloseRequested(self, i0): config_name = self._sub_list[0][i0].config["name"] - title = f'是否要删除配置:{config_name}?' - content = """你需要在确认后重启BAAS以完成更改。""" + title = self.tr('是否要删除配置:') + f' {config_name}?' + content = self.tr("""你需要在确认后重启BAAS以完成更改。""") closeRequestBox = MessageBox(title, content, self) if closeRequestBox.exec(): shutil.rmtree(f'./config/{self._sub_list[0][i0].config.config_dir}') @@ -405,6 +406,15 @@ def start(): QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps) app = QApplication(sys.argv) + + # internationalization + locale = cfg.get(cfg.language).value + translator = FluentTranslator(locale) + bt.load("gui/i18n/" + locale.name()) + + app.installTranslator(translator) + app.installTranslator(bt) + w = Window() # 聚焦窗口 w.setFocus(True) From 50479be441c760408c1ba1cc144f3f0c3e925fd6 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Sun, 7 Apr 2024 04:54:42 +0100 Subject: [PATCH 02/30] refactor: i18n source code --- auto_translate.py | 256 +++++++++++++---------- gui/components/expand/cafeInvite.py | 2 +- gui/components/expand/emulatorConfig.py | 10 +- gui/components/expand/expandTemplate.py | 8 +- gui/components/expand/featureSwitch.py | 8 +- gui/components/template_card.py | 2 +- gui/fragments/home.py | 2 +- gui/fragments/process.py | 2 +- gui/fragments/readme.py | 6 +- gui/fragments/settings.py | 8 +- gui/i18n/en_US.qm | Bin 23672 -> 24000 bytes gui/i18n/en_US.ts | 136 ++++++------ gui/i18n/language.py | 70 ------- gui/util/config_set.py | 21 +- gui/{i18n => util}/config_translation.py | 6 +- gui/util/language.py | 11 + gui/util/translator.py | 105 ++++++++++ window.py | 7 +- 18 files changed, 362 insertions(+), 298 deletions(-) delete mode 100644 gui/i18n/language.py rename gui/{i18n => util}/config_translation.py (97%) create mode 100644 gui/util/language.py create mode 100644 gui/util/translator.py diff --git a/auto_translate.py b/auto_translate.py index cd0a2171d..e35d4fa96 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -1,121 +1,149 @@ import os -import sys +import codecs +import translatehtml + from lxml import etree from argostranslate import package, translate -import translatehtml -import codecs -# Load Argos Translate model -from_code = "zh" -to_code = "en" - -available_packages = package.get_available_packages() -available_package = list( - filter( - lambda x: x.from_code == from_code and x.to_code == to_code, available_packages - ) -)[0] -download_path = available_package.download() -package.install_from_path(download_path) - -# Translate -installed_languages = translate.get_installed_languages() -from_lang = list(filter(lambda x: x.code == from_code, installed_languages))[0] -to_lang = list(filter(lambda x: x.code == to_code, installed_languages))[0] - -MODEL = from_lang.get_translation(to_lang) - -def translate_to_english(text): - result = MODEL.translate(text) - print(result) - return result - -def translate_xml(input_file, output_file): - # Load the XML from a file - tree = etree.parse(input_file) - root = tree.getroot() - - # Find all 'source' tags and translate their text - for source in root.iter('source'): - source_text = source.text - translated_text = translate_to_english(source_text) - - # Find the 'translation' tag within the parent 'message' tag - translation = source.getparent().find('translation') - - # Check the 'type' attribute of the 'translation' tag - if 'type' in translation.attrib: - if translation.attrib['type'] == 'obsolete': - # Delete the parent 'message' tag if 'type' is 'obsolete' - source.getparent().getparent().remove(source.getparent()) +from gui.util.language import Language + + +class Handler: + def set_next(self, request): + request.handlers.pop(0) + if request.handlers: + request.handlers[0].handle(request) + + def handle(self, request): + pass + + +class Request: + from_code = "zh" + + def __init__(self, handlers: list[Handler], language: Language, argos_model: str): + self.language = language + self.strLang = language.value.name() + self.handlers = handlers + self.to_code = argos_model + self.model = None + + def translate(self, text): + translation = self.model.translate(text) + print(translation) + return translation + + def process(self): + self.handlers[0].handle(self) + + +class ModelHandler(Handler): + def handle(self, request): + # Load Argos Translate model + to_code = request.to_code + + available_packages = package.get_available_packages() + available_package = list( + filter( + lambda x: x.from_code == request.from_code and x.to_code == to_code, available_packages + ) + )[0] + download_path = available_package.download() + package.install_from_path(download_path) + + # Translate + installed_languages = translate.get_installed_languages() + from_lang = list(filter(lambda x: x.code == request.from_code, installed_languages))[0] + to_lang = list(filter(lambda x: x.code == to_code, installed_languages))[0] + + request.model = from_lang.get_translation(to_lang) + self.set_next(request) + + +class XmlHandler(Handler): + def handle(self, request): + # Load the XML from a file + input_file = os.path.join('gui/i18n/', f'{request.strLang}.ts') + output_file = os.path.join('gui/i18n/', f'{request.strLang}.ts') + + tree = etree.parse(input_file) + root = tree.getroot() + + # Find all 'source' tags and translate their text + for source in root.iter('source'): + source_text = source.text + translated_text = request.translate(source_text) + + # Find the 'translation' tag within the parent 'message' tag + translation = source.getparent().find('translation') + + # Check the 'type' attribute of the 'translation' tag + if 'type' in translation.attrib: + if translation.attrib['type'] == 'obsolete': + # Delete the parent 'message' tag if 'type' is 'obsolete' + source.getparent().getparent().remove(source.getparent()) + else: + # Update the 'translation' tag if 'type' is not 'obsolete' + translation.text = translated_text else: - # Update the 'translation' tag if 'type' is not 'obsolete' - translation.text = translated_text - else: - # Don't update the 'translation' tag if 'type' attribute doesn't exist - continue - - # Write the updated XML back to the file - tree.write(output_file, encoding='utf8') - - -def translate_mission_types(input_dir, output_dir): - input_path = os.path.join(input_dir, '各区域所需队伍属性.html') - output_path = os.path.join(output_dir, translate_to_english('各区域所需队伍属性') + '.html') - - translations = { - '爆发': 'Explosive', - '贯穿': 'Piercing', - '神秘': 'Mystic', - '振动': 'Sonic' - } - - with open(input_path, 'r') as f: - text = f.read() - - for original, translated in translations.items(): - text = text.replace(original, translated) - - with open(output_path, 'w') as f: - f.write(text) - - -def translate_html_files(input_dir, output_dir): - # Ensure the output directory exists - if not os.path.exists(output_dir): - os.makedirs(output_dir) - - # Iterate over all files in the input directory - for filename in os.listdir(input_dir): - if filename == '各区域所需队伍属性.html': - translate_mission_types(input_dir, output_dir) - continue - - if filename.endswith('.html'): - # Parse the HTML file with BeautifulSoup - with codecs.open(os.path.join(input_dir, filename), 'r', 'utf-8') as f_in: - - # Translate all text in the HTML file - soup = translatehtml.translate_html(MODEL, f_in) - - # Write the translated HTML to the output directory - name, extension = os.path.splitext(filename) - output_name = f'{translate_to_english(name)}.html' - with codecs.open(os.path.join(output_dir, output_name), 'w', 'utf-8') as f_out: - f_out.write(str(soup.prettify())) - + # Don't update the 'translation' tag if 'type' attribute doesn't exist + continue + + # Write the updated XML back to the file + tree.write(output_file, encoding='utf8') + self.set_next(request) + + +class HtmlHandler(Handler): + def translate_mission_types(self, request, input_dir, output_dir): + input_path = os.path.join(input_dir, '各区域所需队伍属性.html') + output_path = os.path.join(output_dir, request.translate('各区域所需队伍属性') + '.html') + + translations = { + '爆发': 'Explosive', + '贯穿': 'Piercing', + '神秘': 'Mystic', + '振动': 'Sonic' + } + + with open(input_path, 'r') as f: + text = f.read() + + for original, translated in translations.items(): + text = text.replace(original, translated) + + with open(output_path, 'w') as f: + f.write(text) + + def handle(self, request): + input_dir = 'src/descriptions/' + output_dir = f'src/descriptions_{request.strLang}' + # Ensure the output directory exists + if not os.path.exists(output_dir): + os.makedirs(output_dir) + + # Iterate over all files in the input directory + for filename in os.listdir(input_dir): + if request.strLang == 'en_us' and filename == '各区域所需队伍属性.html': + self.translate_mission_types(request, input_dir, output_dir) + continue + + if filename.endswith('.html'): + # Parse the HTML file with BeautifulSoup + with codecs.open(os.path.join(input_dir, filename), 'r', 'utf-8') as f_in: + + # Translate all text in the HTML file + soup = translatehtml.translate_html(request.model, f_in) + + # Write the translated HTML to the output directory + name, extension = os.path.splitext(filename) + output_name = f'{request.translate(name)}.html' + with codecs.open(os.path.join(output_dir, output_name), 'w', 'utf-8') as f_out: + f_out.write(str(soup.prettify())) + if __name__ == "__main__": - if len(sys.argv) != 2: - print("Usage: python auto_translate.py [gui|descriptions]") - sys.exit(1) - - mode = sys.argv[1] - - if mode == 'gui': - translate_xml("gui/i18n/en_US.ts", 'gui/i18n/en_US.ts') - elif mode == 'descriptions': - translate_html_files("src/descriptions", "src/descriptions_en_US") - else: - print("Invalid mode. Use 'gui' or 'descriptions'.") - sys.exit(1) + handlers_en = [ModelHandler(), XmlHandler()] + request_en = Request(handlers_en, Language.ENGLISH, 'en') + request_en.process() + diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 33c8d6ffa..fb640c818 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -2,7 +2,7 @@ from PyQt5.QtWidgets import QWidget, QLabel, QHBoxLayout, QVBoxLayout, QPushButton from qfluentwidgets import ComboBox, LineEdit, CheckBox -from gui.i18n.language import baasTranslator as bt +from gui.util.translator import baasTranslator as bt class Layout(QWidget): diff --git a/gui/components/expand/emulatorConfig.py b/gui/components/expand/emulatorConfig.py index ddce9994e..f5aeac0de 100644 --- a/gui/components/expand/emulatorConfig.py +++ b/gui/components/expand/emulatorConfig.py @@ -1,28 +1,30 @@ +from PyQt5.QtCore import QObject from PyQt5.QtWidgets import QFileDialog from .expandTemplate import TemplateLayout class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + EmulatorConfig = QObject() configItems = [ { - 'label': '在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器)', + 'label': EmulatorConfig.tr('在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器)'), 'key': 'open_emulator_stat', 'type': 'switch' }, { - 'label': '等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认)', + 'label': EmulatorConfig.tr('等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认)'), 'type': 'text', 'key': 'emulator_wait_time' }, { - 'label': '选择模拟器地址', + 'label': EmulatorConfig.tr('选择模拟器地址'), 'type': 'text_and_file_button', 'key': 'program_address' } ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context='EmulatorConfig') def _choose_file(self, line_edit): file_dialog = QFileDialog() diff --git a/gui/components/expand/expandTemplate.py b/gui/components/expand/expandTemplate.py index 085648d92..7f89c9cc0 100644 --- a/gui/components/expand/expandTemplate.py +++ b/gui/components/expand/expandTemplate.py @@ -5,7 +5,7 @@ from qfluentwidgets import ComboBox, SwitchButton, PushButton, LineEdit, InfoBar, InfoBarIcon, InfoBarPosition from functools import partial -from gui.i18n.language import baasTranslator as bt +from gui.util.translator import baasTranslator as bt class ConfigItem: @@ -90,10 +90,10 @@ def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None inputComponent = LineEdit(self) inputComponent.setFixedWidth(500) # 设置文本框的固定宽度 inputComponent.setText(str(self.config.get(currentKey))) - confirmButton = PushButton('确定', self) + confirmButton = PushButton(bt.tr('TemplateLayout', self.tr('确定')), self) confirmButton.setFixedWidth(80) # 设置确定按钮的固定宽度 confirmButton.clicked.connect(partial(self._commit, currentKey, inputComponent, labelComponent)) - selectButton = PushButton('选择', self) + selectButton = PushButton(bt.tr('TemplateLayout', self.tr('确定')), self) selectButton.setFixedWidth(80) # 设置选择按钮的固定宽度 selectButton.clicked.connect(partial(self._choose_file, inputComponent)) else: @@ -119,7 +119,7 @@ def _commit(self, key, target, labelTarget): infoChanged = InfoBar( icon=InfoBarIcon.SUCCESS, title=self.tr('设置成功'), - content=f'{labelTarget.text()}{bt.tr("TemplateLayout", "已经被设置为:")}{value}', + content=f'{labelTarget.text()}{bt.tr("TemplateLayout", "已经被设置为:")}{bt.tr("ConfigTranslation", value)}', orient=Qt.Vertical, position=InfoBarPosition.TOP_RIGHT, duration=800, diff --git a/gui/components/expand/featureSwitch.py b/gui/components/expand/featureSwitch.py index c28e75b44..b7276544a 100644 --- a/gui/components/expand/featureSwitch.py +++ b/gui/components/expand/featureSwitch.py @@ -8,7 +8,7 @@ from qfluentwidgets import CheckBox, TableWidget, LineEdit, PushButton, ComboBox import threading -from gui.i18n.language import baasTranslator as bt +from gui.util.translator import baasTranslator as bt class Layout(QWidget): @@ -73,7 +73,7 @@ def _init_components(self, config_list): cbx_layout.addWidget(t_cbx, 1, Qt.AlignCenter) cbx_layout.setContentsMargins(30, 0, 0, 0) cbx_wrapper.setLayout(cbx_layout) - t_ccs = QLabel(self.config.deserialize(self.labels[i])) + t_ccs = QLabel(bt.tr('ConfigTranslation', self.labels[i])) t_ncs = LineEdit(self) t_ncs.setText(str(datetime.fromtimestamp(self.next_ticks[i]))) t_ncs.textChanged.connect(self._update_config) @@ -144,7 +144,7 @@ def _sort(self): def _update_config(self): for i in range(len(self.enable_list)): dic = { - 'event_name': self.config.serialize(self.qLabels[i].text()), + 'event_name': bt.undo(self.qLabels[i].text()), 'next_tick': self.get_next_tick(self.times[i].text()), 'enabled': self.check_boxes[i].isChecked() } @@ -181,7 +181,7 @@ def _refresh_time(self): for item in changed_map: for i in range(len(self.qLabels)): - if self.config.serialize(self.qLabels[i].text()) == item[0]: + if bt.undo(self.qLabels[i].text()) == item[0]: self.times[i].blockSignals(True) self.times[i].setText(str(datetime.fromtimestamp(item[1]))) self.times[i].blockSignals(False) diff --git a/gui/components/template_card.py b/gui/components/template_card.py index 7862c1113..ea5638e98 100644 --- a/gui/components/template_card.py +++ b/gui/components/template_card.py @@ -5,7 +5,7 @@ IndicatorPosition, LineEdit from qfluentwidgets import FluentIcon as FIF -from gui.i18n.language import baasTranslator as bt +from gui.util.translator import baasTranslator as bt class TemplateSettingCard(ExpandSettingCard): diff --git a/gui/fragments/home.py b/gui/fragments/home.py index e4f307930..35b03cd96 100644 --- a/gui/fragments/home.py +++ b/gui/fragments/home.py @@ -16,7 +16,7 @@ ) from core.notification import notify -from gui.i18n.language import baasTranslator as bt +from gui.util.translator import baasTranslator as bt from window import Window diff --git a/gui/fragments/process.py b/gui/fragments/process.py index 0457fa408..c59030189 100644 --- a/gui/fragments/process.py +++ b/gui/fragments/process.py @@ -9,7 +9,7 @@ from PyQt5.QtWidgets import QWidget from qfluentwidgets import (ExpandLayout, ScrollArea, TitleLabel, SubtitleLabel, ListWidget, StrongBodyLabel) -from gui.i18n.language import baasTranslator as bt +from gui.util.translator import baasTranslator as bt lock = threading.Lock() diff --git a/gui/fragments/readme.py b/gui/fragments/readme.py index 2a07c99cc..20d3432b6 100644 --- a/gui/fragments/readme.py +++ b/gui/fragments/readme.py @@ -4,7 +4,7 @@ from qfluentwidgets import FluentIcon as FIF, FluentWindow, TextEdit import os -from gui.i18n.language import cfg +from gui.util.translator import baasTranslator as bt class ReadMeInterface(QFrame): @@ -39,9 +39,7 @@ def __init__(self): self.show() def getPath(self): - locale = cfg.get(cfg.language).value - suffix = locale.name() - directory = f'./src/descriptions_{suffix}' + directory = f'./src/descriptions_{bt.stringLang}' if os.path.isdir(directory): return directory return './src/descriptions/' diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index 3ff844066..c68686c94 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -8,7 +8,7 @@ from gui.components import expand from gui.components.template_card import SimpleSettingCard -from gui.i18n.language import cfg +from gui.util.translator import baasTranslator as bt class SettingsFragment(ScrollArea): @@ -24,7 +24,7 @@ def __init__(self, parent=None, config=None): self.basicGroupItems = [ ComboBoxSettingCard( - cfg.language, + bt.cfg.language, FIF.LANGUAGE, self.tr('语言'), self.tr('设置界面的首选语言'), @@ -49,8 +49,8 @@ def __init__(self, parent=None, config=None): ), SimpleSettingCard( - title="模拟器启动设置", - content="设置启动模拟器的路径", + title=self.tr("模拟器启动设置"), + content=self.tr("设置启动模拟器的路径"), sub_view=expand.__dict__['emulatorConfig'], parent=self.basicGroup, config=self.config diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index 2b153c4813ab34b89bec399201da76510d392186..9774bb57f69ecb7d99ee8b57c197269501f51d6d 100644 GIT binary patch delta 671 zcmY*WQAkr!82;|P+jU-WN25ubHn(DeWzrRAsAyzu&QhnFZdQ_t2o6k#sbQ2xDOo<` zI`yCrWrSdXu2^AGT43}RluOVD!$q4)FG3N~Lv`|k(8G7W^Z)$+_xJKoS|s&1(=URyjh0@Tb?tGY;XHE4gxNkCN-y`;|K-F0+QZSV6Mh+d8W z~ z3%i-%-%@JX%Cy5ogErlv=Kno3Y!HYH#`USWwb>~}blYQXw10g%7@g~a=GXT785nf*Aavkk2pxQN@?1tWsXz&qV2(=+ z42EGW$JPokFqn0)Ty6DaVDMNn`7UETBkN>aCN-|mm27tl_!t=6wolGwl4A-uKDn34 zk1NEJ{qn;F3=DoHlbsB>z{S82Y&f}=*-_lcRg8f_Q-I6FQjvkd zzlp1cONfCXD1P!?W;>>kmy=~#)R_D~Pj+RgV{$(~`6x>nm%j*~)4G`q3?Y*zyRzDG z1!nVoGZbWC2*{h<%c{o|q%(OhtD95kD}G7ChYSopclc#4R537U^FnCr?GQR}1Hati zI-nt9{FY5X7aGa%TODQqdMcgY>M~F~c*$g6HgPdY{+&7nz>xdG|9>JdBsnWH85qLE ZHdnFjcH6wzSAub~lYczd<~xy3m;s~)b>9F0 diff --git a/gui/i18n/en_US.ts b/gui/i18n/en_US.ts index 97baa0f43..13b1ab895 100644 --- a/gui/i18n/en_US.ts +++ b/gui/i18n/en_US.ts @@ -2,201 +2,196 @@ BAASTitleBar - - - 帮助 - Help - ConfigTranslation - + 每日特别委托 Special daily commission - + 悬赏通缉 Wanted for reward. - + 竞技场 The arena. - + 收集每日体力 Collect daily strength - + 收集小组体力 Collect team strength. - + 商店购买 Shop purchase - + 日程 Schedule - + 主线清除体力 Main line removes strength - + 自动MomoTalk AutoMomoTalk - + 咖啡厅 Café - + 查收邮箱 Check Mailbox - + 自动制造 Auto-manufacturing - + 收集奖励 Collection of awards - + 普通关清体力 It's normal. - + 困难关清体力 It's hard to clean up. - + 总力战 General - + 学院交流会 College Exchange - + 凌晨四点重启 Restarted at 4:00 a.m. - + 活动扫荡 Activity sweep - + 新的配置 New Configuration - + 功能开关 Function Switches - + 竞技场商店购买 The arena store. - + 扫荡及购买券设置 Sweeping and voucher settings - + 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 Important, this is a functional switch, controls whether the functions are on, and check before starting. - + 帮助你收集咖啡厅体力和信用点 Helps you collect the Café's strength and credit points. - + 自动每日日程 Automatic Daily Calendar - + 商店里买东西 Buying things in the store. - + 竞技场商店里买东西 Buying things in the arena store. - + 主线关卡自动清除体力与每日困难 Main level automatically removes physical strength and daily difficulties - + 帮助你自动打竞技场 Helps you play the arena. - + 帮助你自动制造 Helps you make it. - + 总力战期间自动打总力战 It's a force battle. - + 各种扫荡及购买券次数设置 Various sweeps and number of coupons settings - + 官服 The uniform. - + B服 B suit. - + 国际服 International uniform - + 日服 Daysuit. - + 拖动礼物 Drag the present. @@ -204,17 +199,17 @@ EventMapConfig - + 推故事 Push the story. - + 推任务 Push the job. - + 推挑战 Push the challenge. @@ -396,7 +391,7 @@ list selects the student you want to invite, and click to make sure: - + 添加学生 Add Student @@ -406,7 +401,7 @@ Select how to touch the head: - + 选择第二咖啡厅邀请的学生 Select the students invited to the second cafe. @@ -842,60 +837,70 @@ Adjust the parameters according to your computer configuration. - + 相关设置 Related Settings - + 普通图推图设置 Normal Thumbnail Settings - + 根据你的推图需求,调整相应的参数。 Adjust the parameters according to the needs of your slide. - + 困难图推图设置 Hard Chart Pushchart Settings - + 根据你所需困难图刷关,设置参数。 Set parameters according to your difficult chart brush off. - + 推剧情 A story. - + 主线剧情,小组剧情,支线剧情 Main, team, branch. - + 活动图设置 Activity Chart Settings - + 推故事,推任务,推挑战 Story, mission, challenge. - + 其他设置 Other Settings - + 其他的一些小功能与设置 Other small functions and settings + + + 模拟器启动设置 + Simulator Startup Settings + + + + 设置启动模拟器的路径 + Set the path to start the emulator + SweepCountConfig @@ -976,20 +981,25 @@ TemplateLayout - + 执行 Implementation - + 确定 Sure. - + 设置成功 Setup Success + + + 选择 + Selection + Window @@ -1039,7 +1049,7 @@ ConfigTranslation - + TemplateLayout TemplateLayout diff --git a/gui/i18n/language.py b/gui/i18n/language.py deleted file mode 100644 index 02575ab56..000000000 --- a/gui/i18n/language.py +++ /dev/null @@ -1,70 +0,0 @@ -from enum import Enum -from PyQt5.QtCore import QLocale, QTranslator -from qfluentwidgets import ConfigSerializer, OptionsConfigItem, OptionsValidator, QConfig, qconfig - - -class Language(Enum): - """ Language enumeration """ - - CHINESE_SIMPLIFIED = QLocale(QLocale.Chinese, QLocale.China) - ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) - # AUTO = QLocale() - - -class LanguageSerializer(ConfigSerializer): - """ Language serializer """ - - def serialize(self, language): - return language.value.name() #if language != Language.AUTO else "Auto" - - def deserialize(self, value: str): - return Language(QLocale(value)) #if value != "Auto" else Language.AUTO - - -class Config(QConfig): - """ Config of application """ - language = OptionsConfigItem( - "MainWindow", "Language", Language.ENGLISH, OptionsValidator(Language), LanguageSerializer(), restart=True) - - def __init__(self): - super().__init__() - - -class Translator(QTranslator): - def __init__(self, parent=None): - super().__init__(parent) - - def encode(self, *args): - return [arg.encode('utf-8') if arg else arg for arg in args] - - def decode(self, *args): - return [arg.decode('utf-8') if arg else arg for arg in args] - - def toString(self, tranlation: str | bytes) -> str: - if isinstance(tranlation, bytes): - tranlation = self.decode(tranlation) - return tranlation - - def tr(self, context: str | None, sourceText: str | None, disambiguation: str | None = None, n: int = -1) -> str: - """ - Convert sourceText by looking in the qm file. - Use this to access specific context tags outside source file. - - Parameters - ---------- - context: str - context tag in .ts file e.g ConfigTranslation - - sourceText: str - the text to translate - """ - bytesArgs = self.encode(context, sourceText, disambiguation) - translation = super().translate(*bytesArgs, n) - if translation: - return self.toString(translation) - return sourceText - - -cfg = Config() -qconfig.load('config/language.json', cfg) -baasTranslator = Translator() diff --git a/gui/util/config_set.py b/gui/util/config_set.py index 8e6116186..270d37a60 100644 --- a/gui/util/config_set.py +++ b/gui/util/config_set.py @@ -1,7 +1,6 @@ import json from core.notification import notify -from gui.i18n.language import baasTranslator as bt -from gui.i18n.config_translation import ConfigTranslation +from gui.util.translator import baasTranslator as bt class ConfigSet: @@ -12,7 +11,6 @@ def __init__(self, config_dir): self.static_config = None self.config_dir = config_dir self.signals = {} - self.translation = ConfigTranslation() self._init_config() def _init_config(self): @@ -26,28 +24,15 @@ def _init_config(self): self.server_mode = 'Global' elif self.config['server'] == '日服': self.server_mode = 'JP' - - def serialize(self, value): - # i18n to Chinese - if isinstance(value, str): - if self.translation.get(value): - value = self.translation.get(value) - return value - - def deserialize(self, value): - # Chinese to i18n - if isinstance(value, str): - value = bt.tr('ConfigTranslation', value) - return value def get(self, key): self._init_config() value = self.config.get(key) - return self.deserialize(value) + return bt.tr('ConfigTranslation', value) def set(self, key, value): self._init_config() - value = self.serialize(value) + value = bt.undo(value) self.config[key] = value with open(f'./config/{self.config_dir}/config.json', 'w', encoding='utf-8') as f: json.dump(self.config, f, indent=4, ensure_ascii=False) diff --git a/gui/i18n/config_translation.py b/gui/util/config_translation.py similarity index 97% rename from gui/i18n/config_translation.py rename to gui/util/config_translation.py index 800c74ebc..dedfa4913 100644 --- a/gui/i18n/config_translation.py +++ b/gui/util/config_translation.py @@ -73,11 +73,7 @@ def __init__(self, parent=None): self.tr('国际服'): '国际服', self.tr('日服'): '日服', - # patstyles + # patstyles combobox self.tr('拖动礼物'): '拖动礼物' } - - def get(self, key): - return self.entries.get(key) - diff --git a/gui/util/language.py b/gui/util/language.py new file mode 100644 index 000000000..649fc0a43 --- /dev/null +++ b/gui/util/language.py @@ -0,0 +1,11 @@ +from enum import Enum +from PyQt5.QtCore import QLocale + + +class Language(Enum): + """ Language enumeration """ + + CHINESE_SIMPLIFIED = QLocale(QLocale.Chinese, QLocale.China) + ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) + + diff --git a/gui/util/translator.py b/gui/util/translator.py new file mode 100644 index 000000000..2dbf97ae5 --- /dev/null +++ b/gui/util/translator.py @@ -0,0 +1,105 @@ +import typing + +from PyQt5.QtCore import QLocale, QTranslator +from qfluentwidgets import ConfigSerializer, OptionsConfigItem, OptionsValidator, QConfig, qconfig + +from gui.util.config_translation import ConfigTranslation +from gui.util.language import Language + + +class LanguageSerializer(ConfigSerializer): + """ Language serializer """ + + def serialize(self, language): + return language.value.name() + + def deserialize(self, value: str): + return Language(QLocale(value)) + + +class Config(QConfig): + """ Language config """ + language = OptionsConfigItem( + "Translator", "Language", Language.ENGLISH, OptionsValidator(Language), LanguageSerializer(), restart=True) + + def __init__(self): + super().__init__() + + +class Translator(QTranslator): + def __init__(self, parent=None): + super().__init__(parent) + self.cfg = Config() + qconfig.load('config/language.json', self.cfg) + + self.locale = self.cfg.get(self.cfg.language).value + self.stringLang = self.locale.name() + self.__config_translation = None + + def load(self, fileName: str) -> bool: + isLoaded = super().load(fileName) + self.__config_translation = ConfigTranslation() + return isLoaded + + def isString(self, value): + return isinstance(value, str) + + def isBytes(self, value): + return isinstance(value, bytes) + + def toString(self, tranlation: str | bytes) -> str: + if self.isBytes(tranlation): + tranlation = self.decode(tranlation) + return tranlation + + def encode(self, *args): + return [arg.encode('utf-8') if self.isString(arg) else arg for arg in args] + + def decode(self, *args): + return [arg.decode('utf-8') if self.isBytes(arg) else arg for arg in args] + + def __get(self, text): + return self.__config_translation.entries.get(text) + + def isChinese(self): + return self.stringLang == 'zh_CN' + + def tr(self, + context: str, + sourceText: str, + disambiguation: str | None = None, + n: int = -1) -> str: + """ + Translate sourceText by looking in the qm file. + Use this to access specific context tags. + + Parameters + ---------- + context: str + context tag in .ts file e.g ConfigTranslation + + sourceText: str + text to translate + """ + if not self.isChinese() and self.isString(sourceText) and self.isString(context): + bytesArgs = self.encode(context, sourceText, disambiguation) + translation = super().translate(*bytesArgs, n) + if translation: + return self.toString(translation) + return sourceText + + def undo(self, text: str) -> str: + """ + Undo translations by looking in ConfigTranslation. + + Parameters + ---------- + text: str + text to undo translation + """ + if not self.isChinese() and self.isString(text) and self.__get(text): + text = self.__get(text) + return text + + +baasTranslator = Translator() diff --git a/window.py b/window.py index ef81a94bc..c8eef0a1c 100644 --- a/window.py +++ b/window.py @@ -17,7 +17,7 @@ from core import default_config from gui.components.dialog_panel import SaveSettingMessageBox from gui.fragments.readme import ReadMeWindow -from gui.i18n.language import cfg, baasTranslator as bt +from gui.util.translator import baasTranslator as bt from gui.util.config_set import ConfigSet # sys.stderr = open('error.log', 'w+', encoding='utf-8') @@ -408,9 +408,8 @@ def start(): app = QApplication(sys.argv) # internationalization - locale = cfg.get(cfg.language).value - translator = FluentTranslator(locale) - bt.load("gui/i18n/" + locale.name()) + translator = FluentTranslator(bt.locale) + bt.load("gui/i18n/" + bt.stringLang) app.installTranslator(translator) app.installTranslator(bt) From c8035e9419b9895113c2bbaf313f9a6bf6845e63 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Mon, 8 Apr 2024 18:04:58 +0100 Subject: [PATCH 03/30] refactor: English translations --- gui/i18n/en_US.qm | Bin 24000 -> 24129 bytes gui/i18n/en_US.ts | 536 +++++++++++++++++++++-------------------- gui/util/translator.py | 4 +- i18n.pro | 3 +- window.py | 2 + 5 files changed, 284 insertions(+), 261 deletions(-) diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index 9774bb57f69ecb7d99ee8b57c197269501f51d6d..34dcf49e122836feec41cc30896b630379ec7614 100644 GIT binary patch literal 24129 zcmb_^3wTszn&zJniX>F3Fd9Wr40Kup4a!ArMMMd55do1P?#|^|0tAVK1e1U;yE_|@ zKoTxNxkE4sf<%!Jnp+4rr=9Jc?w!7<-P5;6d(@m$m2rCTX?y0GnV#+5_x-ZzoFKN5_agkDiHA;OoOR2F3)xaV1lu{4K zb?RUh_*RQj_ui`pzjlvOX)md8%Lb)Jep?ND{P#-D`Uf>OuTiPH3sl3HT%{&esP_uq zQR=>k`kM~{^Wl%xPh0;x9+yR?k|gKJ(v+KkJO z0FU))v-W(X)Wp?kFBkkqsTVTSKD_aaQUe;&K3y^%@Lo#${Nh=q?iiTX^WL8VpMo^w zpYZ&c&(nU>Iz*|jeLL-6et1Kv3ExQ{@Q?2)_05Cnw^fAk{MXX&`EY?!gIA`{{m#cq zjf6Dpe33aOWp8fX9^q_wJqxy8ddwtO+}nn)~vASswwfyV3^KpZi3qdG8H) z^Oi$+zhS^TXKR#N{Lz5V#$EzHj}G|aiR-|lO|Heu!S7o$zHVi9gt^kW9A+6czr7K?nS_N%0Fa|R*gz!6l6{<0Nfcf* z+<;z%)`LvgVev1s>pT8ZsXNDHw+(+useAThpPM>IsS%H4pNk9y-+r6@yIan|UdjgF zM|nTgIrz~l;Pb$207>cDCb0BIqW$vr#<`*=rwZQ-wZpO z_+ic`KkkO#Y0UZTR1WA_8_Fmc0R+lInM>xt&fgDZPx=J>em-=|`=7$j4~6btG#_?& zPbh!d)3Ebdp;13r1UqU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U_z6ZpPB1i(qSA_Lyg9Pe^Qht=-R>-(C4bVSnjfI-m^@6o14j=7 z5_kqeI~#2o&digE%V4a?I^Ct{mEjnWO9M}pRhCq3(B}nP2YeicPRg52bAn+3aEom# zy8U~ZSF_`nozvO18`Ydi60b|sQ3~z&e#R{1bk-bGOFJeZG4X;PqCNGnpb*J}^#uHp z3wS=n9wPBjbpHS|-#p-Qv2gK@dq0)uv>``^r}>ai<1xIR(=H!nG|aOl2j=}%HsC6& zm+OC$vUmaT*?z_e_u#}MX~8pI(vxDA6d|%P)nh-v$vPZm>Hh*WLQ7sLr>#ST6f`}r zRpX0Z{~}PWQS!mzjdq&JMbJ2EGmZfq3OxfbUeX3!6u_G~FdoEh2Ut2@pRtJRAxBGf fF(zG%I%nTFi}&uG@XfgCYfH - + BAASTitleBar + + + 帮助 + Help + ConfigTranslation - + 每日特别委托 - Special daily commission + Commissions - + 悬赏通缉 - Wanted for reward. + Bounty - + 竞技场 - The arena. + Tactical Challenge - + 收集每日体力 - Collect daily strength + Collect daily AP - + 收集小组体力 - Collect team strength. + Collect club AP - + 商店购买 - Shop purchase + Shop (Normal) - + 日程 - Schedule + Lesson - + 主线清除体力 - Main line removes strength + Mission - + 自动MomoTalk - AutoMomoTalk + MomoTalk - + 咖啡厅 - Café + Cafe - + 查收邮箱 - Check Mailbox + Mailbox - + 自动制造 - Auto-manufacturing + Crafting - + 收集奖励 - Collection of awards + Claim Rewards - + 普通关清体力 - It's normal. + Mission (Normal) Sweep - + 困难关清体力 - It's hard to clean up. + Mission (Hard) Sweep - + 总力战 - General + Total Assault - + 学院交流会 - College Exchange + Scrimmage - + 凌晨四点重启 - Restarted at 4:00 a.m. + Restart at 4am - + 活动扫荡 - Activity sweep + Event Sweep - + 新的配置 - New Configuration + New Configuration - + 功能开关 - Function Switches + Schedule - + 竞技场商店购买 - The arena store. + Shop (Tactical Challenge) - + 扫荡及购买券设置 - Sweeping and voucher settings + Sweep and Purchase Tickets Settings - + 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 - Important, this is a functional switch, controls whether the functions are on, and check before starting. + Control whether each task is turned on, make sure to do it before starting the script. - + 帮助你收集咖啡厅体力和信用点 - Helps you collect the Café's strength and credit points. + Helps you collect cafe AP and Credits - + 自动每日日程 - Automatic Daily Calendar + Automatic daily lesson - + 商店里买东西 - Buying things in the store. + Purchase in normal shop - + 竞技场商店里买东西 - Buying things in the arena store. + Purchase in tactical challenge shop - + 主线关卡自动清除体力与每日困难 - Main level automatically removes physical strength and daily difficulties + Automatically use AP to sweep Normal and Hard stages - + 帮助你自动打竞技场 - Helps you play the arena. + Helps you automate tactical challenge - + 帮助你自动制造 - Helps you make it. + Help you automate crafting - + 总力战期间自动打总力战 - It's a force battle. + Automatic Total Assault during Total Assault - + 各种扫荡及购买券次数设置 - Various sweeps and number of coupons settings + Various sweep and tickets purchase settings - + 官服 - The uniform. + CN - + B服 - B suit. + Bilibili - + 国际服 - International uniform + Global - + 日服 - Daysuit. + JP - + 拖动礼物 - Drag the present. + Drag the gift + + + + EmulatorConfig + + + 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) + Turn on the emulator when Baas is running + + + + 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) + Seconds to wait for the emulator to start + + + + 选择模拟器地址 + Enter emulator path @@ -201,17 +225,17 @@ 推故事 - Push the story. + Clear Story 推任务 - Push the job. + Clear Quest 推挑战 - Push the challenge. + Clear Challenge @@ -219,57 +243,57 @@ 是否手动boss战(进入关卡后暂停等待手操) - Is there a manual Boss fight? + Whether to manually boss battle (wait for human takeover after entering the level) 是否不强制打到sss(启用后跳过已通过但未sss的关卡) - Whether to call to sss (jump pass but not sss after active) + Whether to not force hitting sss (skip passed but not sss levels when enabled) 开启后强制打每一个指定的关卡(不管是否sss) - Force every specified level after opening (whether sss or not) + Force play for each specified stage after opening (with or without sss) 爆发一队 - Let's go! + Explosive Team 1 爆发二队 - Break two. + Explosive Team 2 贯穿一队 - Across the line. + Piercing Team 1 贯穿二队 - Break through Team Two. + Piercing Team 2 神秘一队 - Mystery team. + Mystic Team 1 神秘二队 - Mystery Two. + Mystic Team 2 振动一队 - Vibration one. + Sonic Team 1 振动二队 - Vibration two. + Sonic Team 2 @@ -277,17 +301,17 @@ 打到SSS - Call SSS. + Aim 3 Stars 拿礼物 - Get the present. + Collect gift 完成成就任务 - Achievement of the mandate + Achievement tasks completed @@ -295,32 +319,32 @@ 蔚蓝档案自动脚本 - AutoScript for Blue Files + Blue Archive Auto Script 无任务 - No task + No task 启动 - Start + Start 档案,启动 - Archives, start. + Launch 开始你的档案之旅 - Start your file trip. + Start Script 正在运行: - Running: + Running: @@ -328,197 +352,200 @@ 输入你需要对手比你低几级,高几级则填负数: - You're gonna need grades lower than you, and grades lower and negative: + Enter how many ranks below or above you need the opponent to be. +Use positive number for below and negative for above. 输入你最多需要刷新几次: - Enter how many times you need to refresh: + Enter how many times you need to refresh: 确定 - Sure. + Save 设置成功 - Setup Success + successfully set 你需要对手比你低 - You need to be lower than you. + You need a lower opponent than you 级 - Level + Grade 你最大刷新次数设置为: - The maximum number of times you refresh is: + Your maximum refresh count is set to: 刷新次数 - Refresh Number + Number of Refreshes 优先邀请好感等级低学生: - Priority is given to low-sense students: + Prioritize inviting students with low affection levels: 是否要领取奖励: - Incentives: + Claim rewards: 是否使用邀请券: - _Other Organiser + Use invitation ticket: 是否有二号咖啡厅: - Is there a Café No. 2: + Is there a second cafe: 列表选择你要添加邀请的学生,修改后请点击确定: - list selects the student you want to invite, and click to make sure: + The list selects the students you want to invite. Click Save to make changes: 添加学生 - Add Student + Add students 选择摸头方式: - Select how to touch the head: + Select the touch method: 选择第二咖啡厅邀请的学生 - Select the students invited to the second cafe. + Select the students to be invited in the second cafe 目前制造物品优先级,排在前面的会优先选择 - Current manufacture priority, ahead priority + Current manufacturing item priority, the first one will be selected first 是否使用加速券 - Whether to use an accelerator voucher + Whether to use booster tickets 推图选项 - Slide Options + Stages 请在下面填写要推的图,填写方式见-普通图自动推图说明- - Please fill in the drawings to be pushed below, as indicated in the AutoPage Note for the Normal Map. + Please enter the stages to be cleared +See Difficult-Chart Configuration Description in Help. 开始推图 - Start Pushing + Run 你的普通关配置已经被设置为: - Your general level configuration has been set to: + Your normal stage configuration has been set to: ,正在推普通关。 - It's pushing the normal level. + , pushing normal pass. 全部(不)启用 - Enable All + All (not) enabled 刷新执行时间 - Refresh execution time + Refresh Execution Time 排序方式: - Sort by: + Sort by 默认排序 - Default Sorting + Default order 按下次执行时间排序 - Sort by next execution time + Soonest 事件 - Events + Task 下次刷新时间 - Next time to refresh + Execution Time 启用 - Enable + Enable <b>困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍</b> - <b> Hardchart teams have the same attributes as normal ones (see normal slide settings) and please indicate the selection of hardchart level and set the team </b> according to the corresponding graph + <b>Hard stages follow the same team requirements of Normal stages(see Difficult Chart Configuration Description)</b> 你的困难关配置已经被设置为: - Your difficult configuration has been set to: + Your difficulty level configuration has been set to: ,正在推困难关。 - It's pushing hard. + , pushing hard pass. - 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): - Normal level and number (e.g. " 1-1, 1-2-3" means 1-1 and then 1-2): + 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): + Normal stage and number of sweeps(e.g. "1-1-1,1-2-3" means that stage 1-1 is swept once, then stage 1-2 is swept three times): 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: - The hardship level is set as above, note: maximum 3 times, commas are all English commas, daily and international. + Set hard stages as above, with a maximum of 3 sweeps. Use commas for separation. +For JP or Global server, you can use 'max'. 根据学生添加关卡 - Add level by student + Add based on students 爱丽丝宝贝 - Alice baby. + 爱丽丝宝贝 你的普通关卡已经被设置为: - Your normal level has been set to: + Normal stages has been set to: @@ -528,82 +555,82 @@ 优先做好感等级多的日程 - It's a high-profile agenda. + Prioritize a well-liked lesson 日程次数 - Number of programmes + Number of tickets 区域名称 - Area Name + Location 初级 - Primary + Novice 普通 - Normal + Normal 高级 - Advanced + Advanced 特级 - Super + Superior 请填写您的截图间隔: - Please fill in your screenshot interval: + Please fill in your screenshot interval: 你的截屏间隔已经被设置为: - Your screen interval has been set to: + Your screenshot interval has been set to: ADB地址(点击选择) - ADB Address (click selection) + ADB address (click to select) 自动查询模拟器失败!请尝试手动输入端口 - AutoQuery Simulator Failed! Please try to enter port manually + Automatic query emulator failed! Please try entering the port manually adb地址获取失败 - Could not close temporary folder: %s + adb address fetch failed 信用点 - Credit Point + Credits 青辉石 - Plumstone. + Pyroxene 最高难度 - Maximum difficulty + Highest Difficulty 你的总力战最高难度已经被设置为: - You've been set up as the most difficult force: + Your Total Assault Max Difficulty has been set to: @@ -611,57 +638,57 @@ 停止 - Stop + Stop 启动 - Start + Start 困难图推图已完成 - Hardchart extrapolation completed + Clear Hard Mission completed 普通图推图已完成 - Normal Thumbnail Completed + Clear Normal Mission completed 反和谐成功,请重启BA下载资源 - Counterharmonic success. Restart BA download resource. + Anti-harmony success, please restart BA download resources 主线剧情已完成 - The lead story is complete. + Main Story Completed 小组剧情已完成 - The team is finished. + Group Story Completed 支线剧情已完成 - The feeder story is complete. + Mini story completed 活动剧情已完成 - The event is complete. + Event Story Completed 活动任务已完成 - Active tasks completed + Event Quest Completed 活动挑战推图已完成 - Activity challenge mapping completed + Event Challenge Completed @@ -669,12 +696,12 @@ 一键反和谐 - One key against harmony. + One-click anti-harmony 显示首页头图(下次启动时生效) - Show header chart of the front page (effective at next start) + Show homepage header image (effective on next startup) @@ -682,22 +709,22 @@ 主线剧情需要推的章节数 - Number of chapters the main line plays need to push + The number of chapters to be pushed in the Main Story 开始推主线剧情 - Start pushing the main line. + Start pushing the Main Story 开始推小组剧情 - Let's start with the team. + Start pushing the Group Story 开始推支线剧情 - Start pushing the feeder. + Start pushing the Mini Story @@ -705,27 +732,27 @@ 调度状态 - Schedule status + Scheduling Status 执行中 - Under implementation + Executing 暂无正在执行的任务 - No ongoing tasks + No active tasks 队列中 - Queue + Queued 暂无队列中的任务 - No Queue Tasks + There are no tasks in the queue @@ -733,22 +760,22 @@ 新建配置 - New Configuration + New Configuration 输入新建的配置名: - Enter the new configuration name: + Enter the name of the new configuration: 确定 - Sure. + OK 取消 - Cancel + Cancel @@ -756,37 +783,37 @@ 请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本 - Select your server, please switch the server carefully and restart the script after switching the server + Please restart the script after switching server 官服 - The uniform. + CN B服 - B suit. + Bilibili 国际服 - International uniform + Global 日服 - Daysuit. + JP 请填写您的adb端口号 - Please fill in your adb port number. + Please fill in your adb port number 检测adb地址(检测目前开启的模拟器adb地址) - Testadb address (test for simulator adb address currently on). + Detect the adb address of the currently opened emulator @@ -794,112 +821,112 @@ 普通设置 - General Settings + General Settings 基本 - Basic + Basic 语言 - Languages + Language 设置界面的首选语言 - Set the preferred language for the interface + Set your preferred language for the GUI 使用系统设置 - Use System Settings + Use WordPress settings 应用相关设置 - Apply relevant settings + Server & Emulator Settings 选择你的服务器平台,设置你的端口(不知道端口请设置为0) - Select your server platform and set your port (please set it to 0) + Select your server platform and set your port (set to 0 if you don't know the port) 脚本相关设置 - Script Related Settings + Script Settings 根据你的电脑配置,调整相应的参数。 - Adjust the parameters according to your computer configuration. + Adjust the parameters according to your computer specs. + + + + 模拟器启动设置 + Emulator Startup Settings + + + + 设置启动模拟器的路径 + Set the path to start the emulator 相关设置 - Related Settings + Features 普通图推图设置 - Normal Thumbnail Settings + Clear Normal Mission Settings 根据你的推图需求,调整相应的参数。 - Adjust the parameters according to the needs of your slide. + Adjust the parameters according to your normal clear needs. 困难图推图设置 - Hard Chart Pushchart Settings + Clear Hard Mission Settings 根据你所需困难图刷关,设置参数。 - Set parameters according to your difficult chart brush off. + Adjust the parameters according to your hard clear needs. 推剧情 - A story. + Push the Story Forward 主线剧情,小组剧情,支线剧情 - Main, team, branch. + Main Story, Group Story, Mini Story 活动图设置 - Activity Chart Settings + Clear Event Settings 推故事,推任务,推挑战 - Story, mission, challenge. + Clear Story, Clear Quest, Clear Challenge 其他设置 - Other Settings + Miscellaneous 其他的一些小功能与设置 - Other small functions and settings - - - - 模拟器启动设置 - Simulator Startup Settings - - - - 设置启动模拟器的路径 - Set the path to start the emulator + Some other small features and settings @@ -907,62 +934,62 @@ <b>各区域扫荡次数以英文逗号分隔</b> - Number of regional sweeps separated by comma </b> + <b>Number of sweeps by area separated by commas</b> <b>各区域扫荡次数以英文逗号分隔,扫荡次数可以为max</b> - <b> Regions are separated by commas and can be max</b> + <b>The number of sweeps in each area is separated by commas in English, and the number of sweeps can be max</b> 悬赏委托扫荡 - The reward commission sweep. + Bounty 学园交流会扫荡 - The exchange will sweep. + Scrimmage 活动关卡扫荡关卡 - Activity level sweep level + Event Stage 活动关卡扫荡次数 - Number of activity level sweeps + Event Sweeps 特殊委托扫荡 - Special missions. + Commissions 国服购买邀请券可在<b>商店购买</b>中实现 - Invitations to purchase national uniforms can be obtained at <b> store + CN server purchase invitation tickets can be realized in the<b> store purchase</b> <b>用券数目设置,下拉框选择</b> - <b> set by the number of tickets, drop box selected </b> + <b>Number of tickets to buy, drop-down box selection</b> 悬赏委托扫荡券购买次数 - Number of reward commission tickets purchased + Number of tickets for Bounty 日程券购买次数 - Number of ticket purchases + Number of tickets for Lesson 学园交流会扫荡券购买次数 - The number of coupons that were cleared at the school fair. + Number of tickets for Scrimmage @@ -970,12 +997,12 @@ 配置设置 - Configure Settings + Dailies Settings 功能开关 - Function Switches + Tasks @@ -983,22 +1010,17 @@ 执行 - Implementation + Run - + 确定 - Sure. + Save 设置成功 - Setup Success - - - - 选择 - Selection + successfully set @@ -1006,32 +1028,32 @@ 主页 - Home Page + Home 配置 - Configure + Dailies 设置 - Settings + Settings 设置成功 - Setup Success + successfully set 是否要删除配置: - Whether to delete configuration: + Do you want to delete the configuration: 你需要在确认后重启BAAS以完成更改。 - You need to restart BAAS after confirmation to complete the change. + You will need to restart Baas after confirmation to complete the changes. @@ -1040,34 +1062,34 @@ ConfigTranslation 拖动礼物 - ConfigTranslation + ConfigTranslation ConfigTranslation 普通 - ConfigTranslation + ConfigTranslation - + TemplateLayout - TemplateLayout + TemplateLayout ConfigTranslation - ConfigTranslation + ConfigTranslation MainThread - MainThread + MainThread MainThread 停止 - MainThread + MainThread @@ -1075,7 +1097,7 @@ 帮助 - Help + Help - \ No newline at end of file + diff --git a/gui/util/translator.py b/gui/util/translator.py index 2dbf97ae5..20a81981b 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -36,10 +36,8 @@ def __init__(self, parent=None): self.stringLang = self.locale.name() self.__config_translation = None - def load(self, fileName: str) -> bool: - isLoaded = super().load(fileName) + def loadCfgTranslation(self): self.__config_translation = ConfigTranslation() - return isLoaded def isString(self, value): return isinstance(value, str) diff --git a/i18n.pro b/i18n.pro index 108582a6f..50108ddb1 100644 --- a/i18n.pro +++ b/i18n.pro @@ -3,6 +3,7 @@ SOURCES += \ gui/components/expand/arenaShopPriority.py \ gui/components/expand/cafeInvite.py \ gui/components/expand/createPriority.py \ + gui/components/expand/emulatorConfig.py \ gui/components/expand/eventMapConfig.py \ gui/components/expand/expandTemplate.py \ gui/components/expand/exploreConfig.py \ @@ -24,7 +25,7 @@ SOURCES += \ gui/fragments/readme.py \ gui/fragments/settings.py \ gui/fragments/switch.py \ - gui/i18n/config_translation.py \ + gui/util/config_translation.py \ window.py \ TRANSLATIONS += gui/i18n/en_US.ts diff --git a/window.py b/window.py index c8eef0a1c..4e700567c 100644 --- a/window.py +++ b/window.py @@ -413,6 +413,8 @@ def start(): app.installTranslator(translator) app.installTranslator(bt) + + bt.loadCfgTranslation() w = Window() # 聚焦窗口 From d43b6147b7a293721c42be5ada3d25a6c93f5100 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 00:02:09 +0100 Subject: [PATCH 04/30] docs: add readme for i18n --- auto_translate.py | 23 ++++- gui/README.md | 182 ++++++++++++++++++++++++++++++++++++++ gui/fragments/settings.py | 3 +- gui/util/language.py | 5 ++ 4 files changed, 209 insertions(+), 4 deletions(-) create mode 100644 gui/README.md diff --git a/auto_translate.py b/auto_translate.py index e35d4fa96..8b22d61a0 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -20,8 +20,19 @@ def handle(self, request): class Request: from_code = "zh" - def __init__(self, handlers: list[Handler], language: Language, argos_model: str): + """ + Parameters + ---------- + handlers: list[Handler] + a list of handlers that represent the the files to translate. + + language: Language + the memeber of the enum Language to translate + + argos_model: str + The argos model to load for translation + """ self.language = language self.strLang = language.value.name() self.handlers = handlers @@ -38,6 +49,7 @@ def process(self): class ModelHandler(Handler): + """Load argos model. It must always be the first element in the list of handlers""" def handle(self, request): # Load Argos Translate model to_code = request.to_code @@ -61,6 +73,7 @@ def handle(self, request): class XmlHandler(Handler): + """Translate ts files""" def handle(self, request): # Load the XML from a file input_file = os.path.join('gui/i18n/', f'{request.strLang}.ts') @@ -95,6 +108,7 @@ def handle(self, request): class HtmlHandler(Handler): + """Generate descriptions""" def translate_mission_types(self, request, input_dir, output_dir): input_path = os.path.join(input_dir, '各区域所需队伍属性.html') output_path = os.path.join(output_dir, request.translate('各区域所需队伍属性') + '.html') @@ -143,7 +157,10 @@ def handle(self, request): if __name__ == "__main__": - handlers_en = [ModelHandler(), XmlHandler()] - request_en = Request(handlers_en, Language.ENGLISH, 'en') + model = ModelHandler() + ts = XmlHandler() + descriptions = HtmlHandler() + + request_en = Request([model, ts, descriptions], Language.ENGLISH, 'en') request_en.process() diff --git a/gui/README.md b/gui/README.md new file mode 100644 index 000000000..0df2abc09 --- /dev/null +++ b/gui/README.md @@ -0,0 +1,182 @@ +# i18n Guide + +## Requirements + +- [Qt Linguist](https://github.com/thurask/Qt-Linguist/releases) +- [OPTIONAL] +``` +pip install -r requirements-i18n.txt +``` + +## Translation + +### Adding a New Language +To include a new language, add a new member to the Language enum representing the language with its corresponding QLocale object. Then, update the combobox method to return a list of language names based on the enum members order. For example, to add Japanese: +``` +class Language(Enum): + """ Language enumeration """ + + CHINESE_SIMPLIFIED = QLocale(QLocale.Chinese, QLocale.China) + ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) + JAPANESE = QLocale(QLocale.Japanese, QLocale.Japan) + + def combobox(): + return ['简体中文', 'English', '日本語'] +``` + +Run the Python file; it will print the language acronym: + +``` +ja_JP +``` + +Open `i18n.pro` and modify the `TRANSLATION` variable by appending `gui/i18n/` + acronym: + +```pro +TRANSLATIONS += gui/i18n/en_US.ts \ + gui/i18n/ja_JP.ts \ +``` + +Execute the following command to generate `.ts` files: + +``` +pylupdate5 i18n.pro +``` + +OPTIONAL: `auto_translate.py` + +Utilize `argostranslate` to accelerate translations after installing the necessary packages from `requirements-i18n.txt`. Note that while translations may not be perfect, they can speed up the process. + +Simply create a new `Request` instance at the end of `auto_translate.py` and invoke its `process` method. + +The `Request` constructor is as follows: + +```python +class Request: + from_code = "zh" + + def __init__(self, handlers: list[Handler], language: Language, argos_model: str): + """ + Parameters + ---------- + handlers: list[Handler] + a list of handlers that represent the files to translate. + + language: Language + the memeber of the enum Language to translate + + argos_model: str + The argos model to load for translation + """ +``` + +Then: + +```python +model = ModelHandler() +ts = XmlHandler() +descriptions = HtmlHandler() + +request_jp = Request([model, ts, descriptions], Language.JAPANESE, 'ja') +request_jp.process() +``` + +This means that `.ts` and description files will be generated. You can adjust the list of handlers as needed, but `model` must always be the first element. + +Open `Qt Linguist`, load the `.ts` file, and manually translate. This step will require some time. + +Afterward, navigate to `gui/i18n` and execute the following command: + +``` +lrelease ja_JP.ts +``` + +This will produce the `.qm` files. + +## `baasTranslator` + +### Problems +In normal scenarios, the `tr` method of `QObject` is used for translation, inherited by most PyQt5 classes. However, this approach isn't always possible for `baas` due to: + +- Widget text being generated from JSON files +- Need to retain user input (e.g., combobox selections) in Chinese within config files + +### Solution +To address this: + +- `ConfigTranslation`: a `QObject` subclass with a dictionary attribute mapping text enclosed in `self.tr` to itself: + +```python +... +self.entries = { + # display + self.tr("每日特别委托"): "每日特别委托", +... +``` + +- Utilize a specific instance of `QTranslator` named `baasTranslator` from `gui/util/translator.py` as `bt`, employing its methods: + + - `tr(context, sourceText)` + - `undo(text)` + +For instance, `bt.tr('ConfigTranslation', '国际服')` will produce its translation, 'Global', and `bt.undo('Global')` will revert it to '国际服'. This functionality is already implemented in `get` and `set` method of `ConfigSet`. + +In essence, `tr` accesses the `.qm` file to retrieve translations based on the `ConfigTranslation` context, while `undo` retrieves the value from the mapped dictionary where the translation was stored. + +Note that contexts other than `'ConfigTranslation'` are accessible. For example: + +```python +class Layout(TemplateLayout): + def __init__(self, parent=None, config=None): + configItems = [ + { + 'label': '一键反和谐', + 'type': 'button', + 'selection': self.fhx, + 'key': None + }, +... + super().__init__(parent=parent, configItems=configItems, config=config) +``` + +Suppose you want to translate the `label` and `selection` but can't access the `tr` method directly since you must first invoke the parent constructor and wish to avoid extensive modifications. Here's a solution: + +```python +class Layout(TemplateLayout): + def __init__(self, parent=None, config=None): + OtherConfig = QObject() + configItems = [ + { + 'label': OtherConfig.tr('一键反和谐'), + 'type': 'button', + 'selection': self.fhx, + 'key': None + }, +... + super().__init__(parent=parent, configItems=configItems, config=config, context="OtherConfig") +``` + +1. Add a new `context` parameter to the `TemplateLayout` constructor. +2. Create an instance of `QObject` named `OtherConfig`. This establishes a new context when generating the `.ts` files, allowing you to pass `'OtherConfig'` to the `TemplateLayout` constructor. + +Now, accessing translations in `TemplateLayout` becomes straightforward: + +```python +class TemplateLayout(QWidget): + patch_signal = pyqtSignal(str) + + def __init__(self, configItems: Union[list[ConfigItem], list[dict]], parent=None, config=None, context=None): +... + labelComponent = QLabel(bt.tr(context, cfg.label), self) +``` + +## Adding new GUI .py files +Please ensure to include the file path of the new GUI .py files into the `i18n.pro` file's `SOURCES` variable, taking care to use the correct slashes. For instance, if you're adding `table.py` located in `gui/components`, it should be appended like this: + +``` +SOURCES += \ + gui/components/table.py \ +``` + +## Adding new Config value +When adding a new config value that appears on the GUI and needs translation, update the `ConfigTranslation` dictionary by adding a new key-value pair. For comboboxes, make sure to include all options. diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index c68686c94..ca00f5de6 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -8,6 +8,7 @@ from gui.components import expand from gui.components.template_card import SimpleSettingCard +from gui.util.language import Language from gui.util.translator import baasTranslator as bt @@ -28,7 +29,7 @@ def __init__(self, parent=None, config=None): FIF.LANGUAGE, self.tr('语言'), self.tr('设置界面的首选语言'), - texts=['简体中文', 'English', self.tr('使用系统设置')], + texts=Language.combobox(), parent=self.basicGroup ), diff --git a/gui/util/language.py b/gui/util/language.py index 649fc0a43..2260b21c5 100644 --- a/gui/util/language.py +++ b/gui/util/language.py @@ -8,4 +8,9 @@ class Language(Enum): CHINESE_SIMPLIFIED = QLocale(QLocale.Chinese, QLocale.China) ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) + def combobox(): + return ['简体中文', 'English', '日本語'] +if __name__ == "__main__": + for language in Language: + print(language.value.name()) From 96c2185d0e2ff32f3de25794e6531b72ac4620e4 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 00:10:05 +0100 Subject: [PATCH 05/30] chore: add requirements-i18n.txt --- .gitignore | 1 + requirements-i18n.txt | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 requirements-i18n.txt diff --git a/.gitignore b/.gitignore index 31e440ef0..ed3196873 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ !window.spec !i18n.pro !auto_translate.py +!requirements-i18n.txt src/explore_task_data/__pycache__/normal_task_11.cpython-39.pyc *.pyc *.xml diff --git a/requirements-i18n.txt b/requirements-i18n.txt new file mode 100644 index 000000000..992351dfe --- /dev/null +++ b/requirements-i18n.txt @@ -0,0 +1,4 @@ +argostranslate +bs4 +lxml +translatehtml \ No newline at end of file From d967f1ebfd33e969567716c0638c9e4293d3adee Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 02:05:07 +0100 Subject: [PATCH 06/30] docs: update i18n readme --- gui/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/README.md b/gui/README.md index 0df2abc09..a2c04c8b1 100644 --- a/gui/README.md +++ b/gui/README.md @@ -81,7 +81,9 @@ request_jp = Request([model, ts, descriptions], Language.JAPANESE, 'ja') request_jp.process() ``` -This means that `.ts` and description files will be generated. You can adjust the list of handlers as needed, but `model` must always be the first element. +This means that `.ts` and description files will be generated. You can adjust the list of handlers as needed, but `model` must always be the first element. + +Also, in case no model exists for your language, you could create a new subclass of Request, override its translate method to use another Python library, and omit ModelHandler from the list of handlers. Open `Qt Linguist`, load the `.ts` file, and manually translate. This step will require some time. From e8f2d50e6e8e01d3c0a1211d63d13b8ba4297924 Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Tue, 9 Apr 2024 12:50:57 +0800 Subject: [PATCH 07/30] delete Union expression to run the code in python 3.9 --- gui/util/translator.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gui/util/translator.py b/gui/util/translator.py index 20a81981b..3c3e28b00 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -15,13 +15,13 @@ def serialize(self, language): def deserialize(self, value: str): return Language(QLocale(value)) - + class Config(QConfig): """ Language config """ language = OptionsConfigItem( "Translator", "Language", Language.ENGLISH, OptionsValidator(Language), LanguageSerializer(), restart=True) - + def __init__(self): super().__init__() @@ -35,37 +35,37 @@ def __init__(self, parent=None): self.locale = self.cfg.get(self.cfg.language).value self.stringLang = self.locale.name() self.__config_translation = None - + def loadCfgTranslation(self): self.__config_translation = ConfigTranslation() def isString(self, value): return isinstance(value, str) - + def isBytes(self, value): return isinstance(value, bytes) - - def toString(self, tranlation: str | bytes) -> str: + + def toString(self, tranlation) -> str: if self.isBytes(tranlation): tranlation = self.decode(tranlation) return tranlation - + def encode(self, *args): return [arg.encode('utf-8') if self.isString(arg) else arg for arg in args] def decode(self, *args): return [arg.decode('utf-8') if self.isBytes(arg) else arg for arg in args] - + def __get(self, text): return self.__config_translation.entries.get(text) - + def isChinese(self): return self.stringLang == 'zh_CN' - def tr(self, - context: str, - sourceText: str, - disambiguation: str | None = None, + def tr(self, + context: str, + sourceText: str, + disambiguation: str = '', n: int = -1) -> str: """ Translate sourceText by looking in the qm file. @@ -73,10 +73,10 @@ def tr(self, Parameters ---------- - context: str + context: str context tag in .ts file e.g ConfigTranslation - sourceText: str + sourceText: str text to translate """ if not self.isChinese() and self.isString(sourceText) and self.isString(context): @@ -85,14 +85,14 @@ def tr(self, if translation: return self.toString(translation) return sourceText - + def undo(self, text: str) -> str: """ Undo translations by looking in ConfigTranslation. Parameters ---------- - text: str + text: str text to undo translation """ if not self.isChinese() and self.isString(text) and self.__get(text): From 42fe04447c70efd033e9842e5223804268c2c477 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 15:19:44 +0100 Subject: [PATCH 08/30] refactor: descriptions_en_US --- auto_translate.py | 4 +- .../1) Common Emulator Adb addresses.html | 40 ++++ .../2) Blue Archive Internal Settings.html | 58 ++++++ ...) Explanation of Sweep Configurations.html | 50 +++++ ...4) Event Stages Sweeping Instructions.html | 49 +++++ .../5) Clear Stage Logic & Instructions.html | 87 +++++++++ .../6) Clear Hard and Normal Stages.html | 55 ++++++ .../7) Unit Types Required by Area.html | 43 +++++ .../8) Main Story Parameters Setting.html | 45 +++++ .../9) Reporting Guidelines on Issues.html | 44 +++++ .../Activity Sweep Filling Description.html | 88 --------- .../Auto-Material Description.html | 104 ----------- .../Common emulator adb address.html | 4 - .../Description of normal graphs.html | 173 ------------------ ...icult Chart Configuration Description.html | 9 - ...lue Archive game (first-use readable).html | 91 --------- .../Normal Sweeping Scanning Description.html | 68 ------- ...k force attributes required by region.html | 8 - ...ting guidelines on issues (important).html | 92 ---------- 19 files changed, 473 insertions(+), 639 deletions(-) create mode 100644 src/descriptions_en_US/1) Common Emulator Adb addresses.html create mode 100644 src/descriptions_en_US/2) Blue Archive Internal Settings.html create mode 100644 src/descriptions_en_US/3) Explanation of Sweep Configurations.html create mode 100644 src/descriptions_en_US/4) Event Stages Sweeping Instructions.html create mode 100644 src/descriptions_en_US/5) Clear Stage Logic & Instructions.html create mode 100644 src/descriptions_en_US/6) Clear Hard and Normal Stages.html create mode 100644 src/descriptions_en_US/7) Unit Types Required by Area.html create mode 100644 src/descriptions_en_US/8) Main Story Parameters Setting.html create mode 100644 src/descriptions_en_US/9) Reporting Guidelines on Issues.html delete mode 100644 src/descriptions_en_US/Activity Sweep Filling Description.html delete mode 100644 src/descriptions_en_US/Auto-Material Description.html delete mode 100644 src/descriptions_en_US/Common emulator adb address.html delete mode 100644 src/descriptions_en_US/Description of normal graphs.html delete mode 100644 src/descriptions_en_US/Difficult Chart Configuration Description.html delete mode 100644 src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html delete mode 100644 src/descriptions_en_US/Normal Sweeping Scanning Description.html delete mode 100644 src/descriptions_en_US/Task force attributes required by region.html delete mode 100644 src/descriptions_en_US/reporting guidelines on issues (important).html diff --git a/auto_translate.py b/auto_translate.py index 8b22d61a0..1cb9c5be5 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -161,6 +161,6 @@ def handle(self, request): ts = XmlHandler() descriptions = HtmlHandler() - request_en = Request([model, ts, descriptions], Language.ENGLISH, 'en') - request_en.process() + # request_en = Request([model, ts], Language.ENGLISH, 'en') + # request_en.process() diff --git a/src/descriptions_en_US/1) Common Emulator Adb addresses.html b/src/descriptions_en_US/1) Common Emulator Adb addresses.html new file mode 100644 index 000000000..a6c6eb1ed --- /dev/null +++ b/src/descriptions_en_US/1) Common Emulator Adb addresses.html @@ -0,0 +1,40 @@ + + + + + + +
+

Multiple Instance Ports (Please Refer to Specific Guides)

+

For multiple instance ports, please refer to specific guides for the appropriate port numbers.

+
+ +
+

Single Instance Emulator Ports

+
    +
  • MuMu: 7555
  • +
  • BlueStacks / LDPlayer: 5555 (For BlueStacks, enable adb port debugging)
  • +
  • Nox: 62001 / 59865
  • +
  • Mumu12: 16384
  • +
  • Memu: 21503
  • +
+
+ + diff --git a/src/descriptions_en_US/2) Blue Archive Internal Settings.html b/src/descriptions_en_US/2) Blue Archive Internal Settings.html new file mode 100644 index 000000000..fc7b323d4 --- /dev/null +++ b/src/descriptions_en_US/2) Blue Archive Internal Settings.html @@ -0,0 +1,58 @@ + + + + + + +

Blue Archive Internal Settings:

+

**Mandatory**:

+

Settings -> Graphics: Combat Screen Top and Bottom Black Bars: OFF

+

Memorial Lobby: Do not select Azi, Elu, Wakamo

+

Global Server Language: English

+

Recommended Settings (Does not affect script operation)

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ResolutionVery High
FPS60
Accelerated Rendering ModeCompatibility
Post-processingON
Anti-aliasingON
+ + diff --git a/src/descriptions_en_US/3) Explanation of Sweep Configurations.html b/src/descriptions_en_US/3) Explanation of Sweep Configurations.html new file mode 100644 index 000000000..e83968816 --- /dev/null +++ b/src/descriptions_en_US/3) Explanation of Sweep Configurations.html @@ -0,0 +1,50 @@ + + + + + + +
+

Explanation of Sweep Configurations

+

Each sweeping configuration is in the form of 'area - stage number - sweep times'.

+

This represents area 'area', stage 'stage number', and sweep times 'sweep times'.

+

Each configuration is separated by ','.

+
+ +
+

Available Sweepable Stages:

+

After Tutorial-1 and 5-5, all maps are available for sweeping.

+
+ +
+

Special Instructions:

+

For Global and Japanese servers, 'sweep times' can be specified as 'max'.

+

Tutorial requires 'area' to be the fixed string 'tutorial'.

+

BAAS will calculate whether the current stage can be swept based on current AP and stage AP. Insufficient AP or 'max' sweep times will result in skipping.

+
+ +
+

Example:

+

Assuming sufficient AP on the Global server:

+

tutorial-1-20,15-3-3,20-3-max

+

This means first sweep Tutorial-1 20 times, then sweep 15-3 for 3 times, and finally sweep all available stamina on 20-3.

+
+ + diff --git a/src/descriptions_en_US/4) Event Stages Sweeping Instructions.html b/src/descriptions_en_US/4) Event Stages Sweeping Instructions.html new file mode 100644 index 000000000..be2e52c8a --- /dev/null +++ b/src/descriptions_en_US/4) Event Stages Sweeping Instructions.html @@ -0,0 +1,49 @@ + + + + + + +
+

Event Stages Sweeping Instructions:

+

Sweeping a Single Stage:

+

For sweeping event stages, specify: 1 - highest difficulty as an integer.

+

Sweeping Frequency:

+

1. Integer indicates the number of times to sweep.

+

2. Decimal like 0.5 indicates sweeping with current AP * 0.5.

+

3. Fraction like 1/3 indicates sweeping with 1/3 of current AP.

+
+ +
+

Sweeping Multiple Stages:

+

Separate multiple stages and sweep counts with ',', indicating sweeping these stages sequentially.

+

Example:

+

Sweeping Stages:

+

9,10,11

+

Sweeping Counts:

+

0.5,3,1/3

+

AP: 999

+

Represents sweeping:

+

Stage 9: (999 * 0.5) / 20 = 25 times

+

Stage 10: 3 times

+

Stage 11: (999 * 1/3) / 20 = 16 times

+
+ + diff --git a/src/descriptions_en_US/5) Clear Stage Logic & Instructions.html b/src/descriptions_en_US/5) Clear Stage Logic & Instructions.html new file mode 100644 index 000000000..e80fcd646 --- /dev/null +++ b/src/descriptions_en_US/5) Clear Stage Logic & Instructions.html @@ -0,0 +1,87 @@ + + + + + + +

5) Clear Stage Logic & Instructions:

+ +

1. Usage Instructions:

+

+ (1) Unlock auto end-turn and + auto battle (automatically detected and activated). +

+

(2) Supports campaign mainline levels 4 - 25.

+

+ (3) When BAAS clear stages, units movement coordinates and routes are fixed. All movements are single-clicks + because in Blue Archive, if there are multiple units, they are arranged based on the units's + internal numbering coordinates and order of movements. +

+

+ (4) Due to (3), during automatic clear, it is + essential to ensure that unit numbers are in ascending order + . +

+

(5) BAAS will select units based on <Clear Normal Mission Settings> + and Unit Selection Logic to find suitable configurations for the stage.

+ +

Note down the first type of each area corresponding to [1] and the second type corresponding to [2].

+ +

Unit Selection Logic:

+
    +
  1. Prioritize unit selection based on [1] restraint relationships, gradually decreasing + the restraint relationships of remaining unit numbers.
  2. +
  3. When selecting a unit, if (4 - unit number) >= remaining required number of units.
  4. +
  5. If unable to ensure (1) and (2), gradually decrease the restraint relationships of [1] + corresponding units.
  6. +
  7. If certain units have been selected and the maximum number of (4 - these units) >= + remaining required number of units, the remaining units will be filled in by optional numbers in sequence.
  8. +
  9. If none of the above conditions are met, units will be selected in order of 1, 2, 3...
  10. +
+ +

Example:

+

+ For "Area 23 [Burst, Penetrate]," unit selection sequence:
+ Explosive Unit 1, Piercing Unit 1 -> Explosive Unit 1, Piercing Unit 2 -> Explosive Unit 1, Explosive Unit 2 -> ... +

+

If Explosive Unit 1 is number 3 and not selected in the above sequence, then select Unit 4 as the second unit.

+

If still not selected, then Unit 1 and 2 will be the final units.

+ +

Explanation for Clear Normal Mission Options:

+

+ If forced to play each specified stage is disabled, each number + entered represents the area to be cleared. The program will determine whether each stage in this area needs to + be cleared based on the current stage. +

+

Example:

+

15,16,14

+

Represents playing stages 15, 16, and 14 sequentially.

+ +

+ If forced to play each stage is enabled, enter a number + to clear all stages in that area once, or enter a number-range to specify stages. +

+

Example:

+

15,16-3

+

Represents playing levels 15-1, 15-2, 15-3, 15-4, 15-5, and 16-3 sequentially.

+ + diff --git a/src/descriptions_en_US/6) Clear Hard and Normal Stages.html b/src/descriptions_en_US/6) Clear Hard and Normal Stages.html new file mode 100644 index 000000000..5594082a0 --- /dev/null +++ b/src/descriptions_en_US/6) Clear Hard and Normal Stages.html @@ -0,0 +1,55 @@ + + + + + + +
+

Instructions for Hard and Normal Stages

+

Hard stages use the same unit types as Normal stages. Some Hard stages require 3 units, and the 3rd unit's type should match the 1st unit type required for that area.

+
+ +
+

Instructions for Filling in Normal Stages:

+
    +
  • Strings filled in Normal stages should not exceed the following characters or words: "-", "sss", "present", "task", ",", and numbers.
  • +
  • After splitting by commas, convert into multiple strings based on specific rules.
  • +
+ +

1. Strings without the keywords "sss", "present", "task":
+ Example: 15,12-2
+ Clear (15-1, 15-2, 15-3, 12-2) based on Hard stage settings.

+ +

2. A number followed by strings, separated by "-":
+ Example: 15-sss-present
+ Clear (15-1, 15-2, 15-3) while aiming "sss"(3 stars) and getting gifts.

+ +

3. Two numbers (specified for corresponding stages):
+ Example: 15-3-sss-task
+ Clear 15-3 to reach "sss" and complete challenge tasks.

+ +

4. Example:
+ All switches are on, fill in: 7,8-sss,9-3-task
+ Clear (7-1, 7-2, 7-3) while aiming "sss" and completing tasks. Clear (8-1, 8-2, 8-3) while aiming "sss" and completing the 9-3 challenge task.

+
+ +
+

Note: Baas will automatically check if a stage has reached "sss" or if gifts have been obtained. If these conditions are met, the stage will be skipped.

+
+ + diff --git a/src/descriptions_en_US/7) Unit Types Required by Area.html b/src/descriptions_en_US/7) Unit Types Required by Area.html new file mode 100644 index 000000000..6c1dd8575 --- /dev/null +++ b/src/descriptions_en_US/7) Unit Types Required by Area.html @@ -0,0 +1,43 @@ + + + + Weapon List + + + +

25 [Sonic, Piercing]

+

24 [Sonic, Explosive]

+

23 [Explosive, Piercing]

+

22 [Piercing, Mystic]

+

21 [Mystic, Explosive]

+

20 [Explosive, Piercing]

+

19 [Piercing, Mystic]

+

18 [Mystic, Explosive]

+

17 [Explosive, Piercing]

+

16 [Piercing, Mystic]

+

15 [Mystic, Mystic]

+

14 [Explosive, Mystic]

+

13 [Piercing, Piercing]

+

12 [Mystic, Explosive]

+

11 [Piercing, Mystic]

+

10 [Explosive, Mystic]

+

9 [Explosive, Piercing]

+

8 [Piercing, Piercing]

+

7 [Explosive, Explosive]

+

6 [Piercing, Piercing]

+

5 [Explosive]

+

4 [Piercing]

+

3 [Piercing]

+

2 [Explosive]

+

1 [Explosive]

+ + diff --git a/src/descriptions_en_US/8) Main Story Parameters Setting.html b/src/descriptions_en_US/8) Main Story Parameters Setting.html new file mode 100644 index 000000000..001dc7dd8 --- /dev/null +++ b/src/descriptions_en_US/8) Main Story Parameters Setting.html @@ -0,0 +1,45 @@ + + + + + + +
+

Main Story Parameters Setting

+

Baas can automatically progress through the story, but some battles in the final chapter cannot be automated.

+

Number-to-Chapter Reference:

+

1: Chapter 1

+

2: Chapter 2

+

3: Chapter 3

+

4: Chapter 4

+

5: Final Chapter

+

6: Chapter 5

+

Separate chapter numbers with "," to indicate the sequence to progress through.

+

Example:

+

1,3,5

+

Progress through Chapter 1, Chapter 3, and the Final Chapter sequentially.

+

Leaving it blank will use default configurations.

+

For different servers:

+

CN Server: 1,2,3

+

Global Server: 1,2,3,4,5,4

+

JP Server: 1,2,3,4,5,4,6

+
+ + diff --git a/src/descriptions_en_US/9) Reporting Guidelines on Issues.html b/src/descriptions_en_US/9) Reporting Guidelines on Issues.html new file mode 100644 index 000000000..fe604d860 --- /dev/null +++ b/src/descriptions_en_US/9) Reporting Guidelines on Issues.html @@ -0,0 +1,44 @@ + + + + + + +

Before Reporting an Issue, Consider:

+

1. Has this issue occurred before? Can I attempt to resolve it myself (using Baidu or tutorials)?

+

If Unable to Resolve:

+

2. Is this issue happening consistently every time I run?

+

3. How can I provide enough information to help others assist me in solving the problem?

+

4. Posting colorful images in the QQ group might attract more help to solve the problem.

+

Issue Types and Corresponding Reporting Contents (Yellow highlights are necessary)

+

1. I'm stuck on the XXX page and can't proceed!

+

(1). Take a screenshot of the 1280x720 game screen when stuck (Press F9 in MuMu to capture)

+

(2). Capture Baas logs

+

(3). Try switching pages to see if it's consistently stuck on this page

+

2. I'm stuck while progressing through the grid!

+

(1). Try restarting and observing 1-2 times to see if it gets stuck at the same spot.

+

(1). Record a complete video from clicking "Start Mission" until getting stuck, ensuring both the emulator game interface and Baas log interface are captured in the video.

+

3. I configured XXX but it didn't work! / I didn't configure XXX but it worked!

+

(1). Read the configuration instructions carefully to ensure correct understanding of how to fill them.

+

(2). Provide screenshots of the configuration and Baas logs.

+ + diff --git a/src/descriptions_en_US/Activity Sweep Filling Description.html b/src/descriptions_en_US/Activity Sweep Filling Description.html deleted file mode 100644 index 6647bda23..000000000 --- a/src/descriptions_en_US/Activity Sweep Filling Description.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - -

- Information for the activity map sweep: -

-

- - - Sweep it. - - - : -

-

- Active level sweep level filled in: 1 - Maximum difficulty 1 - - Integer - -

-

- Number of sweeps: -

-

- 1. - - Integer - - Means number of sweeps -

-

- 2. - - Decimal - - 0.5 indicates that the current physical strength *0.5 is used to sweep the level -

-

- 3. - - Score - - 1/3 = 1/3 clearance of the level using current physical strength -

-

- - - It's too much. - - - : -

-

- Use ', ', 'segregating multiple clearances at one level, which means sweep them in turn -

-

- Example: -

-

- Sweep level: -

-

- 9, 10, 11 -

-

- Number of sweeps: -

-

- 0.5, 3, 1/3 -

-

- Physical: 999 -

-

- Means sweep in turn. -

-

- Level 9 (999*0.5) / 20 = 25 times -

-

- 10th Level 3 -

-

- Level 11 (999* 1/3)/ 20 = 16 -

- - diff --git a/src/descriptions_en_US/Auto-Material Description.html b/src/descriptions_en_US/Auto-Material Description.html deleted file mode 100644 index afeceb323..000000000 --- a/src/descriptions_en_US/Auto-Material Description.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - -

- - - Main-line scenario settings - - -

-

- - - Autoplay helps move the grid. - - - But... - - - Finally, some of the battles cannot be fought automatically. - - -

-

- - Numbers vs. Chapter Tables - -

-

- - 1: Chapter I - -

-

- - 2: Chapter II - -

-

- - 3: Chapter III - -

-

- - 4: Chapter IV - -

-

- - 5: Final Chapter - -

-

- - 6: Chapter V - -

-

- - Use "," to separate the numbers to indicate the secondary sections. - -

-

- - Example: - -

-

- - One, three, five. - -

-

- - Expressed in turn in chapter I, chapter III, final chapter - -

-

- - Default configuration for nothing - -

-

- - State uniform: 1,2,3 - -

-

- - International uniforms: 1,2,3,4,5,4 - -

-

- - Daily clothing: 1, 2, 3, 4, 5, 4, 6 - -

-
-

-  
- - diff --git a/src/descriptions_en_US/Common emulator adb address.html b/src/descriptions_en_US/Common emulator adb address.html deleted file mode 100644 index e2c506b4e..000000000 --- a/src/descriptions_en_US/Common emulator adb address.html +++ /dev/null @@ -1,4 +0,0 @@ -

-

-
For more starters, please check yourself.

Single Emulator Port

1. MuMu: 7555
2. Blue stacks/trays: 5555 (Blue stack emulator to check open adb port debug function)
Night God: 62001 / 59865
4. Mumu12:16384
Free: 21503
-


diff --git a/src/descriptions_en_US/Description of normal graphs.html b/src/descriptions_en_US/Description of normal graphs.html deleted file mode 100644 index 4704f220d..000000000 --- a/src/descriptions_en_US/Description of normal graphs.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - -

- Description of normal graphs: -

-

- 1. Description of use: -

-

- (1): Must - - - Unlock - - - Automatically end rounds and - - - Autofight. - - - (automated detection and opening) -

-

- (2): Supported level main line ordinary - - - 4 - 25 - - -

-

- (3): Teams move click coordinates and routes when BAAS slides are fixed and all moves are only one click, and because of the number of teams in the Blue Archive slides, the numbering coordinates and the order of movement vary according to the team. -

-

- (4): As (3), when automatically extrapolating - - - You have to make sure the selection team numbers are smaller and bigger. - - I don't know. - - - -

-

- - - (5): BAAS will choose the basis - - - < Normal Thumbnail Settings > - - - - - the selected group properties - - - - and - - - ♪ Team logic ♪ - - - Find the right configuration for the slide - -

-

- The first of the corresponding properties in the following diagrams is [1] and the second is [2]. -

-

- Team logic: -

-

- 1 Prioritize the selection of the remaining team numbers on the basis of the relationship of restraint and gradually reduce the relationship of attribution to the remaining counterpart. -

-

- 2 When selecting a team (4 - the team number) > = the number of remaining teams required. -

-

- 3 Gradual reduction of the relationship of restraint among the [1] counterparts, if no assurance is provided for 1 or 2 -

-

- 4 If some teams have been selected and 4 - the maximum number of these teams > = the number of remaining teams required, the remaining teams will be filled with an optional number. -

-

- 5 None of the above conditions are met, and the selected team number is 1, 2, 3 -

-

- - Example: - -

-

- Selecting the order of the 23 [Explosion, Crossing] task force -

-

- One team, one team. -

-

- If an outbreak is numbered 3 and not selected in the above order, select 4 as the second -

-

- Choose 12 as the final team if not elected -

-

- - - Description of normal graph push-chart level: - - -

-

- - 1. If - - - Could not close temporary folder: %s - - - , each number to be filled indicates the area to be pushed, and the program will judge whether each level in the area is to be hit according to whether the current level is sss - -

-

- - Example: - -

-

- - 15, 16, 14 - -

-

- - This represents a roll-down of figure 15,16,14. - -

-

- - 2. - - - If - - - Enable mandatory hits at each specified level - - - , enter a number to push the relevant card in the area once and enter a number-number to specify level - -

-

- - Example: - -

-

- - 15, 16-3 - -

-

- - 15-1, 15-2, 15-3, 15-4, 15-5, 16-3 - -

- - diff --git a/src/descriptions_en_US/Difficult Chart Configuration Description.html b/src/descriptions_en_US/Difficult Chart Configuration Description.html deleted file mode 100644 index de6c80f23..000000000 --- a/src/descriptions_en_US/Difficult Chart Configuration Description.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - -
-
The hardship map is used in the same way as the team logic and normal figure, and some of the difficult maps require three teams, all of which have the same attributes as the first for the region.

Fill in the following instructions:

The string that should be filled in the slide level should not exceed the characters or words "-", "sss", "present", "task", ",", and numbers
Split into several strings after commas
No keyword "sss", "present", "task"
Example: 15,12-2
Three switches (15-1, 15-2, 15-3, 12-2) according to the difficult map settings will be called to sss/take presents/take challenge tasks

2. A number and a string separated by "-"
Example: 15-sss-present
Will be called to sss with gifts (15-1, 15-2, 15-3)

3. Two numbers (specify the corresponding level)
Example: 15-3-sss-task
They'll call 15-3 to sss and complete the challenge.

4. Examples
Switches are all open, fill in: 7,8-sss, 9-3-task
It is indicated that the calls (7-1, 7-2, 7-3) to sss, the gifts and the challenging tasks, (8-1, 8-2, 8-3) to sss, 9-3
Note: Baas will automatically determine whether the level has reached sss, whether it has taken a gift or, if it has reached sss or has taken a gift, skips the level.
-
- - diff --git a/src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html b/src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html deleted file mode 100644 index 5f93badc5..000000000 --- a/src/descriptions_en_US/Internal setup for the Blue Archive game (first-use readable).html +++ /dev/null @@ -1,91 +0,0 @@ - - - - -

- Blanche Files - - Game Internal Settings - - : -

-

- - - ** Required** - - - : -

-

- - Option - > Image - - : The battle scene up and down the black side: OFF -

-

- - Memory Hall - - : I don't want Yako, Alo, Yuka -

-

- - International language of service - - English -

-

- - Recommended Selection - - (does not affect script running) -

- - - - - - - - - - - - - - - - - - - - - - - -
- Resolution - - Highest -
- Frame - - 60 -
- Accelerate rendering mode - - Compatibility -
- Postprocessing - - ON -
- It's against sawn teeth. - - ON -
-

-

- - diff --git a/src/descriptions_en_US/Normal Sweeping Scanning Description.html b/src/descriptions_en_US/Normal Sweeping Scanning Description.html deleted file mode 100644 index 6314c8b75..000000000 --- a/src/descriptions_en_US/Normal Sweeping Scanning Description.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - -

- Each sweep configuration is like 'region ' - 'task number ' - 'sweep times ' -

-

- Organisation - - Regional - - 'region' - - Level - - "task-number" - - Number of sweeps - - @sweeptimes -

-

- Each configuration is separated by ', ' -

-

- 1. - - - Available Sweep Levels - - - : -

-

- All maps after Academy 1 and 5 -

-

- 2. - - - Special description - - -

-

- International, `sweep times' can be `max' -

-

- The tutorial requires 'region' as a fixed string'tutorian' -

-

- BAAS calculates whether the current level can be cleaned, depending on the current physical strength and the level of the level. -

-

- Example: -

-

- When the international uniform is physically adequate -

-

- TUTORIAL-1-20, 15-3, 20-3-max -

-

- It means cleaning the curriculum 1 20 times, then cleaning 15-3, 3 times, and then all the physical sweeps 20-3 times. -

- - diff --git a/src/descriptions_en_US/Task force attributes required by region.html b/src/descriptions_en_US/Task force attributes required by region.html deleted file mode 100644 index 38e20f22e..000000000 --- a/src/descriptions_en_US/Task force attributes required by region.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -

25[ Sonic , Piercing ]
24[ Sonic , Explosive ]
23[ Explosive , Piercing ]
22[ Piercing , Mystic ]
21[ Mystic , Explosive ]
20[ Explosive , Piercing ]
19[ Piercing , Mystic ]
18[ Mystic , Explosive ]
17[ Explosive , Piercing ]
16[ Piercing , Mystic ] 
15[ Mystic , Mystic ] 
14[ Explosive , Mystic ] 
13[ Piercing , Piercing ] 
12[ Mystic , Explosive ] 
11[ Piercing , Mystic ] 
10[ Explosive , Mystic ]
9  [ Explosive , Piercing ]
8  [ Piercing , Piercing ]   
7  [ Explosive , Explosive ]    
6  [ Piercing , Piercing ]   
5  [ Explosive ]
4  [ Piercing ]
3  [ Piercing ]
2  [ Explosive ]
1  [ Explosive ]

- - diff --git a/src/descriptions_en_US/reporting guidelines on issues (important).html b/src/descriptions_en_US/reporting guidelines on issues (important).html deleted file mode 100644 index eda95dc6c..000000000 --- a/src/descriptions_en_US/reporting guidelines on issues (important).html +++ /dev/null @@ -1,92 +0,0 @@ -

- - Let's think about it before we report it: - -

-

- - 1. This question has never arisen before and can I try to solve it myself (Baidu, curriculum). - -

-

- - It can't be solved. - -

-

- - 2. The question arises whether I am running every time. - -

-

- - 3. How can I provide sufficient information for others to help me solve the problem? - -

-

- - 4. The distribution of colour maps within the qq group may be more attractive to others to help solve problems. - -

-

- - - Type of problem versus corresponding - - Reporting (yellow necessary) - - - -

-

- - I'm stuck on page XXX! : - -

-

- - (1). - - 1280 x 720 games when stuck - - - (Mumu on F9) - - -

-

- (2). Baas Logshot -

-

- (3). Try to switch pages to see if they only get stuck on this page -

-

- - I can't move it! : - -

-

- (1) Attempts to repulse the observation of one or two times whether each time the card is in one position. -

-

- - - (1). Recording the complete video from the "start-up slide" to the time of the stop, with attention to the simulator and the Bas log interface being recorded on the same screen. - - -

-

- - I set up the XXX configuration but didn't fight! I didn't set up XXX but I did! : - -

-

- (1) Read the configuration instructions carefully to see if they correctly understand how to fill them out. -

-

- - - (2) Configure screenshots and program logs. - - -

From 3ac5344dfa203f9359c86c8ea8d499790228b98c Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 18:54:23 +0100 Subject: [PATCH 09/30] fix: English translations for shop --- gui/components/expand/arenaShopPriority.py | 4 +- gui/components/expand/shopPriority.py | 4 +- gui/i18n/en_US.qm | Bin 24129 -> 25984 bytes gui/i18n/en_US.ts | 189 ++++++++++++++++----- gui/util/config_translation.py | 26 +++ gui/util/config_translation_generator.py | 78 +++++++++ gui/util/language.py | 2 +- gui/util/translator.py | 8 +- 8 files changed, 265 insertions(+), 46 deletions(-) create mode 100644 gui/util/config_translation_generator.py diff --git a/gui/components/expand/arenaShopPriority.py b/gui/components/expand/arenaShopPriority.py index bc61613e4..3b82148cc 100644 --- a/gui/components/expand/arenaShopPriority.py +++ b/gui/components/expand/arenaShopPriority.py @@ -2,6 +2,8 @@ from PyQt5.QtWidgets import QWidget, QLabel, QPushButton, QHBoxLayout, QVBoxLayout from qfluentwidgets import FlowLayout, CheckBox, LineEdit +from gui.util.translator import baasTranslator as bt + class Layout(QWidget): def __init__(self, parent=None, config=None): @@ -28,7 +30,7 @@ def __init__(self, parent=None, config=None): for i in range(0, goods_count): t_cbx = CheckBox(self) t_cbx.setChecked(self.goods[i] == 1) - ccs = QLabel(self.default_goods[i][0], self) + ccs = QLabel(bt.tr('ConfigTranslation', self.default_goods[i][0]), self) ccs.setFixedWidth(110) price_text = str(self.default_goods[i][1]) price_label = QLabel(price_text, self) diff --git a/gui/components/expand/shopPriority.py b/gui/components/expand/shopPriority.py index f9033096d..f8ecce354 100644 --- a/gui/components/expand/shopPriority.py +++ b/gui/components/expand/shopPriority.py @@ -2,6 +2,8 @@ from PyQt5.QtWidgets import QWidget, QLabel, QPushButton, QHBoxLayout, QVBoxLayout from qfluentwidgets import FlowLayout, CheckBox, LineEdit +from gui.util.translator import baasTranslator as bt + class Layout(QWidget): def __init__(self, parent=None, config=None): @@ -31,7 +33,7 @@ def __init__(self, parent=None, config=None): for i in range(len(self.goods)): t_cbx = CheckBox(self) t_cbx.setChecked(self.goods[i] == 1) - ccs = QLabel(self.default_goods[i][0], self) + ccs = QLabel(bt.tr('ConfigTranslation', self.default_goods[i][0]), self) ccs.setFixedWidth(150) price_text = str(self.default_goods[i][1]) if self.default_goods[i][2] == 'creditpoints': diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index 34dcf49e122836feec41cc30896b630379ec7614..27832cb06d23b22299c4ff0853d35ee12248e36e 100644 GIT binary patch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F*g{>b{}^sV}L9 z`VtPQT~?(A2GXu}VcJWo+ZNhRYE(TgkRe5Ug3C9mesNTwXoDJf>DTmog9}qLU04>c z26wa96&-5g@7uVD&Z|k?e4YP{n$$o2Jw;6(qOyz6so6~|B)(lO>Z~W>+#~9-*al$P z2KDh)PPz0&4Y$Q1M`3lCqs&m?d{+_#$2wEF^Q8G#dOv?;;RQU48q^^arKrX_p4MWe zW41M0Sm9{4RtPJd=d2$Kj&9HG&O_cgf-}!IP;~YL9x(}Hj`fj?49$G?Eb1JmB2y!y z(8N 收集每日体力 - Collect daily AP + Collect Daily AP 收集小组体力 - Collect club AP + Collect Club AP @@ -74,7 +74,7 @@ 收集奖励 - Claim Rewards + Tasks @@ -177,30 +177,140 @@ Various sweep and tickets purchase settings - + 官服 CN - + B服 Bilibili - + 国际服 Global - + 日服 JP - + 拖动礼物 Drag the gift + + + 初级经验书 + Novice Report + + + + 中级经验书 + Normal Report + + + + 高级经验书 + Advanced Report + + + + 特级经验书 + Superior Report + + + + 初级经验珠 + Lesser Stone + + + + 中级经验珠 + Normal Stone + + + + 高级经验珠 + Advanced Stone + + + + 特级经验珠 + Superior Stone + + + + 随机初级神秘古物 + Basic Relic + + + + 随机中级神秘古物 + Intermediate Relic + + + + 静子神明文字x5 + Shizuko's Eleph + + + + 真白神明文字x5 + Mashiro's Eleph + + + + 纱绫神明文字x5 + Saya's Eleph + + + + 风香神明文字x5 + Fuuka's Eleph + + + + 歌原神明文字x5 + Utaha's Eleph + + + + 初级经验书x5 + Normal Report x5 + + + + 中级经验书x10 + Novice Report x10 + + + + 高级经验书x3 + Advanced Report x3 + + + + 特级经验书x1 + Superior Report x1 + + + + 信用点x5k + Credits x5k + + + + 信用点x75k + Credits x75k + + + + 信用点x125k + Credits x125k +
EmulatorConfig @@ -361,7 +471,7 @@ Use positive number for below and negative for above. Enter how many times you need to refresh: - + 确定 Save @@ -386,7 +496,7 @@ Use positive number for below and negative for above. Your maximum refresh count is set to: - + 刷新次数 Number of Refreshes @@ -448,8 +558,8 @@ Use positive number for below and negative for above. 请在下面填写要推的图,填写方式见-普通图自动推图说明- - Please enter the stages to be cleared -See Difficult-Chart Configuration Description in Help. + Please enter the stages to be cleared +See Clear Hard and Normal Stages in Help. @@ -494,7 +604,7 @@ See Difficult-Chart Configuration Description in Help. 事件 - Task + Chore @@ -509,7 +619,8 @@ See Difficult-Chart Configuration Description in Help. <b>困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍</b> - <b>Hard stages follow the same team requirements of Normal stages(see Difficult Chart Configuration Description)</b> + <b>Hard stages follow the same unit requirements of Normal stages +(see Clear Hard and Normal Stages in Help)</b> @@ -613,12 +724,12 @@ For JP or Global server, you can use 'max'. adb address fetch failed - + 信用点 Credits - + 青辉石 Pyroxene @@ -819,112 +930,112 @@ For JP or Global server, you can use 'max'. SettingsFragment - + 普通设置 General Settings - + 基本 Basic - + 语言 Language - + 设置界面的首选语言 Set your preferred language for the GUI 使用系统设置 - Use WordPress settings + Use WordPress settings - + 应用相关设置 Server & Emulator Settings - + 选择你的服务器平台,设置你的端口(不知道端口请设置为0) Select your server platform and set your port (set to 0 if you don't know the port) - + 脚本相关设置 Script Settings - + 根据你的电脑配置,调整相应的参数。 Adjust the parameters according to your computer specs. - + 模拟器启动设置 Emulator Startup Settings - + 设置启动模拟器的路径 Set the path to start the emulator - + 相关设置 Features - + 普通图推图设置 Clear Normal Mission Settings - + 根据你的推图需求,调整相应的参数。 Adjust the parameters according to your normal clear needs. - + 困难图推图设置 Clear Hard Mission Settings - + 根据你所需困难图刷关,设置参数。 Adjust the parameters according to your hard clear needs. - + 推剧情 Push the Story Forward - + 主线剧情,小组剧情,支线剧情 Main Story, Group Story, Mini Story - + 活动图设置 Clear Event Settings - + 推故事,推任务,推挑战 Clear Story, Clear Quest, Clear Challenge - + 其他设置 Miscellaneous - + 其他的一些小功能与设置 Some other small features and settings @@ -1002,7 +1113,7 @@ For JP or Global server, you can use 'max'. 功能开关 - Tasks + Chores diff --git a/gui/util/config_translation.py b/gui/util/config_translation.py index dedfa4913..c9d062dc4 100644 --- a/gui/util/config_translation.py +++ b/gui/util/config_translation.py @@ -67,6 +67,32 @@ def __init__(self, parent=None): self.tr("总力战期间自动打总力战"): "总力战期间自动打总力战", self.tr("各种扫荡及购买券次数设置"): "各种扫荡及购买券次数设置", + # normal shop + self.tr('初级经验书'): '初级经验书', + self.tr('中级经验书'): '中级经验书', + self.tr('高级经验书'): '高级经验书', + self.tr('特级经验书'): '特级经验书', + self.tr('初级经验珠'): '初级经验珠', + self.tr('中级经验珠'): '中级经验珠', + self.tr('高级经验珠'): '高级经验珠', + self.tr('特级经验珠'): '特级经验珠', + self.tr('随机初级神秘古物'): '随机初级神秘古物', + self.tr('随机中级神秘古物'): '随机中级神秘古物', + + # tactical challenge shop + self.tr('静子神明文字x5'): '静子神明文字x5', + self.tr('真白神明文字x5'): '真白神明文字x5', + self.tr('纱绫神明文字x5'): '纱绫神明文字x5', + self.tr('风香神明文字x5'): '风香神明文字x5', + self.tr('歌原神明文字x5'): '歌原神明文字x5', + self.tr('初级经验书x5'): '初级经验书x5', + self.tr('中级经验书x10'): '中级经验书x10', + self.tr('高级经验书x3'): '高级经验书x3', + self.tr('特级经验书x1'): '特级经验书x1', + self.tr('信用点x5k'): '信用点x5k', + self.tr('信用点x75k'): '信用点x75k', + self.tr('信用点x125k'): '信用点x125k', + # server combobox self.tr('官服'): '官服', self.tr('B服'): 'B服', diff --git a/gui/util/config_translation_generator.py b/gui/util/config_translation_generator.py new file mode 100644 index 000000000..af50d21e7 --- /dev/null +++ b/gui/util/config_translation_generator.py @@ -0,0 +1,78 @@ +"""" +This is a program to generate ConfigTranslation from default_config. +DO NOT REPLACE ConfigTranslation with the file generated because +Combobox options will be lost and the code will be less readable. +Use it instead to get a portion of default_config and paste it in ConfigTranslation. + +Instructions: +go to root directory of project and enter in terminal: +python -m gui.util.config_translation_generator +""" + + +import re +import json + +from core.default_config import (DISPLAY_DEFAULT_CONFIG, + DEFAULT_CONFIG, + EVENT_DEFAULT_CONFIG, + STATIC_DEFAULT_CONFIG, + SWITCH_DEFAULT_CONFIG, + ) + + +def deserialize(l): + return [json.loads(dict) for dict in l] + +def contains_chinese(s): + return re.search("[\u4e00-\u9FFF]", s) + +def find_chinese_strings(data, chinese_strings=[]): + if isinstance(data, dict): + for key, value in data.items(): + find_chinese_strings(value, chinese_strings) + elif isinstance(data, list): + for item in data: + find_chinese_strings(item, chinese_strings) + elif isinstance(data, str) and contains_chinese(data): + chinese_strings.append(data) + return chinese_strings + +def remove_duplicates(chinese_strings): + """remove duplicates while preserving order""" + seen = set() + seen_add = seen.add + return [x for x in chinese_strings if not (x in seen or seen_add(x))] + +def create_translation_file(chinese_strings, filename): + with open(filename, "w") as f: + f.write("from PyQt5.QtCore import QObject\n\n") + + + f.write("class ConfigTranslation(QObject):\n") + f.write(" def __init__(self, parent=None):\n") + f.write(" super().__init__(parent=parent)\n") + f.write(" self.entries = {\n") + for s in chinese_strings: + f.write(f" self.tr('{s}'): '{s}',\n") + f.write(" }\n\n") + + +if __name__ == "__main__": + # data = deserialize([ + # DISPLAY_DEFAULT_CONFIG, + # DEFAULT_CONFIG, + # EVENT_DEFAULT_CONFIG, + # STATIC_DEFAULT_CONFIG, + # SWITCH_DEFAULT_CONFIG, + # ]) + + # chinese_strings = find_chinese_strings(data) + # create_translation_file(chinese_strings, 'test.py') + + data = json.loads(STATIC_DEFAULT_CONFIG) + data = data['tactical_challenge_shop_price_list']['Global'] + chinese_strings = find_chinese_strings(data) + chinese_strings = remove_duplicates(chinese_strings) + create_translation_file(chinese_strings, 'test.py') + diff --git a/gui/util/language.py b/gui/util/language.py index 2260b21c5..27b4ad44d 100644 --- a/gui/util/language.py +++ b/gui/util/language.py @@ -9,7 +9,7 @@ class Language(Enum): ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) def combobox(): - return ['简体中文', 'English', '日本語'] + return ['简体中文', 'English'] if __name__ == "__main__": for language in Language: diff --git a/gui/util/translator.py b/gui/util/translator.py index 20a81981b..f39521ace 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -45,10 +45,10 @@ def isString(self, value): def isBytes(self, value): return isinstance(value, bytes) - def toString(self, tranlation: str | bytes) -> str: - if self.isBytes(tranlation): - tranlation = self.decode(tranlation) - return tranlation + def toString(self, translation: str | bytes) -> str: + if self.isBytes(translation): + translation = self.decode(translation) + return translation def encode(self, *args): return [arg.encode('utf-8') if self.isString(arg) else arg for arg in args] From a26a6cc9d84c66b268763d12f480bc4e35d838b9 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 21:38:26 +0100 Subject: [PATCH 10/30] fix: translated name in hard_task_combobox --- gui/components/expand/cafeInvite.py | 7 +++++++ gui/components/expand/mainlinePriority.py | 7 +++++-- gui/util/translator.py | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index fb640c818..23cf2ab39 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -61,6 +61,13 @@ def __init__(self, parent=None, config=None): if self.config.static_config['student_names'][i][self.config.server_mode + '_implementation']: self.student_name.append( self.config.static_config['student_names'][i][self.config.server_mode + '_name']) + + # Store student name for hard_task_combobox in mainlinePriority + if not bt.isChinese(): + cn_name = self.config.static_config['student_names'][i]['CN_name'] + tranlasted_name = self.student_name[-1] + bt.addStudent(cn_name, tranlasted_name) + self.input1 = ComboBox(self) self.input1.addItem(self.tr("添加学生")) self.input = LineEdit(self) diff --git a/gui/components/expand/mainlinePriority.py b/gui/components/expand/mainlinePriority.py index c84076256..7945ff33d 100644 --- a/gui/components/expand/mainlinePriority.py +++ b/gui/components/expand/mainlinePriority.py @@ -2,6 +2,8 @@ from PyQt5.QtWidgets import QWidget, QHBoxLayout, QLabel, QPushButton, QVBoxLayout from qfluentwidgets import LineEdit, InfoBar, InfoBarIcon, InfoBarPosition, ComboBox +from gui.util.translator import baasTranslator as bt + class Layout(QWidget): def __init__(self, parent=None, config=None): @@ -27,9 +29,10 @@ def __init__(self, parent=None, config=None): self.tr("爱丽丝宝贝"): [], } for i in range(0, len(self.config.static_config["hard_task_student_material"])): - self.each_student_task_number_dict.setdefault(self.config.static_config["hard_task_student_material"][i][1], []) + translated_name = bt.getStudent(self.config.static_config["hard_task_student_material"][i][1]) + self.each_student_task_number_dict.setdefault(translated_name, []) temp = self.config.static_config["hard_task_student_material"][i][0] + "-3" - (self.each_student_task_number_dict[self.config.static_config["hard_task_student_material"][i][1]].append(temp)) + (self.each_student_task_number_dict[translated_name].append(temp)) for key in self.each_student_task_number_dict.keys(): self.hard_task_combobox.addItem(key) self.hard_task_combobox.currentIndexChanged.connect(self.__hard_task_combobox_change) diff --git a/gui/util/translator.py b/gui/util/translator.py index f39521ace..6b2d22a2f 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -35,6 +35,8 @@ def __init__(self, parent=None): self.locale = self.cfg.get(self.cfg.language).value self.stringLang = self.locale.name() self.__config_translation = None + # separate dictionary for students to not caouse conflicts with existing translations + self.__students = dict() def loadCfgTranslation(self): self.__config_translation = ConfigTranslation() @@ -99,5 +101,17 @@ def undo(self, text: str) -> str: text = self.__get(text) return text + def addStudent(self, chineseName, translatedName): + """ + Add student's translated name to be displayed in + hard_task_combobox in mainlinePriority + """ + self.__students[chineseName] = translatedName + def getStudent(self, chineseName): + if self.__students.get(chineseName): + return self.__students[chineseName] + return chineseName + + baasTranslator = Translator() From fb2fed5b8b2df8dfc147b07fb0b51a2b765d82a8 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso Date: Tue, 9 Apr 2024 22:14:06 +0100 Subject: [PATCH 11/30] fix: notification after changing language --- gui/fragments/settings.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index ca00f5de6..ac88893a6 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -9,6 +9,7 @@ from gui.components import expand from gui.components.template_card import SimpleSettingCard from gui.util.language import Language +from gui.util import notification from gui.util.translator import baasTranslator as bt @@ -105,6 +106,7 @@ def __init__(self, parent=None, config=None): self.__initLayout() self.object_name = md5(f'{time.time()}%{random()}'.encode('utf-8')).hexdigest() self.setObjectName(self.object_name) + self.__connectSignalToSlot() def __initLayout(self): self.expandLayout.setSpacing(28) @@ -125,3 +127,15 @@ def __initLayout(self): self.expandLayout.addWidget(self.exploreGroup) self.setWidget(self.scrollWidget) + + def __showRestartTooltip(self): + """ show restart tooltip """ + notification.success( + 'Language updated successfully', + 'It will take effect after restart', + info_widget=self, + ) + + def __connectSignalToSlot(self): + """ connect signal to slot """ + bt.cfg.appRestartSig.connect(self.__showRestartTooltip) \ No newline at end of file From c5c7546a5e7f96022ca5bd248e901e62f3eb9e24 Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Tue, 16 Apr 2024 01:49:15 +0800 Subject: [PATCH 12/30] Amend pr --- core/picture.py | 4 +- gui/components/expand/cafeInvite.py | 2 +- gui/fragments/readme.py | 4 +- main.py | 12 +- module/main_story.py | 12 +- .../Auto clear mainline plot settings.html | 26 +++ .../Commonly used emulator adb address.html | 9 + .../en_US/Description of normal graphs.html | 173 ++++++++++++++++++ ...icult Chart Configuration Description.html | 9 + .../Guide for activity sweep fill in.html | 25 +++ ...lueArchive game (first-use must read).html | 37 ++++ .../Normal Sweeping Scanning Description.html | 68 +++++++ ...k force attributes required by region.html | 8 + ...ting guidelines on issues (important).html | 92 ++++++++++ ...\344\274\215\345\261\236\346\200\247.html" | 0 ...\347\275\256\350\257\264\346\230\216.html" | 0 ...5\231\250adb\345\234\260\345\235\200.html" | 0 ...\345\206\231\350\257\264\346\230\216.html" | 0 ...\345\233\276\350\257\264\346\230\216.html" | 0 ...\345\206\231\350\257\264\346\230\216.html" | 0 ...\345\277\205\350\257\273\357\274\211.html" | 0 ...\346\203\205\350\257\264\346\230\216.html" | 0 ...45\215\227(\351\207\215\350\246\201).html" | 0 .../main_story/main_story.py | 20 +- src/rgb_feature/rgb_feature_CN.json | 2 +- src/rgb_feature/rgb_feature_Global.json | 2 +- src/rgb_feature/rgb_feature_JP.json | 2 +- 27 files changed, 473 insertions(+), 34 deletions(-) create mode 100644 src/descriptions/en_US/Auto clear mainline plot settings.html create mode 100644 src/descriptions/en_US/Commonly used emulator adb address.html create mode 100644 src/descriptions/en_US/Description of normal graphs.html create mode 100644 src/descriptions/en_US/Difficult Chart Configuration Description.html create mode 100644 src/descriptions/en_US/Guide for activity sweep fill in.html create mode 100644 src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html create mode 100644 src/descriptions/en_US/Normal Sweeping Scanning Description.html create mode 100644 src/descriptions/en_US/Task force attributes required by region.html create mode 100644 src/descriptions/en_US/reporting guidelines on issues (important).html rename "src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" => "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" (100%) rename "src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" => "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" (100%) rename "src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" => "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" (100%) rename "src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" => "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" (100%) diff --git a/core/picture.py b/core/picture.py index 08e3c6249..f90e5e357 100644 --- a/core/picture.py +++ b/core/picture.py @@ -1,6 +1,6 @@ import time from core import color, image - +from module.main_story import change_acc_auto def co_detect(self, rgb_ends=None, rgb_possibles=None, img_ends=None, img_possibles=None, skip_first_screenshot=False, tentitive_click=False, tentitivex=1238, tentitivey=45, max_fail_cnt=10, rgb_pop_ups=None, @@ -143,6 +143,8 @@ def deal_with_pop_ups(self, rgb_pop_ups, img_pop_ups): else: self.logger.info("find : " + position) if position == "fighting_feature": + self.logger.info("Enter fight, wait fight auto end") + change_acc_auto(self) img_possibles = { "normal_task_mission-operating-task-info-notice": (995, 101), "normal_task_end-turn": (890, 162), diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 23cf2ab39..7ce60232d 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -61,7 +61,7 @@ def __init__(self, parent=None, config=None): if self.config.static_config['student_names'][i][self.config.server_mode + '_implementation']: self.student_name.append( self.config.static_config['student_names'][i][self.config.server_mode + '_name']) - + # Store student name for hard_task_combobox in mainlinePriority if not bt.isChinese(): cn_name = self.config.static_config['student_names'][i]['CN_name'] diff --git a/gui/fragments/readme.py b/gui/fragments/readme.py index 20d3432b6..167adf672 100644 --- a/gui/fragments/readme.py +++ b/gui/fragments/readme.py @@ -39,11 +39,9 @@ def __init__(self): self.show() def getPath(self): - directory = f'./src/descriptions_{bt.stringLang}' + directory = f'./src/descriptions/{bt.stringLang}' if os.path.isdir(directory): return directory - return './src/descriptions/' - if __name__ == '__main__': import sys diff --git a/main.py b/main.py index 8aca83dd3..3ea37117b 100644 --- a/main.py +++ b/main.py @@ -92,8 +92,8 @@ def operate_item(self, item): temp.append(self.operate_item(item[i])) return temp - - + + if __name__ == '__main__': @@ -105,10 +105,10 @@ def operate_item(self, item): tt.init_all_data() tt.ocr = t.ocr # tt.solve("refresh_uiautomator2") - tt.solve("explore_activity_challenge") + # tt.solve("explore_activity_challenge") # tt.solve("activity_sweep") - tt.solve("explore_activity_mission") - tt.solve("explore_activity_story") + # tt.solve("explore_activity_mission") + # tt.solve("explore_activity_story") # tt.solve("common_shop") # tt.solve("total_assault") # tt.solve("cafe_reward") @@ -122,7 +122,7 @@ def operate_item(self, item): # tt.solve("group") # tt.solve("mail") # tt.solve("collect_reward") - # tt.solve("main_story") + tt.solve("main_story") # tt.solve("group_story") # tt.solve("clear_special_task_power") # tt.solve("scrimmage") diff --git a/module/main_story.py b/module/main_story.py index 140bc722f..ce2cf4ced 100644 --- a/module/main_story.py +++ b/module/main_story.py @@ -2,8 +2,7 @@ import os import time from core import color, picture, image -from module.explore_normal_task import start_action, to_formation_edit_i, start_mission, \ - to_normal_task_wait_to_begin_page, check_skip_fight_and_auto_over +from module.explore_normal_task import common_gird_method def implement(self): @@ -169,14 +168,7 @@ def clear_current_plot(self, skip_first_screenshot=False): return res if res == "normal_task_task-wait-to-begin-feature": stage_data = check_state_and_get_stage_data(self) - for i in range(0, len(stage_data['start'])): - to_formation_edit_i(self, i + 1, stage_data['start'][i]) - auto_choose_formation(self, True, {"formation_edit" + str(i + 1): (1183, 183)}, - "formation_edit" + str(i + 1)) - to_normal_task_wait_to_begin_page(self, True) - start_mission(self) - check_skip_fight_and_auto_over(self) - start_action(self, stage_data['actions']) + common_gird_method(self, stage_data) rgb_ends = "fighting_feature" img_possibles = {"plot_formation": (1157, 651)} if res == "plot_self-formation": diff --git a/src/descriptions/en_US/Auto clear mainline plot settings.html b/src/descriptions/en_US/Auto clear mainline plot settings.html new file mode 100644 index 000000000..44dbb6dfd --- /dev/null +++ b/src/descriptions/en_US/Auto clear mainline plot settings.html @@ -0,0 +1,26 @@ + + + + +

Auto clear mainline plot settings

+

Autoplay can help walk the grid. But... some battles in the Final Episode cannot be fought automatically.

+

Numbers and the corresponding Episode

+

1 -> Episode I

+

2 -> Episode II

+

3 -> Episode III

+

4 -> Episode IV

+

5 -> Final Episode

+

6 -> Episode V

+

Use "," to separate the numbers to indicate each episode needed to be cleared.

+

Example:

+

1,2,3

+

Means clear Episode I, Episode III, Final Episode sequentially.

+

Default configuration(fill nothing in the box and click 'run' button):

+

CN : 1,2,3,4

+

Global : 1,2,3,4,5,4

+

JP: 1,2,3,4,5,4,6

+
+
 
+
+ + diff --git a/src/descriptions/en_US/Commonly used emulator adb address.html b/src/descriptions/en_US/Commonly used emulator adb address.html new file mode 100644 index 000000000..82dc376c3 --- /dev/null +++ b/src/descriptions/en_US/Commonly used emulator adb address.html @@ -0,0 +1,9 @@ + + + + + +
For Stimulator multi-instance, please check yourself.

Single Emulator Port

1. MuMu: 7555
2. Blue stacks/LDPlayer: 5555 (If you use Blue stack emulator check if adb port debug function is open in the settings)
3. NoxPlayer: 62001 / 59865
4. Mumu12:16384
5. memuplay: 21503
+


+ + diff --git a/src/descriptions/en_US/Description of normal graphs.html b/src/descriptions/en_US/Description of normal graphs.html new file mode 100644 index 000000000..4704f220d --- /dev/null +++ b/src/descriptions/en_US/Description of normal graphs.html @@ -0,0 +1,173 @@ + + + + +

+ Description of normal graphs: +

+

+ 1. Description of use: +

+

+ (1): Must + + + Unlock + + + Automatically end rounds and + + + Autofight. + + + (automated detection and opening) +

+

+ (2): Supported level main line ordinary + + + 4 - 25 + + +

+

+ (3): Teams move click coordinates and routes when BAAS slides are fixed and all moves are only one click, and because of the number of teams in the Blue Archive slides, the numbering coordinates and the order of movement vary according to the team. +

+

+ (4): As (3), when automatically extrapolating + + + You have to make sure the selection team numbers are smaller and bigger. + + I don't know. + + + +

+

+ + + (5): BAAS will choose the basis + + + < Normal Thumbnail Settings > + + + + + the selected group properties + + + + and + + + ♪ Team logic ♪ + + + Find the right configuration for the slide + +

+

+ The first of the corresponding properties in the following diagrams is [1] and the second is [2]. +

+

+ Team logic: +

+

+ 1 Prioritize the selection of the remaining team numbers on the basis of the relationship of restraint and gradually reduce the relationship of attribution to the remaining counterpart. +

+

+ 2 When selecting a team (4 - the team number) > = the number of remaining teams required. +

+

+ 3 Gradual reduction of the relationship of restraint among the [1] counterparts, if no assurance is provided for 1 or 2 +

+

+ 4 If some teams have been selected and 4 - the maximum number of these teams > = the number of remaining teams required, the remaining teams will be filled with an optional number. +

+

+ 5 None of the above conditions are met, and the selected team number is 1, 2, 3 +

+

+ + Example: + +

+

+ Selecting the order of the 23 [Explosion, Crossing] task force +

+

+ One team, one team. +

+

+ If an outbreak is numbered 3 and not selected in the above order, select 4 as the second +

+

+ Choose 12 as the final team if not elected +

+

+ + + Description of normal graph push-chart level: + + +

+

+ + 1. If + + + Could not close temporary folder: %s + + + , each number to be filled indicates the area to be pushed, and the program will judge whether each level in the area is to be hit according to whether the current level is sss + +

+

+ + Example: + +

+

+ + 15, 16, 14 + +

+

+ + This represents a roll-down of figure 15,16,14. + +

+

+ + 2. + + + If + + + Enable mandatory hits at each specified level + + + , enter a number to push the relevant card in the area once and enter a number-number to specify level + +

+

+ + Example: + +

+

+ + 15, 16-3 + +

+

+ + 15-1, 15-2, 15-3, 15-4, 15-5, 16-3 + +

+ + diff --git a/src/descriptions/en_US/Difficult Chart Configuration Description.html b/src/descriptions/en_US/Difficult Chart Configuration Description.html new file mode 100644 index 000000000..de6c80f23 --- /dev/null +++ b/src/descriptions/en_US/Difficult Chart Configuration Description.html @@ -0,0 +1,9 @@ + + + + +
+
The hardship map is used in the same way as the team logic and normal figure, and some of the difficult maps require three teams, all of which have the same attributes as the first for the region.

Fill in the following instructions:

The string that should be filled in the slide level should not exceed the characters or words "-", "sss", "present", "task", ",", and numbers
Split into several strings after commas
No keyword "sss", "present", "task"
Example: 15,12-2
Three switches (15-1, 15-2, 15-3, 12-2) according to the difficult map settings will be called to sss/take presents/take challenge tasks

2. A number and a string separated by "-"
Example: 15-sss-present
Will be called to sss with gifts (15-1, 15-2, 15-3)

3. Two numbers (specify the corresponding level)
Example: 15-3-sss-task
They'll call 15-3 to sss and complete the challenge.

4. Examples
Switches are all open, fill in: 7,8-sss, 9-3-task
It is indicated that the calls (7-1, 7-2, 7-3) to sss, the gifts and the challenging tasks, (8-1, 8-2, 8-3) to sss, 9-3
Note: Baas will automatically determine whether the level has reached sss, whether it has taken a gift or, if it has reached sss or has taken a gift, skips the level.
+
+ + diff --git a/src/descriptions/en_US/Guide for activity sweep fill in.html b/src/descriptions/en_US/Guide for activity sweep fill in.html new file mode 100644 index 000000000..69a51c3fb --- /dev/null +++ b/src/descriptions/en_US/Guide for activity sweep fill in.html @@ -0,0 +1,25 @@ + + + + +

Guide for activity sweep fill in:

+

Sweep One Quest:

+

Sweep Quest Number : 1 Integer in 1 - Maximum difficulty in current activity. 

+

Number of sweeps:

+

1. Integer Means sweep times

+

2. Decimal 0.5 indicates that the current AP*0.5 will be used to sweep the quest

+

3. Score 1/3 = using current AP*(1/3) to sweep the quest

+

Sweep Multiple Quests. :

+

Use ',' to join multiple quests, which means sweep them in turn

+

Example:

+

Sweep Quset:

+

9, 10, 11

+

Number of sweeps:

+

0.5, 3, 1/3

+

AP: 999

+

Means sweep in turn.

+

Quest 9  (999 * 0.5) / 20 = 25 times

+

Quest 10  3 times

+

Quest 11 (999 * 1/3) / 20 = 16 times

+ + diff --git a/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html new file mode 100644 index 000000000..c3e7877bb --- /dev/null +++ b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html @@ -0,0 +1,37 @@ + + + + +

Blanche Files Game Internal Settings :

+

** Required** :

+

Option - > Graphics : Vertical Battle Screen Text Box : Off

+

Recollection Lobby : Don't choose Ako, Aru, Wakamo

+

Language(Global Server) : English

+

Recommended Selection (does not affect script running)

+ + + + + + + + + + + + + + + + + + + + + + + +
ResolutionHighest
FPS60
Accelerate rendering modeCompatibility
Post-processingON
Anti-aliasingON
+

 

+ + diff --git a/src/descriptions/en_US/Normal Sweeping Scanning Description.html b/src/descriptions/en_US/Normal Sweeping Scanning Description.html new file mode 100644 index 000000000..6314c8b75 --- /dev/null +++ b/src/descriptions/en_US/Normal Sweeping Scanning Description.html @@ -0,0 +1,68 @@ + + + + +

+ Each sweep configuration is like 'region ' - 'task number ' - 'sweep times ' +

+

+ Organisation + + Regional + + 'region' + + Level + + "task-number" + + Number of sweeps + + @sweeptimes +

+

+ Each configuration is separated by ', ' +

+

+ 1. + + + Available Sweep Levels + + + : +

+

+ All maps after Academy 1 and 5 +

+

+ 2. + + + Special description + + +

+

+ International, `sweep times' can be `max' +

+

+ The tutorial requires 'region' as a fixed string'tutorian' +

+

+ BAAS calculates whether the current level can be cleaned, depending on the current physical strength and the level of the level. +

+

+ Example: +

+

+ When the international uniform is physically adequate +

+

+ TUTORIAL-1-20, 15-3, 20-3-max +

+

+ It means cleaning the curriculum 1 20 times, then cleaning 15-3, 3 times, and then all the physical sweeps 20-3 times. +

+ + diff --git a/src/descriptions/en_US/Task force attributes required by region.html b/src/descriptions/en_US/Task force attributes required by region.html new file mode 100644 index 000000000..d04a49ad7 --- /dev/null +++ b/src/descriptions/en_US/Task force attributes required by region.html @@ -0,0 +1,8 @@ + + + + + +

25 [ Sonic        ,  Piercing   ]
24 [ Sonic        ,  Explosive ]
23 [ Explosive ,  Piercing   ]
22 [ Piercing   ,  Mystic      ]
21 [ Mystic      ,  Explosive ]
20 [ Explosive ,  Piercing   ]
19 [ Piercing   ,  Mystic      ]
18 [ Mystic      ,  Explosive ]
17 [ Explosive ,  Piercing   ]
16 [ Piercing   ,  Mystic      ]
15 [ Mystic      ,  Mystic      ]
14 [ Explosive ,  Mystic      ]
13 [ Piercing   ,  Piercing   ]
12 [ Mystic      ,  Explosive ]
11 [ Piercing   ,  Mystic      ]
10 [ Explosive ,  Mystic      ]
 9 [ Explosive  ,  Piercing   ]
 8 [ Piercing    ,  Piercing   ]
 7 [ Explosive  ,  Explosive ]
 6 [ Piercing    ,  Piercing   ]
 5 [ Explosive ]
 4 [ Piercing   ]
 3 [ Piercing   ]
 2 [ Explosive ]
 1 [ Explosive ]

+ + diff --git a/src/descriptions/en_US/reporting guidelines on issues (important).html b/src/descriptions/en_US/reporting guidelines on issues (important).html new file mode 100644 index 000000000..eda95dc6c --- /dev/null +++ b/src/descriptions/en_US/reporting guidelines on issues (important).html @@ -0,0 +1,92 @@ +

+ + Let's think about it before we report it: + +

+

+ + 1. This question has never arisen before and can I try to solve it myself (Baidu, curriculum). + +

+

+ + It can't be solved. + +

+

+ + 2. The question arises whether I am running every time. + +

+

+ + 3. How can I provide sufficient information for others to help me solve the problem? + +

+

+ + 4. The distribution of colour maps within the qq group may be more attractive to others to help solve problems. + +

+

+ + + Type of problem versus corresponding + + Reporting (yellow necessary) + + + +

+

+ + I'm stuck on page XXX! : + +

+

+ + (1). + + 1280 x 720 games when stuck + + + (Mumu on F9) + + +

+

+ (2). Baas Logshot +

+

+ (3). Try to switch pages to see if they only get stuck on this page +

+

+ + I can't move it! : + +

+

+ (1) Attempts to repulse the observation of one or two times whether each time the card is in one position. +

+

+ + + (1). Recording the complete video from the "start-up slide" to the time of the stop, with attention to the simulator and the Bas log interface being recorded on the same screen. + + +

+

+ + I set up the XXX configuration but didn't fight! I didn't set up XXX but I did! : + +

+

+ (1) Read the configuration instructions carefully to see if they correctly understand how to fill them out. +

+

+ + + (2) Configure screenshots and program logs. + + +

diff --git "a/src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" "b/src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" similarity index 100% rename from "src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" rename to "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" diff --git "a/src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" "b/src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" similarity index 100% rename from "src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" rename to "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" diff --git "a/src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" "b/src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" similarity index 100% rename from "src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" rename to "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" diff --git "a/src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" "b/src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" similarity index 100% rename from "src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" rename to "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" diff --git a/src/explore_task_data/main_story/main_story.py b/src/explore_task_data/main_story/main_story.py index b9b83eedf..40f680ecb 100644 --- a/src/explore_task_data/main_story/main_story.py +++ b/src/explore_task_data/main_story/main_story.py @@ -2,7 +2,7 @@ "Operation-Recapture-Schale-2": { "will-fight": False, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (571, 370), 'wait-over': True, 'desc': "upper right"}, {'t': 'click', 'p': (687, 373), 'wait-over': True, 'desc': "right"}, @@ -20,7 +20,7 @@ (693, 305), (645, 564) ], - "actions": [ + "action": [ {'t': 'click', 'p': (378, 422), 'wait-over': True, 'desc': "1 left"}, {'t': 'click', 'p': (698, 308), 'wait-over': True, 'desc': "2 upper right"}, {'t': 'click', 'p': (701, 472), 'wait-over': True, 'desc': "3 lower right"}, @@ -35,7 +35,7 @@ "The-First-Sanctum-Abydos-Desert-District": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (576, 368), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (698, 473), 'wait-over': True, 'desc': "2 lower right"}, {'t': 'click', 'p': (758, 391), 'ec': True, 'desc': "1 right"}, @@ -45,7 +45,7 @@ "The-Second-Sanctum-Millennium-Ruins-District": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (574, 365), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (759, 388), 'wait-over': True, 'desc': "2 right"}, @@ -59,7 +59,7 @@ "The-Third-Sanctum-Abandoned-Amusement-Park": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (562, 534), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (845, 499), 'wait-over': True, 'desc': "2 lower right"}, @@ -73,7 +73,7 @@ "The-Forth-Sanctum-Basilica-in-the-Catacomb": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (570, 541), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (680, 302), 'wait-over': True, 'desc': "2 right"}, @@ -84,7 +84,7 @@ "The-Fifth-Sanctum-Outskirts-of-the-City-of-Eridu": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (410, 483), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -95,7 +95,7 @@ "The-Final-Defense-Operation-Schale": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (641, 467), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -106,7 +106,7 @@ "Rush": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (637, 425), "ec": True, 'desc': "1 upper right"}, {'t': 'click', 'p': (458, 341), 'wait-over': True, 'desc': "2 upper left"}, {'t': 'click', 'p': (761, 391), 'wait-over': True, 'desc': "3 right"}, @@ -116,7 +116,7 @@ {'t': 'click', 'p': (615, 332), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (662, 361), 'wait-over': True, 'desc': "1 upper right"}, - {'end-turn'}, + {'t': 'end-turn'}, ] } } diff --git a/src/rgb_feature/rgb_feature_CN.json b/src/rgb_feature/rgb_feature_CN.json index 91ffb88d1..9bd7b37b4 100644 --- a/src/rgb_feature/rgb_feature_CN.json +++ b/src/rgb_feature/rgb_feature_CN.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 207, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_Global.json b/src/rgb_feature/rgb_feature_Global.json index 303c6350c..bf4f97c35 100644 --- a/src/rgb_feature/rgb_feature_Global.json +++ b/src/rgb_feature/rgb_feature_Global.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_JP.json b/src/rgb_feature/rgb_feature_JP.json index 7dc48a4f5..e44af9c4f 100644 --- a/src/rgb_feature/rgb_feature_JP.json +++ b/src/rgb_feature/rgb_feature_JP.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], From 0d23063cf9f6c7f28c4a258a518cbae09ab9a385 Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Tue, 9 Apr 2024 12:50:57 +0800 Subject: [PATCH 13/30] delete Union expression to run the code in python 3.9 --- gui/util/translator.py | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/gui/util/translator.py b/gui/util/translator.py index 6b2d22a2f..6e6c9d238 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -15,13 +15,13 @@ def serialize(self, language): def deserialize(self, value: str): return Language(QLocale(value)) - + class Config(QConfig): """ Language config """ language = OptionsConfigItem( "Translator", "Language", Language.ENGLISH, OptionsValidator(Language), LanguageSerializer(), restart=True) - + def __init__(self): super().__init__() @@ -38,36 +38,37 @@ def __init__(self, parent=None): # separate dictionary for students to not caouse conflicts with existing translations self.__students = dict() + def loadCfgTranslation(self): self.__config_translation = ConfigTranslation() def isString(self, value): return isinstance(value, str) - + def isBytes(self, value): return isinstance(value, bytes) - + def toString(self, translation: str | bytes) -> str: if self.isBytes(translation): translation = self.decode(translation) return translation - + def encode(self, *args): return [arg.encode('utf-8') if self.isString(arg) else arg for arg in args] def decode(self, *args): return [arg.decode('utf-8') if self.isBytes(arg) else arg for arg in args] - + def __get(self, text): return self.__config_translation.entries.get(text) - + def isChinese(self): return self.stringLang == 'zh_CN' - def tr(self, - context: str, - sourceText: str, - disambiguation: str | None = None, + def tr(self, + context: str, + sourceText: str, + disambiguation: str = '', n: int = -1) -> str: """ Translate sourceText by looking in the qm file. @@ -75,10 +76,10 @@ def tr(self, Parameters ---------- - context: str + context: str context tag in .ts file e.g ConfigTranslation - sourceText: str + sourceText: str text to translate """ if not self.isChinese() and self.isString(sourceText) and self.isString(context): @@ -87,14 +88,14 @@ def tr(self, if translation: return self.toString(translation) return sourceText - + def undo(self, text: str) -> str: """ Undo translations by looking in ConfigTranslation. Parameters ---------- - text: str + text: str text to undo translation """ if not self.isChinese() and self.isString(text) and self.__get(text): @@ -112,6 +113,6 @@ def getStudent(self, chineseName): if self.__students.get(chineseName): return self.__students[chineseName] return chineseName - - + + baasTranslator = Translator() From 579593c749f37fa1764a0aa86efe28310be1eee9 Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Tue, 16 Apr 2024 01:49:15 +0800 Subject: [PATCH 14/30] Amend pr --- core/picture.py | 4 +- gui/components/expand/cafeInvite.py | 2 +- gui/fragments/readme.py | 4 +- main.py | 12 +- module/main_story.py | 12 +- .../Auto clear mainline plot settings.html | 26 +++ .../Commonly used emulator adb address.html | 9 + .../en_US/Description of normal graphs.html | 173 ++++++++++++++++++ ...icult Chart Configuration Description.html | 9 + .../Guide for activity sweep fill in.html | 25 +++ ...lueArchive game (first-use must read).html | 37 ++++ .../Normal Sweeping Scanning Description.html | 68 +++++++ ...k force attributes required by region.html | 8 + ...ting guidelines on issues (important).html | 92 ++++++++++ ...\344\274\215\345\261\236\346\200\247.html" | 0 ...\347\275\256\350\257\264\346\230\216.html" | 0 ...5\231\250adb\345\234\260\345\235\200.html" | 0 ...\345\206\231\350\257\264\346\230\216.html" | 0 ...\345\233\276\350\257\264\346\230\216.html" | 0 ...\345\206\231\350\257\264\346\230\216.html" | 0 ...\345\277\205\350\257\273\357\274\211.html" | 0 ...\346\203\205\350\257\264\346\230\216.html" | 0 ...45\215\227(\351\207\215\350\246\201).html" | 0 .../main_story/main_story.py | 20 +- src/rgb_feature/rgb_feature_CN.json | 2 +- src/rgb_feature/rgb_feature_Global.json | 2 +- src/rgb_feature/rgb_feature_JP.json | 2 +- 27 files changed, 473 insertions(+), 34 deletions(-) create mode 100644 src/descriptions/en_US/Auto clear mainline plot settings.html create mode 100644 src/descriptions/en_US/Commonly used emulator adb address.html create mode 100644 src/descriptions/en_US/Description of normal graphs.html create mode 100644 src/descriptions/en_US/Difficult Chart Configuration Description.html create mode 100644 src/descriptions/en_US/Guide for activity sweep fill in.html create mode 100644 src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html create mode 100644 src/descriptions/en_US/Normal Sweeping Scanning Description.html create mode 100644 src/descriptions/en_US/Task force attributes required by region.html create mode 100644 src/descriptions/en_US/reporting guidelines on issues (important).html rename "src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" => "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" (100%) rename "src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" => "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" (100%) rename "src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" => "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" (100%) rename "src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" => "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" (100%) rename "src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" => "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" (100%) diff --git a/core/picture.py b/core/picture.py index 08e3c6249..f90e5e357 100644 --- a/core/picture.py +++ b/core/picture.py @@ -1,6 +1,6 @@ import time from core import color, image - +from module.main_story import change_acc_auto def co_detect(self, rgb_ends=None, rgb_possibles=None, img_ends=None, img_possibles=None, skip_first_screenshot=False, tentitive_click=False, tentitivex=1238, tentitivey=45, max_fail_cnt=10, rgb_pop_ups=None, @@ -143,6 +143,8 @@ def deal_with_pop_ups(self, rgb_pop_ups, img_pop_ups): else: self.logger.info("find : " + position) if position == "fighting_feature": + self.logger.info("Enter fight, wait fight auto end") + change_acc_auto(self) img_possibles = { "normal_task_mission-operating-task-info-notice": (995, 101), "normal_task_end-turn": (890, 162), diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 23cf2ab39..7ce60232d 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -61,7 +61,7 @@ def __init__(self, parent=None, config=None): if self.config.static_config['student_names'][i][self.config.server_mode + '_implementation']: self.student_name.append( self.config.static_config['student_names'][i][self.config.server_mode + '_name']) - + # Store student name for hard_task_combobox in mainlinePriority if not bt.isChinese(): cn_name = self.config.static_config['student_names'][i]['CN_name'] diff --git a/gui/fragments/readme.py b/gui/fragments/readme.py index 20d3432b6..167adf672 100644 --- a/gui/fragments/readme.py +++ b/gui/fragments/readme.py @@ -39,11 +39,9 @@ def __init__(self): self.show() def getPath(self): - directory = f'./src/descriptions_{bt.stringLang}' + directory = f'./src/descriptions/{bt.stringLang}' if os.path.isdir(directory): return directory - return './src/descriptions/' - if __name__ == '__main__': import sys diff --git a/main.py b/main.py index 8aca83dd3..3ea37117b 100644 --- a/main.py +++ b/main.py @@ -92,8 +92,8 @@ def operate_item(self, item): temp.append(self.operate_item(item[i])) return temp - - + + if __name__ == '__main__': @@ -105,10 +105,10 @@ def operate_item(self, item): tt.init_all_data() tt.ocr = t.ocr # tt.solve("refresh_uiautomator2") - tt.solve("explore_activity_challenge") + # tt.solve("explore_activity_challenge") # tt.solve("activity_sweep") - tt.solve("explore_activity_mission") - tt.solve("explore_activity_story") + # tt.solve("explore_activity_mission") + # tt.solve("explore_activity_story") # tt.solve("common_shop") # tt.solve("total_assault") # tt.solve("cafe_reward") @@ -122,7 +122,7 @@ def operate_item(self, item): # tt.solve("group") # tt.solve("mail") # tt.solve("collect_reward") - # tt.solve("main_story") + tt.solve("main_story") # tt.solve("group_story") # tt.solve("clear_special_task_power") # tt.solve("scrimmage") diff --git a/module/main_story.py b/module/main_story.py index 140bc722f..ce2cf4ced 100644 --- a/module/main_story.py +++ b/module/main_story.py @@ -2,8 +2,7 @@ import os import time from core import color, picture, image -from module.explore_normal_task import start_action, to_formation_edit_i, start_mission, \ - to_normal_task_wait_to_begin_page, check_skip_fight_and_auto_over +from module.explore_normal_task import common_gird_method def implement(self): @@ -169,14 +168,7 @@ def clear_current_plot(self, skip_first_screenshot=False): return res if res == "normal_task_task-wait-to-begin-feature": stage_data = check_state_and_get_stage_data(self) - for i in range(0, len(stage_data['start'])): - to_formation_edit_i(self, i + 1, stage_data['start'][i]) - auto_choose_formation(self, True, {"formation_edit" + str(i + 1): (1183, 183)}, - "formation_edit" + str(i + 1)) - to_normal_task_wait_to_begin_page(self, True) - start_mission(self) - check_skip_fight_and_auto_over(self) - start_action(self, stage_data['actions']) + common_gird_method(self, stage_data) rgb_ends = "fighting_feature" img_possibles = {"plot_formation": (1157, 651)} if res == "plot_self-formation": diff --git a/src/descriptions/en_US/Auto clear mainline plot settings.html b/src/descriptions/en_US/Auto clear mainline plot settings.html new file mode 100644 index 000000000..44dbb6dfd --- /dev/null +++ b/src/descriptions/en_US/Auto clear mainline plot settings.html @@ -0,0 +1,26 @@ + + + + +

Auto clear mainline plot settings

+

Autoplay can help walk the grid. But... some battles in the Final Episode cannot be fought automatically.

+

Numbers and the corresponding Episode

+

1 -> Episode I

+

2 -> Episode II

+

3 -> Episode III

+

4 -> Episode IV

+

5 -> Final Episode

+

6 -> Episode V

+

Use "," to separate the numbers to indicate each episode needed to be cleared.

+

Example:

+

1,2,3

+

Means clear Episode I, Episode III, Final Episode sequentially.

+

Default configuration(fill nothing in the box and click 'run' button):

+

CN : 1,2,3,4

+

Global : 1,2,3,4,5,4

+

JP: 1,2,3,4,5,4,6

+
+
 
+
+ + diff --git a/src/descriptions/en_US/Commonly used emulator adb address.html b/src/descriptions/en_US/Commonly used emulator adb address.html new file mode 100644 index 000000000..82dc376c3 --- /dev/null +++ b/src/descriptions/en_US/Commonly used emulator adb address.html @@ -0,0 +1,9 @@ + + + + + +
For Stimulator multi-instance, please check yourself.

Single Emulator Port

1. MuMu: 7555
2. Blue stacks/LDPlayer: 5555 (If you use Blue stack emulator check if adb port debug function is open in the settings)
3. NoxPlayer: 62001 / 59865
4. Mumu12:16384
5. memuplay: 21503
+


+ + diff --git a/src/descriptions/en_US/Description of normal graphs.html b/src/descriptions/en_US/Description of normal graphs.html new file mode 100644 index 000000000..4704f220d --- /dev/null +++ b/src/descriptions/en_US/Description of normal graphs.html @@ -0,0 +1,173 @@ + + + + +

+ Description of normal graphs: +

+

+ 1. Description of use: +

+

+ (1): Must + + + Unlock + + + Automatically end rounds and + + + Autofight. + + + (automated detection and opening) +

+

+ (2): Supported level main line ordinary + + + 4 - 25 + + +

+

+ (3): Teams move click coordinates and routes when BAAS slides are fixed and all moves are only one click, and because of the number of teams in the Blue Archive slides, the numbering coordinates and the order of movement vary according to the team. +

+

+ (4): As (3), when automatically extrapolating + + + You have to make sure the selection team numbers are smaller and bigger. + + I don't know. + + + +

+

+ + + (5): BAAS will choose the basis + + + < Normal Thumbnail Settings > + + + + + the selected group properties + + + + and + + + ♪ Team logic ♪ + + + Find the right configuration for the slide + +

+

+ The first of the corresponding properties in the following diagrams is [1] and the second is [2]. +

+

+ Team logic: +

+

+ 1 Prioritize the selection of the remaining team numbers on the basis of the relationship of restraint and gradually reduce the relationship of attribution to the remaining counterpart. +

+

+ 2 When selecting a team (4 - the team number) > = the number of remaining teams required. +

+

+ 3 Gradual reduction of the relationship of restraint among the [1] counterparts, if no assurance is provided for 1 or 2 +

+

+ 4 If some teams have been selected and 4 - the maximum number of these teams > = the number of remaining teams required, the remaining teams will be filled with an optional number. +

+

+ 5 None of the above conditions are met, and the selected team number is 1, 2, 3 +

+

+ + Example: + +

+

+ Selecting the order of the 23 [Explosion, Crossing] task force +

+

+ One team, one team. +

+

+ If an outbreak is numbered 3 and not selected in the above order, select 4 as the second +

+

+ Choose 12 as the final team if not elected +

+

+ + + Description of normal graph push-chart level: + + +

+

+ + 1. If + + + Could not close temporary folder: %s + + + , each number to be filled indicates the area to be pushed, and the program will judge whether each level in the area is to be hit according to whether the current level is sss + +

+

+ + Example: + +

+

+ + 15, 16, 14 + +

+

+ + This represents a roll-down of figure 15,16,14. + +

+

+ + 2. + + + If + + + Enable mandatory hits at each specified level + + + , enter a number to push the relevant card in the area once and enter a number-number to specify level + +

+

+ + Example: + +

+

+ + 15, 16-3 + +

+

+ + 15-1, 15-2, 15-3, 15-4, 15-5, 16-3 + +

+ + diff --git a/src/descriptions/en_US/Difficult Chart Configuration Description.html b/src/descriptions/en_US/Difficult Chart Configuration Description.html new file mode 100644 index 000000000..de6c80f23 --- /dev/null +++ b/src/descriptions/en_US/Difficult Chart Configuration Description.html @@ -0,0 +1,9 @@ + + + + +
+
The hardship map is used in the same way as the team logic and normal figure, and some of the difficult maps require three teams, all of which have the same attributes as the first for the region.

Fill in the following instructions:

The string that should be filled in the slide level should not exceed the characters or words "-", "sss", "present", "task", ",", and numbers
Split into several strings after commas
No keyword "sss", "present", "task"
Example: 15,12-2
Three switches (15-1, 15-2, 15-3, 12-2) according to the difficult map settings will be called to sss/take presents/take challenge tasks

2. A number and a string separated by "-"
Example: 15-sss-present
Will be called to sss with gifts (15-1, 15-2, 15-3)

3. Two numbers (specify the corresponding level)
Example: 15-3-sss-task
They'll call 15-3 to sss and complete the challenge.

4. Examples
Switches are all open, fill in: 7,8-sss, 9-3-task
It is indicated that the calls (7-1, 7-2, 7-3) to sss, the gifts and the challenging tasks, (8-1, 8-2, 8-3) to sss, 9-3
Note: Baas will automatically determine whether the level has reached sss, whether it has taken a gift or, if it has reached sss or has taken a gift, skips the level.
+
+ + diff --git a/src/descriptions/en_US/Guide for activity sweep fill in.html b/src/descriptions/en_US/Guide for activity sweep fill in.html new file mode 100644 index 000000000..69a51c3fb --- /dev/null +++ b/src/descriptions/en_US/Guide for activity sweep fill in.html @@ -0,0 +1,25 @@ + + + + +

Guide for activity sweep fill in:

+

Sweep One Quest:

+

Sweep Quest Number : 1 Integer in 1 - Maximum difficulty in current activity. 

+

Number of sweeps:

+

1. Integer Means sweep times

+

2. Decimal 0.5 indicates that the current AP*0.5 will be used to sweep the quest

+

3. Score 1/3 = using current AP*(1/3) to sweep the quest

+

Sweep Multiple Quests. :

+

Use ',' to join multiple quests, which means sweep them in turn

+

Example:

+

Sweep Quset:

+

9, 10, 11

+

Number of sweeps:

+

0.5, 3, 1/3

+

AP: 999

+

Means sweep in turn.

+

Quest 9  (999 * 0.5) / 20 = 25 times

+

Quest 10  3 times

+

Quest 11 (999 * 1/3) / 20 = 16 times

+ + diff --git a/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html new file mode 100644 index 000000000..c3e7877bb --- /dev/null +++ b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html @@ -0,0 +1,37 @@ + + + + +

Blanche Files Game Internal Settings :

+

** Required** :

+

Option - > Graphics : Vertical Battle Screen Text Box : Off

+

Recollection Lobby : Don't choose Ako, Aru, Wakamo

+

Language(Global Server) : English

+

Recommended Selection (does not affect script running)

+ + + + + + + + + + + + + + + + + + + + + + + +
ResolutionHighest
FPS60
Accelerate rendering modeCompatibility
Post-processingON
Anti-aliasingON
+

 

+ + diff --git a/src/descriptions/en_US/Normal Sweeping Scanning Description.html b/src/descriptions/en_US/Normal Sweeping Scanning Description.html new file mode 100644 index 000000000..6314c8b75 --- /dev/null +++ b/src/descriptions/en_US/Normal Sweeping Scanning Description.html @@ -0,0 +1,68 @@ + + + + +

+ Each sweep configuration is like 'region ' - 'task number ' - 'sweep times ' +

+

+ Organisation + + Regional + + 'region' + + Level + + "task-number" + + Number of sweeps + + @sweeptimes +

+

+ Each configuration is separated by ', ' +

+

+ 1. + + + Available Sweep Levels + + + : +

+

+ All maps after Academy 1 and 5 +

+

+ 2. + + + Special description + + +

+

+ International, `sweep times' can be `max' +

+

+ The tutorial requires 'region' as a fixed string'tutorian' +

+

+ BAAS calculates whether the current level can be cleaned, depending on the current physical strength and the level of the level. +

+

+ Example: +

+

+ When the international uniform is physically adequate +

+

+ TUTORIAL-1-20, 15-3, 20-3-max +

+

+ It means cleaning the curriculum 1 20 times, then cleaning 15-3, 3 times, and then all the physical sweeps 20-3 times. +

+ + diff --git a/src/descriptions/en_US/Task force attributes required by region.html b/src/descriptions/en_US/Task force attributes required by region.html new file mode 100644 index 000000000..d04a49ad7 --- /dev/null +++ b/src/descriptions/en_US/Task force attributes required by region.html @@ -0,0 +1,8 @@ + + + + + +

25 [ Sonic        ,  Piercing   ]
24 [ Sonic        ,  Explosive ]
23 [ Explosive ,  Piercing   ]
22 [ Piercing   ,  Mystic      ]
21 [ Mystic      ,  Explosive ]
20 [ Explosive ,  Piercing   ]
19 [ Piercing   ,  Mystic      ]
18 [ Mystic      ,  Explosive ]
17 [ Explosive ,  Piercing   ]
16 [ Piercing   ,  Mystic      ]
15 [ Mystic      ,  Mystic      ]
14 [ Explosive ,  Mystic      ]
13 [ Piercing   ,  Piercing   ]
12 [ Mystic      ,  Explosive ]
11 [ Piercing   ,  Mystic      ]
10 [ Explosive ,  Mystic      ]
 9 [ Explosive  ,  Piercing   ]
 8 [ Piercing    ,  Piercing   ]
 7 [ Explosive  ,  Explosive ]
 6 [ Piercing    ,  Piercing   ]
 5 [ Explosive ]
 4 [ Piercing   ]
 3 [ Piercing   ]
 2 [ Explosive ]
 1 [ Explosive ]

+ + diff --git a/src/descriptions/en_US/reporting guidelines on issues (important).html b/src/descriptions/en_US/reporting guidelines on issues (important).html new file mode 100644 index 000000000..eda95dc6c --- /dev/null +++ b/src/descriptions/en_US/reporting guidelines on issues (important).html @@ -0,0 +1,92 @@ +

+ + Let's think about it before we report it: + +

+

+ + 1. This question has never arisen before and can I try to solve it myself (Baidu, curriculum). + +

+

+ + It can't be solved. + +

+

+ + 2. The question arises whether I am running every time. + +

+

+ + 3. How can I provide sufficient information for others to help me solve the problem? + +

+

+ + 4. The distribution of colour maps within the qq group may be more attractive to others to help solve problems. + +

+

+ + + Type of problem versus corresponding + + Reporting (yellow necessary) + + + +

+

+ + I'm stuck on page XXX! : + +

+

+ + (1). + + 1280 x 720 games when stuck + + + (Mumu on F9) + + +

+

+ (2). Baas Logshot +

+

+ (3). Try to switch pages to see if they only get stuck on this page +

+

+ + I can't move it! : + +

+

+ (1) Attempts to repulse the observation of one or two times whether each time the card is in one position. +

+

+ + + (1). Recording the complete video from the "start-up slide" to the time of the stop, with attention to the simulator and the Bas log interface being recorded on the same screen. + + +

+

+ + I set up the XXX configuration but didn't fight! I didn't set up XXX but I did! : + +

+

+ (1) Read the configuration instructions carefully to see if they correctly understand how to fill them out. +

+

+ + + (2) Configure screenshots and program logs. + + +

diff --git "a/src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" "b/src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" similarity index 100% rename from "src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" rename to "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" diff --git "a/src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" "b/src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" similarity index 100% rename from "src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" rename to "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" diff --git "a/src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" "b/src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" similarity index 100% rename from "src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" rename to "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" diff --git "a/src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" rename to "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" diff --git "a/src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" "b/src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" similarity index 100% rename from "src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" rename to "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" diff --git a/src/explore_task_data/main_story/main_story.py b/src/explore_task_data/main_story/main_story.py index b9b83eedf..40f680ecb 100644 --- a/src/explore_task_data/main_story/main_story.py +++ b/src/explore_task_data/main_story/main_story.py @@ -2,7 +2,7 @@ "Operation-Recapture-Schale-2": { "will-fight": False, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (571, 370), 'wait-over': True, 'desc': "upper right"}, {'t': 'click', 'p': (687, 373), 'wait-over': True, 'desc': "right"}, @@ -20,7 +20,7 @@ (693, 305), (645, 564) ], - "actions": [ + "action": [ {'t': 'click', 'p': (378, 422), 'wait-over': True, 'desc': "1 left"}, {'t': 'click', 'p': (698, 308), 'wait-over': True, 'desc': "2 upper right"}, {'t': 'click', 'p': (701, 472), 'wait-over': True, 'desc': "3 lower right"}, @@ -35,7 +35,7 @@ "The-First-Sanctum-Abydos-Desert-District": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (576, 368), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (698, 473), 'wait-over': True, 'desc': "2 lower right"}, {'t': 'click', 'p': (758, 391), 'ec': True, 'desc': "1 right"}, @@ -45,7 +45,7 @@ "The-Second-Sanctum-Millennium-Ruins-District": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (574, 365), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (759, 388), 'wait-over': True, 'desc': "2 right"}, @@ -59,7 +59,7 @@ "The-Third-Sanctum-Abandoned-Amusement-Park": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (562, 534), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (845, 499), 'wait-over': True, 'desc': "2 lower right"}, @@ -73,7 +73,7 @@ "The-Forth-Sanctum-Basilica-in-the-Catacomb": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (570, 541), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (680, 302), 'wait-over': True, 'desc': "2 right"}, @@ -84,7 +84,7 @@ "The-Fifth-Sanctum-Outskirts-of-the-City-of-Eridu": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (410, 483), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -95,7 +95,7 @@ "The-Final-Defense-Operation-Schale": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (641, 467), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -106,7 +106,7 @@ "Rush": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (637, 425), "ec": True, 'desc': "1 upper right"}, {'t': 'click', 'p': (458, 341), 'wait-over': True, 'desc': "2 upper left"}, {'t': 'click', 'p': (761, 391), 'wait-over': True, 'desc': "3 right"}, @@ -116,7 +116,7 @@ {'t': 'click', 'p': (615, 332), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (662, 361), 'wait-over': True, 'desc': "1 upper right"}, - {'end-turn'}, + {'t': 'end-turn'}, ] } } diff --git a/src/rgb_feature/rgb_feature_CN.json b/src/rgb_feature/rgb_feature_CN.json index 91ffb88d1..9bd7b37b4 100644 --- a/src/rgb_feature/rgb_feature_CN.json +++ b/src/rgb_feature/rgb_feature_CN.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 207, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_Global.json b/src/rgb_feature/rgb_feature_Global.json index 303c6350c..bf4f97c35 100644 --- a/src/rgb_feature/rgb_feature_Global.json +++ b/src/rgb_feature/rgb_feature_Global.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_JP.json b/src/rgb_feature/rgb_feature_JP.json index 7dc48a4f5..e44af9c4f 100644 --- a/src/rgb_feature/rgb_feature_JP.json +++ b/src/rgb_feature/rgb_feature_JP.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], From b2fc2ae891bec4f87e14152888ad6e7f4f56d5f2 Mon Sep 17 00:00:00 2001 From: Kiramei <1710623513@qq.com> Date: Tue, 16 Apr 2024 13:31:38 +0800 Subject: [PATCH 15/30] Revert "Amend pr" This reverts commit 579593c749f37fa1764a0aa86efe28310be1eee9. --- core/picture.py | 4 +- gui/components/expand/cafeInvite.py | 2 +- gui/fragments/readme.py | 4 +- main.py | 12 +- module/main_story.py | 12 +- .../Auto clear mainline plot settings.html | 26 --- .../Commonly used emulator adb address.html | 9 - .../en_US/Description of normal graphs.html | 173 ------------------ ...icult Chart Configuration Description.html | 9 - .../Guide for activity sweep fill in.html | 25 --- ...lueArchive game (first-use must read).html | 37 ---- .../Normal Sweeping Scanning Description.html | 68 ------- ...k force attributes required by region.html | 8 - ...ting guidelines on issues (important).html | 92 ---------- ...\344\274\215\345\261\236\346\200\247.html" | 0 ...\347\275\256\350\257\264\346\230\216.html" | 0 ...5\231\250adb\345\234\260\345\235\200.html" | 0 ...\345\206\231\350\257\264\346\230\216.html" | 0 ...\345\233\276\350\257\264\346\230\216.html" | 0 ...\345\206\231\350\257\264\346\230\216.html" | 0 ...\345\277\205\350\257\273\357\274\211.html" | 0 ...\346\203\205\350\257\264\346\230\216.html" | 0 ...45\215\227(\351\207\215\350\246\201).html" | 0 .../main_story/main_story.py | 20 +- src/rgb_feature/rgb_feature_CN.json | 2 +- src/rgb_feature/rgb_feature_Global.json | 2 +- src/rgb_feature/rgb_feature_JP.json | 2 +- 27 files changed, 34 insertions(+), 473 deletions(-) delete mode 100644 src/descriptions/en_US/Auto clear mainline plot settings.html delete mode 100644 src/descriptions/en_US/Commonly used emulator adb address.html delete mode 100644 src/descriptions/en_US/Description of normal graphs.html delete mode 100644 src/descriptions/en_US/Difficult Chart Configuration Description.html delete mode 100644 src/descriptions/en_US/Guide for activity sweep fill in.html delete mode 100644 src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html delete mode 100644 src/descriptions/en_US/Normal Sweeping Scanning Description.html delete mode 100644 src/descriptions/en_US/Task force attributes required by region.html delete mode 100644 src/descriptions/en_US/reporting guidelines on issues (important).html rename "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" => "src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" (100%) rename "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" => "src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" (100%) rename "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" => "src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" (100%) rename "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" => "src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" (100%) rename "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" => "src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" (100%) rename "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" => "src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" (100%) rename "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" => "src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" (100%) rename "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" => "src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" (100%) rename "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" => "src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" (100%) diff --git a/core/picture.py b/core/picture.py index f90e5e357..08e3c6249 100644 --- a/core/picture.py +++ b/core/picture.py @@ -1,6 +1,6 @@ import time from core import color, image -from module.main_story import change_acc_auto + def co_detect(self, rgb_ends=None, rgb_possibles=None, img_ends=None, img_possibles=None, skip_first_screenshot=False, tentitive_click=False, tentitivex=1238, tentitivey=45, max_fail_cnt=10, rgb_pop_ups=None, @@ -143,8 +143,6 @@ def deal_with_pop_ups(self, rgb_pop_ups, img_pop_ups): else: self.logger.info("find : " + position) if position == "fighting_feature": - self.logger.info("Enter fight, wait fight auto end") - change_acc_auto(self) img_possibles = { "normal_task_mission-operating-task-info-notice": (995, 101), "normal_task_end-turn": (890, 162), diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 7ce60232d..23cf2ab39 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -61,7 +61,7 @@ def __init__(self, parent=None, config=None): if self.config.static_config['student_names'][i][self.config.server_mode + '_implementation']: self.student_name.append( self.config.static_config['student_names'][i][self.config.server_mode + '_name']) - + # Store student name for hard_task_combobox in mainlinePriority if not bt.isChinese(): cn_name = self.config.static_config['student_names'][i]['CN_name'] diff --git a/gui/fragments/readme.py b/gui/fragments/readme.py index 167adf672..20d3432b6 100644 --- a/gui/fragments/readme.py +++ b/gui/fragments/readme.py @@ -39,9 +39,11 @@ def __init__(self): self.show() def getPath(self): - directory = f'./src/descriptions/{bt.stringLang}' + directory = f'./src/descriptions_{bt.stringLang}' if os.path.isdir(directory): return directory + return './src/descriptions/' + if __name__ == '__main__': import sys diff --git a/main.py b/main.py index 3ea37117b..8aca83dd3 100644 --- a/main.py +++ b/main.py @@ -92,8 +92,8 @@ def operate_item(self, item): temp.append(self.operate_item(item[i])) return temp - - + + if __name__ == '__main__': @@ -105,10 +105,10 @@ def operate_item(self, item): tt.init_all_data() tt.ocr = t.ocr # tt.solve("refresh_uiautomator2") - # tt.solve("explore_activity_challenge") + tt.solve("explore_activity_challenge") # tt.solve("activity_sweep") - # tt.solve("explore_activity_mission") - # tt.solve("explore_activity_story") + tt.solve("explore_activity_mission") + tt.solve("explore_activity_story") # tt.solve("common_shop") # tt.solve("total_assault") # tt.solve("cafe_reward") @@ -122,7 +122,7 @@ def operate_item(self, item): # tt.solve("group") # tt.solve("mail") # tt.solve("collect_reward") - tt.solve("main_story") + # tt.solve("main_story") # tt.solve("group_story") # tt.solve("clear_special_task_power") # tt.solve("scrimmage") diff --git a/module/main_story.py b/module/main_story.py index ce2cf4ced..140bc722f 100644 --- a/module/main_story.py +++ b/module/main_story.py @@ -2,7 +2,8 @@ import os import time from core import color, picture, image -from module.explore_normal_task import common_gird_method +from module.explore_normal_task import start_action, to_formation_edit_i, start_mission, \ + to_normal_task_wait_to_begin_page, check_skip_fight_and_auto_over def implement(self): @@ -168,7 +169,14 @@ def clear_current_plot(self, skip_first_screenshot=False): return res if res == "normal_task_task-wait-to-begin-feature": stage_data = check_state_and_get_stage_data(self) - common_gird_method(self, stage_data) + for i in range(0, len(stage_data['start'])): + to_formation_edit_i(self, i + 1, stage_data['start'][i]) + auto_choose_formation(self, True, {"formation_edit" + str(i + 1): (1183, 183)}, + "formation_edit" + str(i + 1)) + to_normal_task_wait_to_begin_page(self, True) + start_mission(self) + check_skip_fight_and_auto_over(self) + start_action(self, stage_data['actions']) rgb_ends = "fighting_feature" img_possibles = {"plot_formation": (1157, 651)} if res == "plot_self-formation": diff --git a/src/descriptions/en_US/Auto clear mainline plot settings.html b/src/descriptions/en_US/Auto clear mainline plot settings.html deleted file mode 100644 index 44dbb6dfd..000000000 --- a/src/descriptions/en_US/Auto clear mainline plot settings.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - -

Auto clear mainline plot settings

-

Autoplay can help walk the grid. But... some battles in the Final Episode cannot be fought automatically.

-

Numbers and the corresponding Episode

-

1 -> Episode I

-

2 -> Episode II

-

3 -> Episode III

-

4 -> Episode IV

-

5 -> Final Episode

-

6 -> Episode V

-

Use "," to separate the numbers to indicate each episode needed to be cleared.

-

Example:

-

1,2,3

-

Means clear Episode I, Episode III, Final Episode sequentially.

-

Default configuration(fill nothing in the box and click 'run' button):

-

CN : 1,2,3,4

-

Global : 1,2,3,4,5,4

-

JP: 1,2,3,4,5,4,6

-
-
 
-
- - diff --git a/src/descriptions/en_US/Commonly used emulator adb address.html b/src/descriptions/en_US/Commonly used emulator adb address.html deleted file mode 100644 index 82dc376c3..000000000 --- a/src/descriptions/en_US/Commonly used emulator adb address.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - -
For Stimulator multi-instance, please check yourself.

Single Emulator Port

1. MuMu: 7555
2. Blue stacks/LDPlayer: 5555 (If you use Blue stack emulator check if adb port debug function is open in the settings)
3. NoxPlayer: 62001 / 59865
4. Mumu12:16384
5. memuplay: 21503
-


- - diff --git a/src/descriptions/en_US/Description of normal graphs.html b/src/descriptions/en_US/Description of normal graphs.html deleted file mode 100644 index 4704f220d..000000000 --- a/src/descriptions/en_US/Description of normal graphs.html +++ /dev/null @@ -1,173 +0,0 @@ - - - - -

- Description of normal graphs: -

-

- 1. Description of use: -

-

- (1): Must - - - Unlock - - - Automatically end rounds and - - - Autofight. - - - (automated detection and opening) -

-

- (2): Supported level main line ordinary - - - 4 - 25 - - -

-

- (3): Teams move click coordinates and routes when BAAS slides are fixed and all moves are only one click, and because of the number of teams in the Blue Archive slides, the numbering coordinates and the order of movement vary according to the team. -

-

- (4): As (3), when automatically extrapolating - - - You have to make sure the selection team numbers are smaller and bigger. - - I don't know. - - - -

-

- - - (5): BAAS will choose the basis - - - < Normal Thumbnail Settings > - - - - - the selected group properties - - - - and - - - ♪ Team logic ♪ - - - Find the right configuration for the slide - -

-

- The first of the corresponding properties in the following diagrams is [1] and the second is [2]. -

-

- Team logic: -

-

- 1 Prioritize the selection of the remaining team numbers on the basis of the relationship of restraint and gradually reduce the relationship of attribution to the remaining counterpart. -

-

- 2 When selecting a team (4 - the team number) > = the number of remaining teams required. -

-

- 3 Gradual reduction of the relationship of restraint among the [1] counterparts, if no assurance is provided for 1 or 2 -

-

- 4 If some teams have been selected and 4 - the maximum number of these teams > = the number of remaining teams required, the remaining teams will be filled with an optional number. -

-

- 5 None of the above conditions are met, and the selected team number is 1, 2, 3 -

-

- - Example: - -

-

- Selecting the order of the 23 [Explosion, Crossing] task force -

-

- One team, one team. -

-

- If an outbreak is numbered 3 and not selected in the above order, select 4 as the second -

-

- Choose 12 as the final team if not elected -

-

- - - Description of normal graph push-chart level: - - -

-

- - 1. If - - - Could not close temporary folder: %s - - - , each number to be filled indicates the area to be pushed, and the program will judge whether each level in the area is to be hit according to whether the current level is sss - -

-

- - Example: - -

-

- - 15, 16, 14 - -

-

- - This represents a roll-down of figure 15,16,14. - -

-

- - 2. - - - If - - - Enable mandatory hits at each specified level - - - , enter a number to push the relevant card in the area once and enter a number-number to specify level - -

-

- - Example: - -

-

- - 15, 16-3 - -

-

- - 15-1, 15-2, 15-3, 15-4, 15-5, 16-3 - -

- - diff --git a/src/descriptions/en_US/Difficult Chart Configuration Description.html b/src/descriptions/en_US/Difficult Chart Configuration Description.html deleted file mode 100644 index de6c80f23..000000000 --- a/src/descriptions/en_US/Difficult Chart Configuration Description.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - -
-
The hardship map is used in the same way as the team logic and normal figure, and some of the difficult maps require three teams, all of which have the same attributes as the first for the region.

Fill in the following instructions:

The string that should be filled in the slide level should not exceed the characters or words "-", "sss", "present", "task", ",", and numbers
Split into several strings after commas
No keyword "sss", "present", "task"
Example: 15,12-2
Three switches (15-1, 15-2, 15-3, 12-2) according to the difficult map settings will be called to sss/take presents/take challenge tasks

2. A number and a string separated by "-"
Example: 15-sss-present
Will be called to sss with gifts (15-1, 15-2, 15-3)

3. Two numbers (specify the corresponding level)
Example: 15-3-sss-task
They'll call 15-3 to sss and complete the challenge.

4. Examples
Switches are all open, fill in: 7,8-sss, 9-3-task
It is indicated that the calls (7-1, 7-2, 7-3) to sss, the gifts and the challenging tasks, (8-1, 8-2, 8-3) to sss, 9-3
Note: Baas will automatically determine whether the level has reached sss, whether it has taken a gift or, if it has reached sss or has taken a gift, skips the level.
-
- - diff --git a/src/descriptions/en_US/Guide for activity sweep fill in.html b/src/descriptions/en_US/Guide for activity sweep fill in.html deleted file mode 100644 index 69a51c3fb..000000000 --- a/src/descriptions/en_US/Guide for activity sweep fill in.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - -

Guide for activity sweep fill in:

-

Sweep One Quest:

-

Sweep Quest Number : 1 Integer in 1 - Maximum difficulty in current activity. 

-

Number of sweeps:

-

1. Integer Means sweep times

-

2. Decimal 0.5 indicates that the current AP*0.5 will be used to sweep the quest

-

3. Score 1/3 = using current AP*(1/3) to sweep the quest

-

Sweep Multiple Quests. :

-

Use ',' to join multiple quests, which means sweep them in turn

-

Example:

-

Sweep Quset:

-

9, 10, 11

-

Number of sweeps:

-

0.5, 3, 1/3

-

AP: 999

-

Means sweep in turn.

-

Quest 9  (999 * 0.5) / 20 = 25 times

-

Quest 10  3 times

-

Quest 11 (999 * 1/3) / 20 = 16 times

- - diff --git a/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html deleted file mode 100644 index c3e7877bb..000000000 --- a/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html +++ /dev/null @@ -1,37 +0,0 @@ - - - - -

Blanche Files Game Internal Settings :

-

** Required** :

-

Option - > Graphics : Vertical Battle Screen Text Box : Off

-

Recollection Lobby : Don't choose Ako, Aru, Wakamo

-

Language(Global Server) : English

-

Recommended Selection (does not affect script running)

- - - - - - - - - - - - - - - - - - - - - - - -
ResolutionHighest
FPS60
Accelerate rendering modeCompatibility
Post-processingON
Anti-aliasingON
-

 

- - diff --git a/src/descriptions/en_US/Normal Sweeping Scanning Description.html b/src/descriptions/en_US/Normal Sweeping Scanning Description.html deleted file mode 100644 index 6314c8b75..000000000 --- a/src/descriptions/en_US/Normal Sweeping Scanning Description.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - -

- Each sweep configuration is like 'region ' - 'task number ' - 'sweep times ' -

-

- Organisation - - Regional - - 'region' - - Level - - "task-number" - - Number of sweeps - - @sweeptimes -

-

- Each configuration is separated by ', ' -

-

- 1. - - - Available Sweep Levels - - - : -

-

- All maps after Academy 1 and 5 -

-

- 2. - - - Special description - - -

-

- International, `sweep times' can be `max' -

-

- The tutorial requires 'region' as a fixed string'tutorian' -

-

- BAAS calculates whether the current level can be cleaned, depending on the current physical strength and the level of the level. -

-

- Example: -

-

- When the international uniform is physically adequate -

-

- TUTORIAL-1-20, 15-3, 20-3-max -

-

- It means cleaning the curriculum 1 20 times, then cleaning 15-3, 3 times, and then all the physical sweeps 20-3 times. -

- - diff --git a/src/descriptions/en_US/Task force attributes required by region.html b/src/descriptions/en_US/Task force attributes required by region.html deleted file mode 100644 index d04a49ad7..000000000 --- a/src/descriptions/en_US/Task force attributes required by region.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - -

25 [ Sonic        ,  Piercing   ]
24 [ Sonic        ,  Explosive ]
23 [ Explosive ,  Piercing   ]
22 [ Piercing   ,  Mystic      ]
21 [ Mystic      ,  Explosive ]
20 [ Explosive ,  Piercing   ]
19 [ Piercing   ,  Mystic      ]
18 [ Mystic      ,  Explosive ]
17 [ Explosive ,  Piercing   ]
16 [ Piercing   ,  Mystic      ]
15 [ Mystic      ,  Mystic      ]
14 [ Explosive ,  Mystic      ]
13 [ Piercing   ,  Piercing   ]
12 [ Mystic      ,  Explosive ]
11 [ Piercing   ,  Mystic      ]
10 [ Explosive ,  Mystic      ]
 9 [ Explosive  ,  Piercing   ]
 8 [ Piercing    ,  Piercing   ]
 7 [ Explosive  ,  Explosive ]
 6 [ Piercing    ,  Piercing   ]
 5 [ Explosive ]
 4 [ Piercing   ]
 3 [ Piercing   ]
 2 [ Explosive ]
 1 [ Explosive ]

- - diff --git a/src/descriptions/en_US/reporting guidelines on issues (important).html b/src/descriptions/en_US/reporting guidelines on issues (important).html deleted file mode 100644 index eda95dc6c..000000000 --- a/src/descriptions/en_US/reporting guidelines on issues (important).html +++ /dev/null @@ -1,92 +0,0 @@ -

- - Let's think about it before we report it: - -

-

- - 1. This question has never arisen before and can I try to solve it myself (Baidu, curriculum). - -

-

- - It can't be solved. - -

-

- - 2. The question arises whether I am running every time. - -

-

- - 3. How can I provide sufficient information for others to help me solve the problem? - -

-

- - 4. The distribution of colour maps within the qq group may be more attractive to others to help solve problems. - -

-

- - - Type of problem versus corresponding - - Reporting (yellow necessary) - - - -

-

- - I'm stuck on page XXX! : - -

-

- - (1). - - 1280 x 720 games when stuck - - - (Mumu on F9) - - -

-

- (2). Baas Logshot -

-

- (3). Try to switch pages to see if they only get stuck on this page -

-

- - I can't move it! : - -

-

- (1) Attempts to repulse the observation of one or two times whether each time the card is in one position. -

-

- - - (1). Recording the complete video from the "start-up slide" to the time of the stop, with attention to the simulator and the Bas log interface being recorded on the same screen. - - -

-

- - I set up the XXX configuration but didn't fight! I didn't set up XXX but I did! : - -

-

- (1) Read the configuration instructions carefully to see if they correctly understand how to fill them out. -

-

- - - (2) Configure screenshots and program logs. - - -

diff --git "a/src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" "b/src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" similarity index 100% rename from "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" rename to "src/descriptions/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" diff --git "a/src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" "b/src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" rename to "src/descriptions/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" diff --git "a/src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" "b/src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" similarity index 100% rename from "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" rename to "src/descriptions/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" diff --git "a/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" rename to "src/descriptions/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" diff --git "a/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" "b/src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" rename to "src/descriptions/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" diff --git "a/src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" rename to "src/descriptions/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" diff --git "a/src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" "b/src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" similarity index 100% rename from "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" rename to "src/descriptions/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" diff --git "a/src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" "b/src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" similarity index 100% rename from "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" rename to "src/descriptions/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" diff --git "a/src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" "b/src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" similarity index 100% rename from "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" rename to "src/descriptions/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" diff --git a/src/explore_task_data/main_story/main_story.py b/src/explore_task_data/main_story/main_story.py index 40f680ecb..b9b83eedf 100644 --- a/src/explore_task_data/main_story/main_story.py +++ b/src/explore_task_data/main_story/main_story.py @@ -2,7 +2,7 @@ "Operation-Recapture-Schale-2": { "will-fight": False, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (571, 370), 'wait-over': True, 'desc': "upper right"}, {'t': 'click', 'p': (687, 373), 'wait-over': True, 'desc': "right"}, @@ -20,7 +20,7 @@ (693, 305), (645, 564) ], - "action": [ + "actions": [ {'t': 'click', 'p': (378, 422), 'wait-over': True, 'desc': "1 left"}, {'t': 'click', 'p': (698, 308), 'wait-over': True, 'desc': "2 upper right"}, {'t': 'click', 'p': (701, 472), 'wait-over': True, 'desc': "3 lower right"}, @@ -35,7 +35,7 @@ "The-First-Sanctum-Abydos-Desert-District": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (576, 368), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (698, 473), 'wait-over': True, 'desc': "2 lower right"}, {'t': 'click', 'p': (758, 391), 'ec': True, 'desc': "1 right"}, @@ -45,7 +45,7 @@ "The-Second-Sanctum-Millennium-Ruins-District": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (574, 365), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (759, 388), 'wait-over': True, 'desc': "2 right"}, @@ -59,7 +59,7 @@ "The-Third-Sanctum-Abandoned-Amusement-Park": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (562, 534), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (845, 499), 'wait-over': True, 'desc': "2 lower right"}, @@ -73,7 +73,7 @@ "The-Forth-Sanctum-Basilica-in-the-Catacomb": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (570, 541), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (680, 302), 'wait-over': True, 'desc': "2 right"}, @@ -84,7 +84,7 @@ "The-Fifth-Sanctum-Outskirts-of-the-City-of-Eridu": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (410, 483), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -95,7 +95,7 @@ "The-Final-Defense-Operation-Schale": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (641, 467), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -106,7 +106,7 @@ "Rush": { "will-fight": True, "start": [], - "action": [ + "actions": [ {'t': 'click', 'p': (637, 425), "ec": True, 'desc': "1 upper right"}, {'t': 'click', 'p': (458, 341), 'wait-over': True, 'desc': "2 upper left"}, {'t': 'click', 'p': (761, 391), 'wait-over': True, 'desc': "3 right"}, @@ -116,7 +116,7 @@ {'t': 'click', 'p': (615, 332), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (662, 361), 'wait-over': True, 'desc': "1 upper right"}, - {'t': 'end-turn'}, + {'end-turn'}, ] } } diff --git a/src/rgb_feature/rgb_feature_CN.json b/src/rgb_feature/rgb_feature_CN.json index 9bd7b37b4..91ffb88d1 100644 --- a/src/rgb_feature/rgb_feature_CN.json +++ b/src/rgb_feature/rgb_feature_CN.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 207, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_Global.json b/src/rgb_feature/rgb_feature_Global.json index bf4f97c35..303c6350c 100644 --- a/src/rgb_feature/rgb_feature_Global.json +++ b/src/rgb_feature/rgb_feature_Global.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_JP.json b/src/rgb_feature/rgb_feature_JP.json index e44af9c4f..7dc48a4f5 100644 --- a/src/rgb_feature/rgb_feature_JP.json +++ b/src/rgb_feature/rgb_feature_JP.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], From cabf1e82d723fbd4e5d4c57b207a03e13346258e Mon Sep 17 00:00:00 2001 From: Kiramei <1710623513@qq.com> Date: Tue, 16 Apr 2024 13:39:23 +0800 Subject: [PATCH 16/30] revert to amend pr --- core/picture.py | 4 +- gui/components/expand/cafeInvite.py | 2 +- gui/fragments/readme.py | 4 +- gui/util/translator.py | 16 +- main.py | 12 +- module/main_story.py | 12 +- .../Auto clear mainline plot settings.html | 26 +++ .../Commonly used emulator adb address.html | 9 + .../en_US/Description of normal graphs.html | 173 ++++++++++++++++++ ...icult Chart Configuration Description.html | 9 + .../Guide for activity sweep fill in.html | 25 +++ ...lueArchive game (first-use must read).html | 37 ++++ .../Normal Sweeping Scanning Description.html | 68 +++++++ ...k force attributes required by region.html | 8 + ...ting guidelines on issues (important).html | 92 ++++++++++ ...\344\274\215\345\261\236\346\200\247.html" | 8 + ...\347\275\256\350\257\264\346\230\216.html" | 10 + ...5\231\250adb\345\234\260\345\235\200.html" | 3 + ...\345\206\231\350\257\264\346\230\216.html" | 20 ++ ...\345\233\276\350\257\264\346\230\216.html" | 35 ++++ ...\345\206\231\350\257\264\346\230\216.html" | 26 +++ ...\345\277\205\350\257\273\357\274\211.html" | 38 ++++ ...\346\203\205\350\257\264\346\230\216.html" | 27 +++ ...45\215\227(\351\207\215\350\246\201).html" | 17 ++ .../main_story/main_story.py | 20 +- src/rgb_feature/rgb_feature_CN.json | 2 +- src/rgb_feature/rgb_feature_Global.json | 2 +- src/rgb_feature/rgb_feature_JP.json | 2 +- 28 files changed, 669 insertions(+), 38 deletions(-) create mode 100644 src/descriptions/en_US/Auto clear mainline plot settings.html create mode 100644 src/descriptions/en_US/Commonly used emulator adb address.html create mode 100644 src/descriptions/en_US/Description of normal graphs.html create mode 100644 src/descriptions/en_US/Difficult Chart Configuration Description.html create mode 100644 src/descriptions/en_US/Guide for activity sweep fill in.html create mode 100644 src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html create mode 100644 src/descriptions/en_US/Normal Sweeping Scanning Description.html create mode 100644 src/descriptions/en_US/Task force attributes required by region.html create mode 100644 src/descriptions/en_US/reporting guidelines on issues (important).html create mode 100644 "src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" create mode 100644 "src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" create mode 100644 "src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" create mode 100644 "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" create mode 100644 "src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" create mode 100644 "src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" create mode 100644 "src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" create mode 100644 "src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" create mode 100644 "src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" diff --git a/core/picture.py b/core/picture.py index 08e3c6249..f90e5e357 100644 --- a/core/picture.py +++ b/core/picture.py @@ -1,6 +1,6 @@ import time from core import color, image - +from module.main_story import change_acc_auto def co_detect(self, rgb_ends=None, rgb_possibles=None, img_ends=None, img_possibles=None, skip_first_screenshot=False, tentitive_click=False, tentitivex=1238, tentitivey=45, max_fail_cnt=10, rgb_pop_ups=None, @@ -143,6 +143,8 @@ def deal_with_pop_ups(self, rgb_pop_ups, img_pop_ups): else: self.logger.info("find : " + position) if position == "fighting_feature": + self.logger.info("Enter fight, wait fight auto end") + change_acc_auto(self) img_possibles = { "normal_task_mission-operating-task-info-notice": (995, 101), "normal_task_end-turn": (890, 162), diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 23cf2ab39..7ce60232d 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -61,7 +61,7 @@ def __init__(self, parent=None, config=None): if self.config.static_config['student_names'][i][self.config.server_mode + '_implementation']: self.student_name.append( self.config.static_config['student_names'][i][self.config.server_mode + '_name']) - + # Store student name for hard_task_combobox in mainlinePriority if not bt.isChinese(): cn_name = self.config.static_config['student_names'][i]['CN_name'] diff --git a/gui/fragments/readme.py b/gui/fragments/readme.py index 20d3432b6..167adf672 100644 --- a/gui/fragments/readme.py +++ b/gui/fragments/readme.py @@ -39,11 +39,9 @@ def __init__(self): self.show() def getPath(self): - directory = f'./src/descriptions_{bt.stringLang}' + directory = f'./src/descriptions/{bt.stringLang}' if os.path.isdir(directory): return directory - return './src/descriptions/' - if __name__ == '__main__': import sys diff --git a/gui/util/translator.py b/gui/util/translator.py index 4b56e9bd6..6e6c9d238 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -36,6 +36,8 @@ def __init__(self, parent=None): self.stringLang = self.locale.name() self.__config_translation = None # separate dictionary for students to not caouse conflicts with existing translations + self.__students = dict() + def loadCfgTranslation(self): self.__config_translation = ConfigTranslation() @@ -46,10 +48,10 @@ def isString(self, value): def isBytes(self, value): return isinstance(value, bytes) - def toString(self, tranlation) -> str: - if self.isBytes(tranlation): - tranlation = self.decode(tranlation) - return tranlation + def toString(self, translation: str | bytes) -> str: + if self.isBytes(translation): + translation = self.decode(translation) + return translation def encode(self, *args): return [arg.encode('utf-8') if self.isString(arg) else arg for arg in args] @@ -100,6 +102,12 @@ def undo(self, text: str) -> str: text = self.__get(text) return text + def addStudent(self, chineseName, translatedName): + """ + Add student's translated name to be displayed in + hard_task_combobox in mainlinePriority + """ + self.__students[chineseName] = translatedName def getStudent(self, chineseName): if self.__students.get(chineseName): diff --git a/main.py b/main.py index 8aca83dd3..3ea37117b 100644 --- a/main.py +++ b/main.py @@ -92,8 +92,8 @@ def operate_item(self, item): temp.append(self.operate_item(item[i])) return temp - - + + if __name__ == '__main__': @@ -105,10 +105,10 @@ def operate_item(self, item): tt.init_all_data() tt.ocr = t.ocr # tt.solve("refresh_uiautomator2") - tt.solve("explore_activity_challenge") + # tt.solve("explore_activity_challenge") # tt.solve("activity_sweep") - tt.solve("explore_activity_mission") - tt.solve("explore_activity_story") + # tt.solve("explore_activity_mission") + # tt.solve("explore_activity_story") # tt.solve("common_shop") # tt.solve("total_assault") # tt.solve("cafe_reward") @@ -122,7 +122,7 @@ def operate_item(self, item): # tt.solve("group") # tt.solve("mail") # tt.solve("collect_reward") - # tt.solve("main_story") + tt.solve("main_story") # tt.solve("group_story") # tt.solve("clear_special_task_power") # tt.solve("scrimmage") diff --git a/module/main_story.py b/module/main_story.py index 140bc722f..ce2cf4ced 100644 --- a/module/main_story.py +++ b/module/main_story.py @@ -2,8 +2,7 @@ import os import time from core import color, picture, image -from module.explore_normal_task import start_action, to_formation_edit_i, start_mission, \ - to_normal_task_wait_to_begin_page, check_skip_fight_and_auto_over +from module.explore_normal_task import common_gird_method def implement(self): @@ -169,14 +168,7 @@ def clear_current_plot(self, skip_first_screenshot=False): return res if res == "normal_task_task-wait-to-begin-feature": stage_data = check_state_and_get_stage_data(self) - for i in range(0, len(stage_data['start'])): - to_formation_edit_i(self, i + 1, stage_data['start'][i]) - auto_choose_formation(self, True, {"formation_edit" + str(i + 1): (1183, 183)}, - "formation_edit" + str(i + 1)) - to_normal_task_wait_to_begin_page(self, True) - start_mission(self) - check_skip_fight_and_auto_over(self) - start_action(self, stage_data['actions']) + common_gird_method(self, stage_data) rgb_ends = "fighting_feature" img_possibles = {"plot_formation": (1157, 651)} if res == "plot_self-formation": diff --git a/src/descriptions/en_US/Auto clear mainline plot settings.html b/src/descriptions/en_US/Auto clear mainline plot settings.html new file mode 100644 index 000000000..44dbb6dfd --- /dev/null +++ b/src/descriptions/en_US/Auto clear mainline plot settings.html @@ -0,0 +1,26 @@ + + + + +

Auto clear mainline plot settings

+

Autoplay can help walk the grid. But... some battles in the Final Episode cannot be fought automatically.

+

Numbers and the corresponding Episode

+

1 -> Episode I

+

2 -> Episode II

+

3 -> Episode III

+

4 -> Episode IV

+

5 -> Final Episode

+

6 -> Episode V

+

Use "," to separate the numbers to indicate each episode needed to be cleared.

+

Example:

+

1,2,3

+

Means clear Episode I, Episode III, Final Episode sequentially.

+

Default configuration(fill nothing in the box and click 'run' button):

+

CN : 1,2,3,4

+

Global : 1,2,3,4,5,4

+

JP: 1,2,3,4,5,4,6

+
+
 
+
+ + diff --git a/src/descriptions/en_US/Commonly used emulator adb address.html b/src/descriptions/en_US/Commonly used emulator adb address.html new file mode 100644 index 000000000..82dc376c3 --- /dev/null +++ b/src/descriptions/en_US/Commonly used emulator adb address.html @@ -0,0 +1,9 @@ + + + + + +
For Stimulator multi-instance, please check yourself.

Single Emulator Port

1. MuMu: 7555
2. Blue stacks/LDPlayer: 5555 (If you use Blue stack emulator check if adb port debug function is open in the settings)
3. NoxPlayer: 62001 / 59865
4. Mumu12:16384
5. memuplay: 21503
+


+ + diff --git a/src/descriptions/en_US/Description of normal graphs.html b/src/descriptions/en_US/Description of normal graphs.html new file mode 100644 index 000000000..4704f220d --- /dev/null +++ b/src/descriptions/en_US/Description of normal graphs.html @@ -0,0 +1,173 @@ + + + + +

+ Description of normal graphs: +

+

+ 1. Description of use: +

+

+ (1): Must + + + Unlock + + + Automatically end rounds and + + + Autofight. + + + (automated detection and opening) +

+

+ (2): Supported level main line ordinary + + + 4 - 25 + + +

+

+ (3): Teams move click coordinates and routes when BAAS slides are fixed and all moves are only one click, and because of the number of teams in the Blue Archive slides, the numbering coordinates and the order of movement vary according to the team. +

+

+ (4): As (3), when automatically extrapolating + + + You have to make sure the selection team numbers are smaller and bigger. + + I don't know. + + + +

+

+ + + (5): BAAS will choose the basis + + + < Normal Thumbnail Settings > + + + + + the selected group properties + + + + and + + + ♪ Team logic ♪ + + + Find the right configuration for the slide + +

+

+ The first of the corresponding properties in the following diagrams is [1] and the second is [2]. +

+

+ Team logic: +

+

+ 1 Prioritize the selection of the remaining team numbers on the basis of the relationship of restraint and gradually reduce the relationship of attribution to the remaining counterpart. +

+

+ 2 When selecting a team (4 - the team number) > = the number of remaining teams required. +

+

+ 3 Gradual reduction of the relationship of restraint among the [1] counterparts, if no assurance is provided for 1 or 2 +

+

+ 4 If some teams have been selected and 4 - the maximum number of these teams > = the number of remaining teams required, the remaining teams will be filled with an optional number. +

+

+ 5 None of the above conditions are met, and the selected team number is 1, 2, 3 +

+

+ + Example: + +

+

+ Selecting the order of the 23 [Explosion, Crossing] task force +

+

+ One team, one team. +

+

+ If an outbreak is numbered 3 and not selected in the above order, select 4 as the second +

+

+ Choose 12 as the final team if not elected +

+

+ + + Description of normal graph push-chart level: + + +

+

+ + 1. If + + + Could not close temporary folder: %s + + + , each number to be filled indicates the area to be pushed, and the program will judge whether each level in the area is to be hit according to whether the current level is sss + +

+

+ + Example: + +

+

+ + 15, 16, 14 + +

+

+ + This represents a roll-down of figure 15,16,14. + +

+

+ + 2. + + + If + + + Enable mandatory hits at each specified level + + + , enter a number to push the relevant card in the area once and enter a number-number to specify level + +

+

+ + Example: + +

+

+ + 15, 16-3 + +

+

+ + 15-1, 15-2, 15-3, 15-4, 15-5, 16-3 + +

+ + diff --git a/src/descriptions/en_US/Difficult Chart Configuration Description.html b/src/descriptions/en_US/Difficult Chart Configuration Description.html new file mode 100644 index 000000000..de6c80f23 --- /dev/null +++ b/src/descriptions/en_US/Difficult Chart Configuration Description.html @@ -0,0 +1,9 @@ + + + + +
+
The hardship map is used in the same way as the team logic and normal figure, and some of the difficult maps require three teams, all of which have the same attributes as the first for the region.

Fill in the following instructions:

The string that should be filled in the slide level should not exceed the characters or words "-", "sss", "present", "task", ",", and numbers
Split into several strings after commas
No keyword "sss", "present", "task"
Example: 15,12-2
Three switches (15-1, 15-2, 15-3, 12-2) according to the difficult map settings will be called to sss/take presents/take challenge tasks

2. A number and a string separated by "-"
Example: 15-sss-present
Will be called to sss with gifts (15-1, 15-2, 15-3)

3. Two numbers (specify the corresponding level)
Example: 15-3-sss-task
They'll call 15-3 to sss and complete the challenge.

4. Examples
Switches are all open, fill in: 7,8-sss, 9-3-task
It is indicated that the calls (7-1, 7-2, 7-3) to sss, the gifts and the challenging tasks, (8-1, 8-2, 8-3) to sss, 9-3
Note: Baas will automatically determine whether the level has reached sss, whether it has taken a gift or, if it has reached sss or has taken a gift, skips the level.
+
+ + diff --git a/src/descriptions/en_US/Guide for activity sweep fill in.html b/src/descriptions/en_US/Guide for activity sweep fill in.html new file mode 100644 index 000000000..69a51c3fb --- /dev/null +++ b/src/descriptions/en_US/Guide for activity sweep fill in.html @@ -0,0 +1,25 @@ + + + + +

Guide for activity sweep fill in:

+

Sweep One Quest:

+

Sweep Quest Number : 1 Integer in 1 - Maximum difficulty in current activity. 

+

Number of sweeps:

+

1. Integer Means sweep times

+

2. Decimal 0.5 indicates that the current AP*0.5 will be used to sweep the quest

+

3. Score 1/3 = using current AP*(1/3) to sweep the quest

+

Sweep Multiple Quests. :

+

Use ',' to join multiple quests, which means sweep them in turn

+

Example:

+

Sweep Quset:

+

9, 10, 11

+

Number of sweeps:

+

0.5, 3, 1/3

+

AP: 999

+

Means sweep in turn.

+

Quest 9  (999 * 0.5) / 20 = 25 times

+

Quest 10  3 times

+

Quest 11 (999 * 1/3) / 20 = 16 times

+ + diff --git a/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html new file mode 100644 index 000000000..c3e7877bb --- /dev/null +++ b/src/descriptions/en_US/Internal settings in BlueArchive game (first-use must read).html @@ -0,0 +1,37 @@ + + + + +

Blanche Files Game Internal Settings :

+

** Required** :

+

Option - > Graphics : Vertical Battle Screen Text Box : Off

+

Recollection Lobby : Don't choose Ako, Aru, Wakamo

+

Language(Global Server) : English

+

Recommended Selection (does not affect script running)

+ + + + + + + + + + + + + + + + + + + + + + + +
ResolutionHighest
FPS60
Accelerate rendering modeCompatibility
Post-processingON
Anti-aliasingON
+

 

+ + diff --git a/src/descriptions/en_US/Normal Sweeping Scanning Description.html b/src/descriptions/en_US/Normal Sweeping Scanning Description.html new file mode 100644 index 000000000..6314c8b75 --- /dev/null +++ b/src/descriptions/en_US/Normal Sweeping Scanning Description.html @@ -0,0 +1,68 @@ + + + + +

+ Each sweep configuration is like 'region ' - 'task number ' - 'sweep times ' +

+

+ Organisation + + Regional + + 'region' + + Level + + "task-number" + + Number of sweeps + + @sweeptimes +

+

+ Each configuration is separated by ', ' +

+

+ 1. + + + Available Sweep Levels + + + : +

+

+ All maps after Academy 1 and 5 +

+

+ 2. + + + Special description + + +

+

+ International, `sweep times' can be `max' +

+

+ The tutorial requires 'region' as a fixed string'tutorian' +

+

+ BAAS calculates whether the current level can be cleaned, depending on the current physical strength and the level of the level. +

+

+ Example: +

+

+ When the international uniform is physically adequate +

+

+ TUTORIAL-1-20, 15-3, 20-3-max +

+

+ It means cleaning the curriculum 1 20 times, then cleaning 15-3, 3 times, and then all the physical sweeps 20-3 times. +

+ + diff --git a/src/descriptions/en_US/Task force attributes required by region.html b/src/descriptions/en_US/Task force attributes required by region.html new file mode 100644 index 000000000..d04a49ad7 --- /dev/null +++ b/src/descriptions/en_US/Task force attributes required by region.html @@ -0,0 +1,8 @@ + + + + + +

25 [ Sonic        ,  Piercing   ]
24 [ Sonic        ,  Explosive ]
23 [ Explosive ,  Piercing   ]
22 [ Piercing   ,  Mystic      ]
21 [ Mystic      ,  Explosive ]
20 [ Explosive ,  Piercing   ]
19 [ Piercing   ,  Mystic      ]
18 [ Mystic      ,  Explosive ]
17 [ Explosive ,  Piercing   ]
16 [ Piercing   ,  Mystic      ]
15 [ Mystic      ,  Mystic      ]
14 [ Explosive ,  Mystic      ]
13 [ Piercing   ,  Piercing   ]
12 [ Mystic      ,  Explosive ]
11 [ Piercing   ,  Mystic      ]
10 [ Explosive ,  Mystic      ]
 9 [ Explosive  ,  Piercing   ]
 8 [ Piercing    ,  Piercing   ]
 7 [ Explosive  ,  Explosive ]
 6 [ Piercing    ,  Piercing   ]
 5 [ Explosive ]
 4 [ Piercing   ]
 3 [ Piercing   ]
 2 [ Explosive ]
 1 [ Explosive ]

+ + diff --git a/src/descriptions/en_US/reporting guidelines on issues (important).html b/src/descriptions/en_US/reporting guidelines on issues (important).html new file mode 100644 index 000000000..eda95dc6c --- /dev/null +++ b/src/descriptions/en_US/reporting guidelines on issues (important).html @@ -0,0 +1,92 @@ +

+ + Let's think about it before we report it: + +

+

+ + 1. This question has never arisen before and can I try to solve it myself (Baidu, curriculum). + +

+

+ + It can't be solved. + +

+

+ + 2. The question arises whether I am running every time. + +

+

+ + 3. How can I provide sufficient information for others to help me solve the problem? + +

+

+ + 4. The distribution of colour maps within the qq group may be more attractive to others to help solve problems. + +

+

+ + + Type of problem versus corresponding + + Reporting (yellow necessary) + + + +

+

+ + I'm stuck on page XXX! : + +

+

+ + (1). + + 1280 x 720 games when stuck + + + (Mumu on F9) + + +

+

+ (2). Baas Logshot +

+

+ (3). Try to switch pages to see if they only get stuck on this page +

+

+ + I can't move it! : + +

+

+ (1) Attempts to repulse the observation of one or two times whether each time the card is in one position. +

+

+ + + (1). Recording the complete video from the "start-up slide" to the time of the stop, with attention to the simulator and the Bas log interface being recorded on the same screen. + + +

+

+ + I set up the XXX configuration but didn't fight! I didn't set up XXX but I did! : + +

+

+ (1) Read the configuration instructions carefully to see if they correctly understand how to fill them out. +

+

+ + + (2) Configure screenshots and program logs. + + +

diff --git "a/src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" "b/src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" new file mode 100644 index 000000000..aa78ad8d9 --- /dev/null +++ "b/src/descriptions/zh_CN/\345\220\204\345\214\272\345\237\237\346\211\200\351\234\200\351\230\237\344\274\215\345\261\236\346\200\247.html" @@ -0,0 +1,8 @@ + + + + + +

25[ 振动 , 贯穿 ]
24[ 振动 , 爆发 ]
23[ 爆发 , 贯穿 ]
22[ 贯穿 , 神秘 ]
21[ 神秘 , 爆发 ]
20[ 爆发 , 贯穿 ]
19[ 贯穿 , 神秘 ]
18[ 神秘 , 爆发 ]
17[ 爆发 , 贯穿 ]
16[ 贯穿 , 神秘 ] 
15[ 神秘 , 神秘 ] 
14[ 爆发 , 神秘 ] 
13[ 贯穿 , 贯穿 ] 
12[ 神秘 , 爆发 ] 
11[ 贯穿 , 神秘 ] 
10[ 爆发 , 神秘 ]
9  [ 爆发 , 贯穿 ]
8  [ 贯穿 , 贯穿 ]   
7  [ 爆发 , 爆发 ]    
6  [ 贯穿 , 贯穿 ]   
5  [ 爆发 ]
4  [ 贯穿 ]
3  [ 贯穿 ]
2  [ 爆发 ]
1  [ 爆发 ]

+ + diff --git "a/src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" new file mode 100644 index 000000000..cdf127eb5 --- /dev/null +++ "b/src/descriptions/zh_CN/\345\233\260\351\232\276\345\233\276\351\205\215\347\275\256\350\257\264\346\230\216.html" @@ -0,0 +1,10 @@ + + + + + +
+
困难图使用说明与选队逻辑和普通图相同,一些困难图需要三支队伍,第三支队伍的属性均与该区域所需属性的第一个属性相同

推图关卡填写说明:

推图关卡中填写的字符串不应该超出这些字符或单词 "-" , "sss", "present", "task", "," , 和数字
按逗号拆分后转化为若干字符串
1.字符串没有关键字"sss","present","task"
例子:15,12-2
根据困难图推图设置中三个的开关 将(15-1,15-2,15-3,12-2)打到sss/拿礼物/完成挑战任务

2.一个数字并跟字符串,且用"-"分隔
例子: 15-sss-present
会将(15-1,15-2,15-3)打到sss并拿礼物

3.两个数字(指定到对应关卡)
例子:15-3-sss-task
会将15-3打到sss并且完成挑战任务

4.例子
开关都开启,填写: 7,8-sss,9-3-task
表示依次执行(7-1,7-2,7-3)打到sss,拿礼物并完成挑战任务,(8-1,8-2,8-3)打到sss,9-3完成挑战任务
注:Baas会自动判断关卡是否已经打到sss,是否拿了礼物,如果已经打到sss或拿了礼物,则跳过该关卡。
+
+ + diff --git "a/src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" "b/src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" new file mode 100644 index 000000000..37481683f --- /dev/null +++ "b/src/descriptions/zh_CN/\345\270\270\350\247\201\346\250\241\346\213\237\345\231\250adb\345\234\260\345\235\200.html" @@ -0,0 +1,3 @@ +

 

+
多开端口请自行查询

单开模拟器端口

1.MuMu:7555
2.蓝叠/雷电:5555 (蓝叠模拟器要检查打开adb端口调试功能)
3.夜神:62001 / 59865
4.Mumu12:16384
5.逍遥:21503
+


diff --git "a/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" new file mode 100644 index 000000000..d64dfe9d9 --- /dev/null +++ "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" @@ -0,0 +1,20 @@ + + + + + +

每个扫荡配置形如 ’region’ - ‘task number’ - ‘sweep times’

+

表示区域'region'  关卡 ‘task-number’  扫荡次数 ‘sweep times’ 

+

每个配置都用‘,’ 隔开

+

1.可用扫荡关卡:

+

教程-1与5图后 所有地图

+

2.特殊说明

+

国际服,日服 ‘sweep times’ 可以为 'max'

+

教程需要'region'为固定字符串'tutorial'

+

BAAS会根据当前体力和关卡体力计算当前关卡能否扫荡,不足或扫荡完次数为'max'的关卡会直接退出

+

例:

+

国际服体力充足情况下

+

tutorial-1-20,15-3-3,20-3-max

+

表示先清理教程-1 20次 ,然后扫荡15-3,3次 ,然后所有体力扫荡20-3

+ + diff --git "a/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" new file mode 100644 index 000000000..d2a520e33 --- /dev/null +++ "b/src/descriptions/zh_CN/\346\231\256\351\200\232\345\233\276\350\207\252\345\212\250\346\216\250\345\233\276\350\257\264\346\230\216.html" @@ -0,0 +1,35 @@ + + + + + +

普通图自动推图说明:

+

1.使用说明:

+

(1):必须解锁自动结束回合和自动战斗(自动检测并开启)

+

(2):支持的关卡主线普通4 - 25

+

(3):BAAS推图时队伍移动点击坐标和路线是固定的,且所有移动只会点击一次,由于碧蓝档案游戏推图时若有多支队伍,则会根据队伍在游戏内编号大小坐标和移动次序不同。

+

(4):由于(3),自动推图时必须保证选择队的伍编号由小到大

+

(5):BAAS会选择根据<普通图推图设置>中选择的队伍属性<选队逻辑>寻找合适配置进行推图

+

记下列各图对应属性中第一个属性为[1],第二属性为[2]。

+

选队逻辑:

+

1 优先保证[1]克制关系基础上选择剩余队伍编号,逐渐降低剩余对应队伍属性克制关系。

+

2 选择一个队伍时 (4 - 该队伍编号)>= 剩余需要队伍数量。

+

3 若无法保证1和2,逐渐降低[1]对应队伍克制关系

+

4 如果已选出某些队伍,且 4-这些队伍中最大编号 >= 剩余需要队伍数量,则剩余队伍由可选编号依次填充。

+

5 上述条件均不满足,则以1, 2 , 3... 为选择的队伍编号 

+

例:

+

为 "23图 [ 爆发 , 贯穿 ]" 选择队伍时 尝试顺序

+

爆发一队,贯穿一队 -> 爆发一队,贯穿二队 -> 爆发一队,爆发二队 -> ...

+

如果爆发一队编号为3且按上述顺序未选出,则选择4为第二支队伍

+

还未选出则选择 1 2 为最终队伍

+

普通图推图关卡填写说明:

+

1.如果未启用强制打每一个指定关卡,填写的每一个数字表示要推图的区域,程序会根据当前关卡是否sss判断该区域每一关是否要打

+

例:

+

15,16,14

+

表示依次推15,16,14图。

+

2.如果启用强制打每一个指定关卡,则输入一个数字表示推该区域所有关卡一次,输入 数字-数字表示指定关卡

+

例:

+

15,16-3

+

表示依次打15-1,15-2,15-3,15-4,15-5,16-3

+ + diff --git "a/src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" new file mode 100644 index 000000000..a0b4a4aeb --- /dev/null +++ "b/src/descriptions/zh_CN/\346\264\273\345\212\250\346\211\253\350\215\241\345\241\253\345\206\231\350\257\264\346\230\216.html" @@ -0,0 +1,26 @@ + + + + + +

活动图扫荡填写说明:

+

扫荡一关

+

活动关卡扫荡关卡填写:1 - 最高难度 间一个 整数

+

扫荡次数:

+

1. 整数 表示扫荡次数

+

2. 小数 0.5 表示使用当前 体力*0.5 的 体力扫荡该关卡

+

3. 分数 1/3 表示使用当前体力的1/3扫荡该关卡

+

扫荡多关

+

将多个扫荡一关的关卡和次数用 ',' 隔开,表示依次扫荡这些关卡

+

例:

+

扫荡关卡:

+

9,10,11

+

扫荡次数:

+

0.5,3,1/3

+

体力: 999

+

表示依次扫荡

+

第9关 (999 * 0.5) / 20 = 25次

+

第10关 3 次

+

第11关 (999 * 1/3)/ 20 = 16次

+ + diff --git "a/src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" "b/src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" new file mode 100644 index 000000000..1de923e7f --- /dev/null +++ "b/src/descriptions/zh_CN/\347\242\247\350\223\235\346\241\243\346\241\210\346\270\270\346\210\217\345\206\205\351\203\250\350\256\276\347\275\256\357\274\210\345\210\235\346\254\241\344\275\277\347\224\250\345\277\205\350\257\273\357\274\211.html" @@ -0,0 +1,38 @@ + + + + + +

碧蓝档案游戏内部设置

+

**必选**

+

选项->图像:战斗画面上下黑边:OFF

+

记忆大厅:不选取亚子,爱露,若藻

+

国际服语言:英文

+

推荐选取(不影响脚本运行)   

+ + + + + + + + + + + + + + + + + + + + + + + +
分辨率最高
60
加速渲染模式兼容
后期处理ON
抗锯齿ON
+

 

+ + diff --git "a/src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" "b/src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" new file mode 100644 index 000000000..907c08871 --- /dev/null +++ "b/src/descriptions/zh_CN/\350\207\252\345\212\250\344\270\273\347\272\277\345\211\247\346\203\205\350\257\264\346\230\216.html" @@ -0,0 +1,27 @@ + + + + + +

主线剧情参数设置

+

自动推剧情可以帮助走格子 但是 最终章一些战斗无法自动打

+

数字与章节对应表

+

1:第一章

+

2:第二章

+

3:第三章

+

4:第四章

+

5:最终章

+

6:第五章

+

用","隔开数字表示依次要推的章节

+

例:

+

1,3,5

+

表示依次推第一章,第三章,最终章

+

什么都不填会用默认配置

+

国服:1,2,3

+

国际服:1,2,3,4,5,4

+

日服:1,2,3,4,5,4,6

+
+
 
+
+ + diff --git "a/src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" "b/src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" new file mode 100644 index 000000000..d6528e414 --- /dev/null +++ "b/src/descriptions/zh_CN/\351\227\256\351\242\230\344\270\212\346\212\245\346\214\207\345\215\227(\351\207\215\350\246\201).html" @@ -0,0 +1,17 @@ +

上报问题前请思考:

+

1.这个问题以前有没有出现过,我是否能自己尝试解决(Baidu,教程)。

+

如果不能解决

+

2.我现在是否每次运行都出现这个问题。

+

3.我该如何提供足够的信息来让其他人帮我解决问题。

+

4.在qq群内发色图或许更能吸引他人帮你解决问题。

+

问题类型与对应汇报内容(黄色必要)

+

1.我卡在XXX页面不动了!:

+

(1).卡住时1280x720游戏画面(MuMu按F9截图)

+

(2).Baas日志截图

+

(3).尝试切换页面,看一下是否只会卡在这个页面

+

2.我推图走格子卡住不动了!:

+

(1).尝试重新推1-2次观察是否每次都是卡在一个位置。

+

(1).录制完整从点击"开始推图"到卡住时视频,注意模拟器游戏界面和Baas日志界面同屏录制。

+

3.我设置了XXX配置但是没有打! /  我没设置XXX但是打了!:

+

(1).仔细阅读配置说明,查看是否正确理解该怎么填写。

+

(2).配置截图与程序日志截图。

diff --git a/src/explore_task_data/main_story/main_story.py b/src/explore_task_data/main_story/main_story.py index b9b83eedf..40f680ecb 100644 --- a/src/explore_task_data/main_story/main_story.py +++ b/src/explore_task_data/main_story/main_story.py @@ -2,7 +2,7 @@ "Operation-Recapture-Schale-2": { "will-fight": False, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (571, 370), 'wait-over': True, 'desc': "upper right"}, {'t': 'click', 'p': (687, 373), 'wait-over': True, 'desc': "right"}, @@ -20,7 +20,7 @@ (693, 305), (645, 564) ], - "actions": [ + "action": [ {'t': 'click', 'p': (378, 422), 'wait-over': True, 'desc': "1 left"}, {'t': 'click', 'p': (698, 308), 'wait-over': True, 'desc': "2 upper right"}, {'t': 'click', 'p': (701, 472), 'wait-over': True, 'desc': "3 lower right"}, @@ -35,7 +35,7 @@ "The-First-Sanctum-Abydos-Desert-District": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (576, 368), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (698, 473), 'wait-over': True, 'desc': "2 lower right"}, {'t': 'click', 'p': (758, 391), 'ec': True, 'desc': "1 right"}, @@ -45,7 +45,7 @@ "The-Second-Sanctum-Millennium-Ruins-District": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (574, 365), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (759, 388), 'wait-over': True, 'desc': "2 right"}, @@ -59,7 +59,7 @@ "The-Third-Sanctum-Abandoned-Amusement-Park": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (562, 534), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (845, 499), 'wait-over': True, 'desc': "2 lower right"}, @@ -73,7 +73,7 @@ "The-Forth-Sanctum-Basilica-in-the-Catacomb": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (570, 541), 'ec': True, 'desc': "1 lower right"}, {'t': 'click', 'p': (680, 302), 'wait-over': True, 'desc': "2 right"}, @@ -84,7 +84,7 @@ "The-Fifth-Sanctum-Outskirts-of-the-City-of-Eridu": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (410, 483), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -95,7 +95,7 @@ "The-Final-Defense-Operation-Schale": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (641, 467), 'wait-over': True, 'desc': "1 right"}, {'t': 'end-turn'}, @@ -106,7 +106,7 @@ "Rush": { "will-fight": True, "start": [], - "actions": [ + "action": [ {'t': 'click', 'p': (637, 425), "ec": True, 'desc': "1 upper right"}, {'t': 'click', 'p': (458, 341), 'wait-over': True, 'desc': "2 upper left"}, {'t': 'click', 'p': (761, 391), 'wait-over': True, 'desc': "3 right"}, @@ -116,7 +116,7 @@ {'t': 'click', 'p': (615, 332), 'wait-over': True, 'desc': "1 upper right"}, {'t': 'click', 'p': (662, 361), 'wait-over': True, 'desc': "1 upper right"}, - {'end-turn'}, + {'t': 'end-turn'}, ] } } diff --git a/src/rgb_feature/rgb_feature_CN.json b/src/rgb_feature/rgb_feature_CN.json index 91ffb88d1..9bd7b37b4 100644 --- a/src/rgb_feature/rgb_feature_CN.json +++ b/src/rgb_feature/rgb_feature_CN.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 207, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,67, 57,98,120, 200],[0,67, 57,99,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_Global.json b/src/rgb_feature/rgb_feature_Global.json index 303c6350c..bf4f97c35 100644 --- a/src/rgb_feature/rgb_feature_Global.json +++ b/src/rgb_feature/rgb_feature_Global.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], diff --git a/src/rgb_feature/rgb_feature_JP.json b/src/rgb_feature/rgb_feature_JP.json index 7dc48a4f5..e44af9c4f 100644 --- a/src/rgb_feature/rgb_feature_JP.json +++ b/src/rgb_feature/rgb_feature_JP.json @@ -16,7 +16,7 @@ "formation_edit2":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255]]], "formation_edit3":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255]]], "formation_edit4":[[[121,201],[121,285],[121,357],[121,432],[9,201],[9,285],[9,357],[9,432]],[[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109],[235,255,235,255,235,255],[235,255,235,255,235,255],[235,255,235,255,235,255],[34,54,59,79,89,109]]], - "fighting_feature": [[[834, 694], [782, 678], [814,668]],[[35, 75, 187, 207, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], + "fighting_feature": [[[834, 694], [782, 678], [811,681]],[[35, 75, 187, 227, 235, 255],[0,57, 57,92,120, 200],[0,57, 57,92,120, 200]]], "total_assault_rank_info":[[[131,167],[613,174],[673,174],[1115,183]],[[245,255,245,255,245,255],[245,255,245,255,245,255],[159,179,214,234,234,254],[159,179,214,234,234,254]]], "total_assault_accumulated_point_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115]]], "total_assault_rank_reward": [[[131,167],[613,174],[673,174],[1115,183],[121,242],[352,235],[109, 308],[370, 306]],[[159,179,214,234,234,254],[159,179,214,234,234,254],[245,255,245,255,245,255],[245,255,245,255,245,255],[41,61,64,84,95,115],[41,61,64,84,95,115],[245,255,245,255,245,255],[245,255,245,255,245,255]]], From fcdbcd0872b40030b9ff3427ae168767c71e573d Mon Sep 17 00:00:00 2001 From: Kiramei <1710623513@qq.com> Date: Tue, 16 Apr 2024 13:43:03 +0800 Subject: [PATCH 17/30] fix Union in py3.9 --- gui/util/translator.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gui/util/translator.py b/gui/util/translator.py index 6e6c9d238..9fb542d10 100644 --- a/gui/util/translator.py +++ b/gui/util/translator.py @@ -1,4 +1,4 @@ -import typing +from typing import Union from PyQt5.QtCore import QLocale, QTranslator from qfluentwidgets import ConfigSerializer, OptionsConfigItem, OptionsValidator, QConfig, qconfig @@ -37,7 +37,6 @@ def __init__(self, parent=None): self.__config_translation = None # separate dictionary for students to not caouse conflicts with existing translations self.__students = dict() - def loadCfgTranslation(self): self.__config_translation = ConfigTranslation() @@ -48,7 +47,7 @@ def isString(self, value): def isBytes(self, value): return isinstance(value, bytes) - def toString(self, translation: str | bytes) -> str: + def toString(self, translation: Union[str, bytes]) -> str: if self.isBytes(translation): translation = self.decode(translation) return translation @@ -68,7 +67,7 @@ def isChinese(self): def tr(self, context: str, sourceText: str, - disambiguation: str = '', + disambiguation: Union[str, None] = None, n: int = -1) -> str: """ Translate sourceText by looking in the qm file. From 7a2a2dba37697edf8c1167cf2b3df4f964ad4456 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Fri, 17 May 2024 20:36:26 +0100 Subject: [PATCH 18/30] fix: notification strings --- gui/components/expand/expandTemplate.py | 2 +- gui/components/expand/totalForceFightPriority.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/components/expand/expandTemplate.py b/gui/components/expand/expandTemplate.py index 39bf33428..d01f3549e 100644 --- a/gui/components/expand/expandTemplate.py +++ b/gui/components/expand/expandTemplate.py @@ -95,7 +95,7 @@ def _commit(self, key, target, labelTarget): value = target.text() assert value is not None self.config.update(key, value) - notification.success(self.tr('设置成功'), f'{labelTarget.text()}{self.tr("已经被设置为:"}{value}', self.config) + notification.success(self.tr('设置成功'), f'{labelTarget.text()}{self.tr("已经被设置为:")}{value}', self.config) class ConfigItemV2(ConfigItem): diff --git a/gui/components/expand/totalForceFightPriority.py b/gui/components/expand/totalForceFightPriority.py index 8a08631bf..776875239 100644 --- a/gui/components/expand/totalForceFightPriority.py +++ b/gui/components/expand/totalForceFightPriority.py @@ -32,4 +32,4 @@ def __init__(self, parent=None, config=None): def __accept(self): self.config.set('totalForceFightDifficulty', self.input.text()) - notification.success(self.tr('设置成功'), f'{self.tr("你的总力战最高难度已经被设置为:"}{self.input.text()}', self.config) + notification.success(self.tr('设置成功'), f'{self.tr("你的总力战最高难度已经被设置为:")}{self.input.text()}', self.config) From 4b5b2d4f19d5ffe0b3b2584ef3f294f0761b9e59 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Mon, 20 May 2024 12:00:33 +0100 Subject: [PATCH 19/30] fix: implement i18n for new gui --- auto_translate.py | 4 +- gui/README.md => docs/i18n.md | 0 gui/components/expand/featureSwitch.py | 27 +- gui/components/expand/pushConfig.py | 12 +- gui/fragments/history.py | 4 +- gui/fragments/home.py | 4 +- gui/fragments/process.py | 5 +- gui/fragments/settings.py | 4 +- gui/i18n/en_US.qm | Bin 25984 -> 27918 bytes gui/i18n/en_US.ts | 479 ++++++++++++++++--------- i18n.pro | 2 + 11 files changed, 336 insertions(+), 205 deletions(-) rename gui/README.md => docs/i18n.md (100%) diff --git a/auto_translate.py b/auto_translate.py index 1cb9c5be5..54892d15d 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -161,6 +161,6 @@ def handle(self, request): ts = XmlHandler() descriptions = HtmlHandler() - # request_en = Request([model, ts], Language.ENGLISH, 'en') - # request_en.process() + request_en = Request([model, ts], Language.ENGLISH, 'en') + request_en.process() diff --git a/gui/README.md b/docs/i18n.md similarity index 100% rename from gui/README.md rename to docs/i18n.md diff --git a/gui/components/expand/featureSwitch.py b/gui/components/expand/featureSwitch.py index 7fb371f3b..b71a5f3c2 100644 --- a/gui/components/expand/featureSwitch.py +++ b/gui/components/expand/featureSwitch.py @@ -10,41 +10,42 @@ SubtitleLabel from gui.components.expand.expandTemplate import TemplateLayoutV2 +from gui.util.translator import baasTranslator as bt class DetailSettingMessageBox(MessageBoxBase): def __init__(self, detail_config: dict, all_label_list: list, parent=None, cs=None): super().__init__(parent) - self.titleLabel = SubtitleLabel('配置详情', self) + self.titleLabel = SubtitleLabel(self.tr('配置详情'), self) configItems = [ { - 'label': '优先级', + 'label': self.tr('优先级'), 'dataType': 'int', 'key': 'priority' }, { - 'label': '执行间隔', + 'label': self.tr('执行间隔'), 'dataType': 'int', 'key': 'interval', }, { - 'label': '每日重置', + 'label': self.tr('每日重置'), 'dataType': 'list', 'key': 'daily_reset', }, { - 'label': '禁用时间段', + 'label': self.tr('禁用时间段'), 'dataType': 'list', 'key': 'disabled_time_range', }, { - 'label': '前置任务', + 'label': self.tr('前置任务'), 'dataType': 'list', 'key': 'pre_task', 'presets': [] }, { - 'label': '后置任务', + 'label': self.tr('后置任务'), 'dataType': 'list', 'key': 'post_task', 'presets': [] @@ -55,12 +56,10 @@ def __init__(self, detail_config: dict, all_label_list: list, parent=None, cs=No self.viewLayout.addWidget(self.titleLabel) self.viewLayout.addWidget(self.configWidget) - self.yesButton.setText('确定') - self.cancelButton.setText('取消') + self.yesButton.setText(self.tr('确定')) + self.cancelButton.setText(self.tr('取消')) self.widget.setMinimumWidth(350) -from gui.util.translator import baasTranslator as bt - class Layout(QWidget): def __init__(self, parent=None, config=None): @@ -136,7 +135,7 @@ def _init_components(self, config_list): self.boxes.append(cbx_wrapper) self.check_boxes.append(t_cbx) - t_cfbs = PushButton('详细配置', self) + t_cfbs = PushButton(self.tr('详细配置'), self) t_cfbs.clicked.connect(partial(self._update_detail, i)) cfbs_wrapper = QWidget() cfbs_layout = QHBoxLayout() @@ -200,7 +199,7 @@ def _sort(self): self.tableView.setCellWidget(ind, 2, cbx_wrapper) self.check_boxes.append(t_cbx) - t_cfbs = PushButton('详细配置', self) + t_cfbs = PushButton(self.tr('详细配置'), self) t_cfbs.clicked.connect(partial(self._update_detail, ind)) cfbs_wrapper = QWidget() cfbs_layout = QHBoxLayout() @@ -238,7 +237,7 @@ def _update_detail(self, index): } all_label_list = [ - [x['event_name'], x['func_name']] + [bt.tr('ConfigTranslation', x['event_name']), x['func_name']] for x in self._event_config ] diff --git a/gui/components/expand/pushConfig.py b/gui/components/expand/pushConfig.py index d17337449..ad37f5d5f 100644 --- a/gui/components/expand/pushConfig.py +++ b/gui/components/expand/pushConfig.py @@ -1,28 +1,30 @@ from .expandTemplate import TemplateLayout +from PyQt5.QtCore import QObject class Layout(TemplateLayout): def __init__(self, parent=None, config=None): + PushConfig = QObject() configItems = [ { - 'label': '在运行出错时推送', + 'label': PushConfig.tr('在运行出错时推送'), 'key': 'push_after_error', 'type': 'switch' }, { - 'label': '在全部任务完成时推送', + 'label': PushConfig.tr('在全部任务完成时推送'), 'key': 'push_after_completion', 'type': 'switch' }, { - 'label': 'json 推送', + 'label': PushConfig.tr('json 推送'), 'type': 'text', 'key': 'push_json' }, { - 'label': 'ServerChan推送', + 'label': PushConfig.tr('ServerChan推送'), 'type': 'text', 'key': 'push_serverchan' } ] - super().__init__(parent=parent, configItems=configItems, config=config) + super().__init__(parent=parent, configItems=configItems, config=config, context="PushConfig") diff --git a/gui/fragments/history.py b/gui/fragments/history.py index 2f92b997e..8ca8386e2 100644 --- a/gui/fragments/history.py +++ b/gui/fragments/history.py @@ -21,11 +21,11 @@ def __init__(self): # hide index column self.table_view.verticalHeader().setVisible(False) - self.table_view.setHorizontalHeaderLabels(['内容', '贡献者', '提交时间', '提交信息']) + self.table_view.setHorizontalHeaderLabels([self.tr('内容'), self.tr('贡献者'), self.tr('提交时间'), self.tr('提交信息')]) self.table_view.setObjectName('HistoryTable' + random.randint(0, 100000).__str__()) threading.Thread(target=self.fetch_update_info, daemon=True).start() - self.addSubInterface(icon=FIF.CARE_RIGHT_SOLID, interface=self.table_view, text='更新日志') + self.addSubInterface(icon=FIF.CARE_RIGHT_SOLID, interface=self.table_view, text=self.tr('更新日志')) self.show() diff --git a/gui/fragments/home.py b/gui/fragments/home.py index 295c6e193..e9a701afd 100644 --- a/gui/fragments/home.py +++ b/gui/fragments/home.py @@ -126,9 +126,9 @@ def call_update(self, data=None, parent=None): if data: if type(data[0]) is dict: - self.info.setText(f'{self.tr("正在运行:")}{self.event_map[data[0]["func_name"]]}') + self.info.setText(self.tr("正在运行:") + bt.tr('ConfigTranslation', self.event_map[data[0]["func_name"]])) else: - self.info.setText(f'{self.tr("正在运行:")}{data[0]}') + self.info.setText(self.tr("正在运行:") + f'{data[0]}') _main_thread_ = self.config.get_main_thread() _baas_thread_ = _main_thread_.get_baas_thread() if _baas_thread_ is not None: diff --git a/gui/fragments/process.py b/gui/fragments/process.py index f76560dfe..9909e89b7 100644 --- a/gui/fragments/process.py +++ b/gui/fragments/process.py @@ -8,7 +8,6 @@ from qfluentwidgets import (ScrollArea, TitleLabel, SubtitleLabel, ListWidget, StrongBodyLabel) from gui.components import expand - from gui.util.translator import baasTranslator as bt @@ -86,8 +85,8 @@ def refresh_status(self): print(crt_task, task_list) crt_task = crt_task if crt_task else self.tr("暂无正在执行的任务") - task_list = [task for task in task_list] if task_list else [self.tr("暂无队列中的任务")] - self.on_status.setText(crt_task) + task_list = [bt.tr('ConfigTranslation', task) for task in task_list] if task_list else [self.tr("暂无队列中的任务")] + self.on_status.setText(bt.tr('ConfigTranslation', crt_task)) self.listWidget.clear() self.listWidget.addItems(task_list) else: diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index 952ffe570..624f7ece0 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -104,8 +104,8 @@ def __init__(self, parent=None, config=None): ), SimpleSettingCard( - title='推送设置', - content='推送信息', + title=self.tr('推送设置'), + content=self.tr('推送信息'), sub_view=expand.__dict__['pushConfig'], parent=self.exploreGroup, config=self.config diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index 27832cb06d23b22299c4ff0853d35ee12248e36e..4f706c28234d870d80a2ffffbde839531750665e 100644 GIT binary patch delta 4841 zcma)82~bpL67DxQ%*=ZOA_xc!iVBD*;t>&15abr{h?_N0Mi>P}Kn6^iY&jS&Fdn#1 zgGY=KqoS#xW-w7v(U`b7Hb!!>nutf30m?*NjoHn;-#<@BG_h)nf_}%}-CuwGbw4UU z;?`f{tg%P)`+V5_^5&0&`!?s+oxHq{h?M5y+0&;c5UH<{(vXQKLnWKmPO3L|vRhJ5 ztRMji_HO*M52?k<5>?-$dLIMcnOO z2BHXG?uSphiN<>Dl*zw^V|=1a?NN)0)EnZS;niD2ak+{VPXL|Wrbt;glBkc>sK|4(L z^;=65>_=*~r3H4pTEDXxRBuyzodPpMo7F+pm!PBZ>d;?M>Ci;=vvug9;zRZRjPpc! zqtu^W+XdjK)SYi2QBu4{Wdnohdo=EUa|bg88tn<_SC*^sUI)ztCTM&zv#dk`zi50X z?FPc(8vlk@h@zKh0@A?%zgQD64HcxG)r8R+2>+%gE(8gu%+mrwd@ z@`CnYGTSxtmwt-(Z)+B*@m}bs5qq173}-YSRCf^t6=*(e_b2k`rMVdW9yD@SbM4t7 z|AIObH8;M4LsEmA4}enQOKyEz(c?iU+(u{KB6|9Jx71sBVfse=RUT&z&T#uZUV!Ko z?olhgNB&ax;Yr@W{jU3nG0@zs2KO1=$DpkhsM`~6O82UUr9=Yw6YZE2Abk7~?SdU?Aofe`#odualkaFRm$Z=ck2{)PC|RH>y%$*L)4tkgYPElKV9eZ_l+2aA9emLan?6F|Famb{zr5Hm%@pj zxS|Wa9f#qm(hYAJ2V!lKP50HkvuHL5i_x_p3@Ph$-(4S0G%Z7SGi@_w-GL_uM$mN zst?{!hEDvdkCDBC%1rvS`Uzn2Kl%l?!ifCy^lN^EbONjN`$CH_8#nc5S76#>U)Q&N zZat12TCR6kFA({)@`{i^B5pRX$puwWZ}9HXZD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z4^{bHzBk%ELuA7|bB$0ZlWP9PDk4kV|HSGPXZF&{)J*pi(P;D*xTkLZ24iUwiNt1HSiWU`{gG(kC zZ*fb%E(^@!5GAn&^M!+&bP!&IIT)4{sbSvS=WEX+;59c|WgKc?c5ig-NLaM)q z+7feOZ>=Dmp~`=Y%<$K#3#AS!ip0J&;Lr^^m35xlCpd-l2~pD`4fm(n$R%FFpWk|}Me7Fdgn>TtBD1pq@xm1U2l|`+|2Q0E z8V(H|;q_93%gmh;LrDxPGyE++U81$5L|iI5^KaQ8D2wj0Dr51EjuZ7lQ@o>)KitjG WkXWWPJWJYRC2UWhYLI29rT+zInbKqc diff --git a/gui/i18n/en_US.ts b/gui/i18n/en_US.ts index d61eb5887..40a9896f3 100644 --- a/gui/i18n/en_US.ts +++ b/gui/i18n/en_US.ts @@ -4,7 +4,7 @@ BAASTitleBar - + 帮助 Help @@ -244,12 +244,12 @@ 随机初级神秘古物 - Basic Relic + A random primary mystical antiquities. 随机中级神秘古物 - Intermediate Relic + Random middle-class mythology. @@ -312,38 +312,91 @@ Credits x125k + + DetailSettingMessageBox + + + 配置详情 + Detailed Configuration + + + + 优先级 + Priority + + + + 执行间隔 + Interval + + + + 每日重置 + Reset daily + + + + 禁用时间段 + Disable period + + + + 前置任务 + Pre task + + + + 后置任务 + Post-task + + + + 确定 + Confirm + + + + 取消 + Cancel + + EmulatorConfig - + 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) Turn on the emulator when Baas is running - + 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) Seconds to wait for the emulator to start - - 选择模拟器地址 - Enter emulator path + + 是否模拟器多开(打开后无视已经启动的模拟器进程,将再启动一个模拟器)) + Whether to open multiple emulators (after opening, ignore the already started emulator process and start another emulator) + + + + 模拟器是否多开 + Can multiple instances run simultaneously? EventMapConfig - + 推故事 Clear Story - + 推任务 Clear Quest - + 推挑战 Clear Challenge @@ -358,7 +411,7 @@ 是否不强制打到sss(启用后跳过已通过但未sss的关卡) - Whether to not force hitting sss (skip passed but not sss levels when enabled) + Whether to call to sss (jump pass but not sss after active) @@ -424,49 +477,77 @@ Achievement tasks completed + + HistoryWindow + + + 内容 + Contents + + + + 贡献者 + Contributor + + + + 提交时间 + Date of submission + + + + 提交信息 + Submission of information + + + + 更新日志 + Update Log + + HomeFragment - + 蔚蓝档案自动脚本 Blue Archive Auto Script - + 无任务 No task - + 启动 Start - + 档案,启动 Launch - + 开始你的档案之旅 Start Script - + 正在运行: - Running: + Running: Layout - + 输入你需要对手比你低几级,高几级则填负数: Enter how many ranks below or above you need the opponent to be. Use positive number for below and negative for above. - + 输入你最多需要刷新几次: Enter how many times you need to refresh: @@ -476,25 +557,10 @@ Use positive number for below and negative for above. Save - + 设置成功 successfully set - - - 你需要对手比你低 - You need a lower opponent than you - - - - 级 - Grade - - - - 你最大刷新次数设置为: - Your maximum refresh count is set to: - 刷新次数 @@ -521,22 +587,22 @@ Use positive number for below and negative for above. Is there a second cafe: - + 列表选择你要添加邀请的学生,修改后请点击确定: The list selects the students you want to invite. Click Save to make changes: - + 添加学生 Add students - + 选择摸头方式: Select the touch method: - + 选择第二咖啡厅邀请的学生 Select the students to be invited in the second cafe @@ -553,7 +619,7 @@ Use positive number for below and negative for above. 推图选项 - Stages + Slide Options @@ -567,52 +633,42 @@ See Clear Hard and Normal Stages in Help. Run - - 你的普通关配置已经被设置为: - Your normal stage configuration has been set to: - - - - ,正在推普通关。 - , pushing normal pass. - - - + 全部(不)启用 All (not) enabled - + 刷新执行时间 Refresh Execution Time - + 排序方式: - Sort by + Sort by: - + 默认排序 Default order - + 按下次执行时间排序 Soonest - + 事件 Chore - + 下次刷新时间 Execution Time - + 启用 Enable @@ -623,91 +679,66 @@ See Clear Hard and Normal Stages in Help. (see Clear Hard and Normal Stages in Help)</b> - - 你的困难关配置已经被设置为: - Your difficulty level configuration has been set to: - - - - ,正在推困难关。 - , pushing hard pass. - - - + 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): Normal stage and number of sweeps(e.g. "1-1-1,1-2-3" means that stage 1-1 is swept once, then stage 1-2 is swept three times): - + 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: Set hard stages as above, with a maximum of 3 sweeps. Use commas for separation. For JP or Global server, you can use 'max'. - + 根据学生添加关卡 Add based on students - + 爱丽丝宝贝 爱丽丝宝贝 - - 你的普通关卡已经被设置为: - Normal stages has been set to: - - - - 你的困难关卡已经被设置为: - Your difficulty level has been set to: - - - + 优先做好感等级多的日程 - Prioritize a well-liked lesson + It's a high-profile agenda. - + 日程次数 Number of tickets - + 区域名称 Location - + 初级 Novice - + 普通 Normal - + 高级 Advanced - + 特级 Superior - + 请填写您的截图间隔: Please fill in your screenshot interval: - - - 你的截屏间隔已经被设置为: - Your screenshot interval has been set to: - ADB地址(点击选择) @@ -734,83 +765,148 @@ For JP or Global server, you can use 'max'. Pyroxene - + 最高难度 Highest Difficulty - - 你的总力战最高难度已经被设置为: - Your Total Assault Max Difficulty has been set to: + + 普通关推图 + Normal Level Push Map + + + + 更多配置 + More Configuration + + + + 困难关推图 + Hard to push map + + + + 设置失败 + Setup failed + + + + 截图间隔 + Intercept + + + + 详细配置 + Detailed Configuration MainThread - + 停止 Stop - + 启动 Start - + 困难图推图已完成 Clear Hard Mission completed - + 普通图推图已完成 Clear Normal Mission completed - + 反和谐成功,请重启BA下载资源 Anti-harmony success, please restart BA download resources - + 主线剧情已完成 Main Story Completed - + 小组剧情已完成 Group Story Completed - + 支线剧情已完成 Mini story completed - + 活动剧情已完成 Event Story Completed - + 活动任务已完成 Event Quest Completed - + 活动挑战推图已完成 Event Challenge Completed + + + 无任务 + No task + + + + 普通关推图 + Clear Normal Mission + + + + 自动主线剧情 + Main Story + + + + 自动小组剧情 + Group Story + + + + 自动支线剧情 + Mini Story + + + + 自动活动剧情 + Clear Event Story + + + + 自动活动任务 + Clear Event Quest + + + + 自动活动挑战 + Clear Event Challenge + OtherConfig - + 一键反和谐 One-click anti-harmony - + 显示首页头图(下次启动时生效) Show homepage header image (effective on next startup) @@ -818,22 +914,22 @@ For JP or Global server, you can use 'max'. ProceedPlot - + 主线剧情需要推的章节数 The number of chapters to be pushed in the Main Story - + 开始推主线剧情 Start pushing the Main Story - + 开始推小组剧情 Start pushing the Group Story - + 开始推支线剧情 Start pushing the Mini Story @@ -841,30 +937,53 @@ For JP or Global server, you can use 'max'. ProcessFragment - + 调度状态 Scheduling Status - + 执行中 Executing - + 暂无正在执行的任务 No active tasks - - 队列中 - Queued - - - + 暂无队列中的任务 There are no tasks in the queue + + + 任务队列 + Task Queue + + + + PushConfig + + + 在运行出错时推送 + Send when running error + + + + 在全部任务完成时推送 + Send on all tasks + + + + json 推送 + JSON push + + + + ServerChan推送 + Server Chan push. + SaveSettingMessageBox @@ -930,115 +1049,120 @@ For JP or Global server, you can use 'max'. SettingsFragment - + 普通设置 General Settings - + 基本 Basic - + 语言 Language - + 设置界面的首选语言 Set your preferred language for the GUI - - 使用系统设置 - Use WordPress settings - - - + 应用相关设置 Server & Emulator Settings - + 选择你的服务器平台,设置你的端口(不知道端口请设置为0) Select your server platform and set your port (set to 0 if you don't know the port) - + 脚本相关设置 Script Settings - + 根据你的电脑配置,调整相应的参数。 Adjust the parameters according to your computer specs. - + 模拟器启动设置 Emulator Startup Settings - + 设置启动模拟器的路径 Set the path to start the emulator - + 相关设置 Features - + 普通图推图设置 Clear Normal Mission Settings - + 根据你的推图需求,调整相应的参数。 Adjust the parameters according to your normal clear needs. - + 困难图推图设置 Clear Hard Mission Settings - + 根据你所需困难图刷关,设置参数。 Adjust the parameters according to your hard clear needs. - + 推剧情 Push the Story Forward - + 主线剧情,小组剧情,支线剧情 Main Story, Group Story, Mini Story - + 活动图设置 Clear Event Settings - + 推故事,推任务,推挑战 Clear Story, Clear Quest, Clear Challenge - + 其他设置 Miscellaneous - + 其他的一些小功能与设置 Some other small features and settings + + + 推送设置 + Notifications Settings + + + + 推送信息 + send notifications + SweepCountConfig @@ -1119,17 +1243,17 @@ For JP or Global server, you can use 'max'. TemplateLayout - + 执行 Run - + 确定 Save - + 设置成功 successfully set @@ -1137,67 +1261,72 @@ For JP or Global server, you can use 'max'. Window - + 主页 Home - + 配置 Dailies - + 设置 Settings - - 设置成功 - successfully set - - - + 是否要删除配置: Do you want to delete the configuration: - + 你需要在确认后重启BAAS以完成更改。 You will need to restart Baas after confirmation to complete the changes. + + + 调度 + Schedule + + + + 设置失败 + Setup failed + bt - + ConfigTranslation 拖动礼物 ConfigTranslation - + ConfigTranslation 普通 ConfigTranslation - + TemplateLayout TemplateLayout - + ConfigTranslation ConfigTranslation - + MainThread MainThread - + MainThread 停止 MainThread @@ -1206,7 +1335,7 @@ For JP or Global server, you can use 'max'. helpModal - + 帮助 Help diff --git a/i18n.pro b/i18n.pro index 50108ddb1..899d59199 100644 --- a/i18n.pro +++ b/i18n.pro @@ -12,6 +12,7 @@ SOURCES += \ gui/components/expand/mainlinePriority.py \ gui/components/expand/otherConfig.py \ gui/components/expand/proceedPlot.py \ + gui/components/expand/pushConfig.py \ gui/components/expand/schedulePriority.py \ gui/components/expand/scriptConfig.py \ gui/components/expand/serverConfig.py \ @@ -20,6 +21,7 @@ SOURCES += \ gui/components/expand/totalForceFightPriority.py \ gui/components/dialog_panel.py \ gui/components/template_card.py \ + gui/fragments/history.py \ gui/fragments/home.py \ gui/fragments/process.py \ gui/fragments/readme.py \ From a004385a07fb526f35efd7195d6f6987c0a83f33 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Sun, 14 Jul 2024 20:36:56 +0100 Subject: [PATCH 20/30] fix: improve GUI English translations --- gui/components/expand/cafeInvite.py | 2 +- gui/components/expand/emulatorConfig.py | 15 +- gui/fragments/home.py | 4 +- gui/i18n/en_US.qm | Bin 27918 -> 29297 bytes gui/i18n/en_US.ts | 283 +++++++++++++++--------- gui/util/config_translation.py | 12 +- 6 files changed, 196 insertions(+), 120 deletions(-) diff --git a/gui/components/expand/cafeInvite.py b/gui/components/expand/cafeInvite.py index 96a8eee52..e8f8cd2bb 100644 --- a/gui/components/expand/cafeInvite.py +++ b/gui/components/expand/cafeInvite.py @@ -30,7 +30,7 @@ def __init__(self, parent=None, config=None): self.lay6.addWidget(self.label_3, 1, Qt.AlignLeft) self.lay6.addWidget(self.second_switch, 0, Qt.AlignRight) - self.layEnableDuplicateInvite = self.labeledCheckBoxTemplate('是否允许重复邀请:', 'cafe_reward_allow_duplicate_invite') + self.layEnableDuplicateInvite = self.labeledCheckBoxTemplate(self.tr('是否允许重复邀请:'), 'cafe_reward_allow_duplicate_invite') # self.pat_styles = [self.tr('拖动礼物')] self.pat_styles = [bt.tr('ConfigTranslation', '拖动礼物')] diff --git a/gui/components/expand/emulatorConfig.py b/gui/components/expand/emulatorConfig.py index 2abca2593..df870e502 100644 --- a/gui/components/expand/emulatorConfig.py +++ b/gui/components/expand/emulatorConfig.py @@ -5,6 +5,9 @@ from qfluentwidgets import LineEdit, PushButton, ComboBox from .expandTemplate import TemplateLayout +from gui.util import notification +from gui.util.translator import baasTranslator as bt + class Layout(TemplateLayout): def __init__(self, parent=None, config=None): @@ -52,15 +55,15 @@ def _choose_file(self, line_edit): self.config.set('program_address', file_path) def _createNotMultiComponent(self): - labelComponent = QLabel('选择模拟器地址', self) + labelComponent = QLabel(self.tr('选择模拟器地址'), self) addressKey = 'program_address' inputComponent = LineEdit(self) inputComponent.setFixedWidth(500) # 设置文本框的固定宽度 inputComponent.setText(str(self.config.get(addressKey))) - confirmButton = PushButton('确定', self) + confirmButton = PushButton(self.tr('确定'), self) confirmButton.setFixedWidth(80) # 设置确定按钮的固定宽度 confirmButton.clicked.connect(partial(self._commit, addressKey, inputComponent, labelComponent)) - selectButton = PushButton('选择', self) + selectButton = PushButton(self.tr('选择'), self) selectButton.setFixedWidth(80) # 设置选择按钮的固定宽度 selectButton.clicked.connect(partial(self._choose_file, inputComponent)) self.emulatorNotMultiAddressHLayout = QHBoxLayout(self) @@ -76,8 +79,8 @@ def _createMultiComponent(self): 'bluestacks_nxt_cn': '蓝叠模拟器', 'bluestacks_nxt': '蓝叠国际版' } - emulatorLabelComponent = QLabel('选择多开模拟器', self) - multiInstanceNumber = QLabel('多开号', self) + emulatorLabelComponent = QLabel(self.tr('选择多开模拟器'), self) + multiInstanceNumber = QLabel(self.tr('多开号'), self) currentInstanceNumber = self.config.get('emulatorMultiInstanceNumber') multiInstanceNumberInputComponent = LineEdit(self) multiInstanceNumberInputComponent.setText(str(currentInstanceNumber)) @@ -85,7 +88,7 @@ def _createMultiComponent(self): currentMultiEmulatorName = self.config.get('multiEmulatorName') chooseMultiEmulatorCombobox = ComboBox(self) values = self.multiMap.keys() - chooseMultiEmulatorCombobox.addItems([self.multiMap[key] for key in values]) + chooseMultiEmulatorCombobox.addItems([bt.tr('ConfigTranslation', self.multiMap[key]) for key in values]) chooseMultiEmulatorCombobox.setCurrentIndex(list(values).index(currentMultiEmulatorName)) chooseMultiEmulatorCombobox.currentIndexChanged.connect(self._slotForMultiInstanceComboBoxIndexChanged) multiInstanceNumberInputComponent.setFixedWidth(80) diff --git a/gui/fragments/home.py b/gui/fragments/home.py index 04c47a409..7fd150dea 100644 --- a/gui/fragments/home.py +++ b/gui/fragments/home.py @@ -128,7 +128,7 @@ def call_update(self, data=None, parent=None): if type(data[0]) is dict: self.info.setText(self.tr("正在运行:") + bt.tr('ConfigTranslation', self.event_map[data[0]["func_name"]])) else: - self.info.setText(self.tr("正在运行:") + f'{data[0]}') + self.info.setText(self.tr("正在运行:") + bt.tr('ConfigTranslation', data[0])) _main_thread_ = self.config.get_main_thread() _baas_thread_ = _main_thread_.get_baas_thread() if _baas_thread_ is not None: @@ -271,7 +271,7 @@ def start_fhx(self): def start_main_story(self): self._init_script() self.update_signal.emit([self.tr('自动主线剧情')]) - self.display('停止') + self.display(self.tr('停止')) if self._main_thread.send('solve', 'main_story'): if self._main_thread.flag_run: notify(title='BAAS', body=self.tr('主线剧情已完成')) diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index 4f706c28234d870d80a2ffffbde839531750665e..1026d1b361ae93f35988a7c832d44ea2a6171615 100644 GIT binary patch delta 4085 zcmZ`*30PF+8vf3#XSQ#5xF3OfJ@yRG<^aMx6x2@ zLD5pXk~&rzQl{;T3Dza`iebzkm#dJKb<^y={~QAK-uujR_-6k9Ti^HlzQcwq+z+kX zCNC48KuU*XB6>oSsnB&lOdi3a+SZnHO$d>x5afnQB8i zk)cbbcC0cH`M1iP3q%B{koEN%2qaEGmLbqgS>G&IRNf4Ej7YIY=G~Y^yAto%UV7#0m`YHVUvI6yL0!Ks2jP(Nw>KC}EeP(;4?l zi=u0EHVTm|evUazq>gzS0NSp!r9gzcXQU!6rfc~l~I2w>mtW?EcEF_A4Nwv7+13liPUr@ij=0<2`Hl5RH7D_nHU<#G|}d z1`0@dmk*+KMCx_?7(c|DmdTI#A&$r-6!Ou@;BuxbpXGfJ6%FD4va%5hC-@>Y6db1W zW|wSq{jdC|741Ym$^2)no>vf^$9JvJB%G;LUg3f_~y6{;t{$1^rXwERRR! zuWQ_pH%*wL>DL6#gQ_%P$z4R5otg<^96P+|yE_h%MXf>@x zaID#;xmkklce<$QxRFbw8>{(M#}N2M^I(;TF&d=#BO228du`vZ(9HTzwV`W%LP2@j zVR0DWk$1Ht!r?dTuy$JKX(Erw0MdzQ0cp!?S7QDHRoatneKDuAwD%lO5)En4^>s&+ zxYk0VN!(`X0$9_<*mU7%z+vn--K6RSl$5K>+nor?8g!RyLWm~c)?Hf+&Xa0%e|S40 z(e--8kM(HkYkK9?G$e3e?~Njn zm5~AtO9f-}1pIzW@V$_Mg^?u$+djouy($cD0+%UX!pIOLoE0X-)FSZ0=Y(<3p-Ek5 z2stkR+T=aLk)~CUlZ3AioW;213s;Y$kmxzW^(g53{U+QvkLDb5z$DyEslY;DBKMN*YnebU-mC28dELY z+XMtM4vVrVyj2Z;l1wWVWidMZ&Jg9*3sBJCL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ziNIKDCW?0V{fAr3sH$i_jf%{He#uIA9eJqk(TgI4ZYR$)F>mu zeIIg%ie%s_x+|IRzsKEy5lv4u7V!E~?pAW;2_MWmHEvHi=3^E84csZGM~yRIi47b4 zY?!3@g!x<4tM@U{JxG}owz;GjQ+fFRFu4<`i9Nw;Q9+N&*~3;%QvC}H^?oH|FQ>PL z5K>$d!|w?CDix_RI%0&w6J&uq=&v&jMkH1;tO`+OuWIn~S`FUl=GK4)r6uCJbH%TS zT;bNEhG#vZ^Sm2)Bo;Bo5(*y7k6J*L&b<3^J<_POJpTVhSx)k5sa6nwl*kT(0Z?W~ zl}G&HS1>GbOS=3%l2yuyDEpX|T&diGSz!;ig>F0^@zshgc8jQHsdq(=nxWCgBTd;F z9jxP>3T0Vdfa`Gd?*wmOl#sxDUQi1hjC@x`Os_5>9yxSGxLK9cy^z@!@Oumo*E3@k z*EQ}7<@Bp`=r_cE4WfU?&h8lp=^u`iom3wWk5*p zk>@Wz(frlAHGQwYeR=QED;suSJ-F%WJFoU0eaf|d!t**;R$_uiS&`Ii_Pg@@>zB8_ z()Y?*mww7`48n^_)6_hz88ei7;~Xw~#&M1EcvhKfWOl0Pl8Q=op&^(-81-)9)n=GV zIv%;|C|v_rG0L`*m_a_sBounty - + 竞技场 Tactical Challenge @@ -37,17 +37,17 @@ Collect Club AP - + 商店购买 Shop (Normal) - + 日程 Lesson - + 主线清除体力 Mission @@ -57,7 +57,7 @@ MomoTalk - + 咖啡厅 Cafe @@ -67,7 +67,7 @@ Mailbox - + 自动制造 Crafting @@ -87,7 +87,7 @@ Mission (Hard) Sweep - + 总力战 Total Assault @@ -107,210 +107,240 @@ Event Sweep - + 新的配置 New Configuration - + 功能开关 Schedule - + 竞技场商店购买 Shop (Tactical Challenge) - + 扫荡及购买券设置 Sweep and Purchase Tickets Settings - + 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 Control whether each task is turned on, make sure to do it before starting the script. - + 帮助你收集咖啡厅体力和信用点 Helps you collect cafe AP and Credits - + 自动每日日程 Automatic daily lesson - + 商店里买东西 Purchase in normal shop - + 竞技场商店里买东西 Purchase in tactical challenge shop - + 主线关卡自动清除体力与每日困难 Automatically use AP to sweep Normal and Hard stages - + 帮助你自动打竞技场 Helps you automate tactical challenge - + 帮助你自动制造 Help you automate crafting - + 总力战期间自动打总力战 Automatic Total Assault during Total Assault - + 各种扫荡及购买券次数设置 Various sweep and tickets purchase settings - + 官服 CN - + B服 Bilibili - + 国际服 Global - + 日服 JP - + 拖动礼物 Drag the gift - + 初级经验书 Novice Report - + 中级经验书 Normal Report - + 高级经验书 Advanced Report - + 特级经验书 Superior Report - + 初级经验珠 Lesser Stone - + 中级经验珠 Normal Stone - + 高级经验珠 Advanced Stone - + 特级经验珠 Superior Stone - + 随机初级神秘古物 A random primary mystical antiquities. - + 随机中级神秘古物 Random middle-class mythology. - + 静子神明文字x5 Shizuko's Eleph - + 真白神明文字x5 Mashiro's Eleph - + 纱绫神明文字x5 Saya's Eleph - + 风香神明文字x5 Fuuka's Eleph - + 歌原神明文字x5 Utaha's Eleph - + 初级经验书x5 Normal Report x5 - + 中级经验书x10 Novice Report x10 - + 高级经验书x3 Advanced Report x3 - + 特级经验书x1 Superior Report x1 - + 信用点x5k Credits x5k - + 信用点x75k Credits x75k - + 信用点x125k Credits x125k + + + 暂无任务 + No Task + + + + MuMu模拟器 + MuMu Player + + + + 蓝叠模拟器 + BlueStacks CN + + + + 蓝叠国际版 + BlueStacks + + + + 日常小游戏 + Daily Game Activity + + + + 咖啡厅邀请 + Cafe Invitation + DetailSettingMessageBox @@ -363,24 +393,24 @@ EmulatorConfig - + 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) - Turn on the emulator when Baas is running + Open the emulator when running Baas - + 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) - Seconds to wait for the emulator to start + Seconds to wait for the emulator to start - + 是否模拟器多开(打开后无视已经启动的模拟器进程,将再启动一个模拟器)) - Whether to open multiple emulators (after opening, ignore the already started emulator process and start another emulator) + Enable emulator multi-instance (ignore existing emulator processes and start a new emulator when enabled) - + 模拟器是否多开 - Can multiple instances run simultaneously? + Enable multi-instance for the emulator @@ -406,17 +436,17 @@ 是否手动boss战(进入关卡后暂停等待手操) - Whether to manually boss battle (wait for human takeover after entering the level) + Manual boss battle (pause and wait for manual control after entering the level) 是否不强制打到sss(启用后跳过已通过但未sss的关卡) - Whether to call to sss (jump pass but not sss after active) + Skip achieving SSS rank (skip levels that have been completed but not reached SSS after enabling) 开启后强制打每一个指定的关卡(不管是否sss) - Force play for each specified stage after opening (with or without sss) + Force play each specified level after enabling (regardless of SSS rank) @@ -474,7 +504,7 @@ 完成成就任务 - Achievement tasks completed + Complete achievement tasks @@ -482,27 +512,27 @@ 内容 - Contents + Contents 贡献者 - Contributor + Contributor 提交时间 - Date of submission + Date of submission 提交信息 - Submission of information + Submission of information 更新日志 - Update Log + Changelog @@ -533,7 +563,7 @@ Start Script - + 正在运行: Running: @@ -567,42 +597,32 @@ Use positive number for below and negative for above. Number of Refreshes - - 优先邀请好感等级低学生: - Prioritize inviting students with low affection levels: - - - - 是否要领取奖励: - Claim rewards: - - - + 是否使用邀请券: Use invitation ticket: - + 是否有二号咖啡厅: Is there a second cafe: - + 列表选择你要添加邀请的学生,修改后请点击确定: The list selects the students you want to invite. Click Save to make changes: - + 添加学生 Add students - + 选择摸头方式: Select the touch method: - + 选择第二咖啡厅邀请的学生 Select the students to be invited in the second cafe @@ -624,7 +644,7 @@ Use positive number for below and negative for above. 请在下面填写要推的图,填写方式见-普通图自动推图说明- - Please enter the stages to be cleared + Please enter the stages to be cleared. See Clear Hard and Normal Stages in Help. @@ -702,7 +722,7 @@ For JP or Global server, you can use 'max'. 优先做好感等级多的日程 - It's a high-profile agenda. + Prioritize lessons with higher affection levels @@ -799,16 +819,56 @@ For JP or Global server, you can use 'max'. 详细配置 Detailed Configuration + + + 是否领取奖励: + Claim rewards: + + + + 优先邀请券好感等级低的学生: + Priority is given to students with low levels of affection: + + + + 是否允许学生更换服饰: + Are students allowed to change clothes: + + + + 是否允许重复邀请: + Whether to repeat invitations: + + + + 选择模拟器地址 + Emulator Path + + + + 选择 + Select + + + + 选择多开模拟器 + Select multi-instance emulator + + + + 多开号 + Port + MainThread - + 停止 Stop - + 启动 Start @@ -823,42 +883,42 @@ For JP or Global server, you can use 'max'. Clear Normal Mission completed - + 反和谐成功,请重启BA下载资源 Anti-harmony success, please restart BA download resources - + 主线剧情已完成 Main Story Completed - + 小组剧情已完成 Group Story Completed - + 支线剧情已完成 Mini story completed - + 活动剧情已完成 Event Story Completed - + 活动任务已完成 Event Quest Completed - + 活动挑战推图已完成 Event Challenge Completed - + 无任务 No task @@ -868,32 +928,32 @@ For JP or Global server, you can use 'max'. Clear Normal Mission - + 自动主线剧情 Main Story - + 自动小组剧情 Group Story - + 自动支线剧情 Mini Story - + 自动活动剧情 Clear Event Story - + 自动活动任务 Clear Event Quest - + 自动活动挑战 Clear Event Challenge @@ -906,10 +966,15 @@ For JP or Global server, you can use 'max'. One-click anti-harmony - + 显示首页头图(下次启动时生效) Show homepage header image (effective on next startup) + + + 修复Mumu无法登录日服 + Fix Mumu Player unable to log into the Japanese server + ProceedPlot @@ -947,12 +1012,12 @@ For JP or Global server, you can use 'max'. Executing - + 暂无正在执行的任务 No active tasks - + 暂无队列中的任务 There are no tasks in the queue @@ -972,17 +1037,17 @@ For JP or Global server, you can use 'max'. 在全部任务完成时推送 - Send on all tasks + Send when all tasks are completed json 推送 - JSON push + JSON notification ServerChan推送 - Server Chan push. + ServerChan notification @@ -1293,19 +1358,19 @@ For JP or Global server, you can use 'max'. 设置失败 - Setup failed + Setup failed bt - + ConfigTranslation 拖动礼物 ConfigTranslation - + ConfigTranslation 普通 ConfigTranslation diff --git a/gui/util/config_translation.py b/gui/util/config_translation.py index c9d062dc4..a7a0eaeb3 100644 --- a/gui/util/config_translation.py +++ b/gui/util/config_translation.py @@ -41,6 +41,9 @@ def __init__(self, parent=None): self.tr("学院交流会"): "学院交流会", self.tr("凌晨四点重启"): "凌晨四点重启", self.tr("活动扫荡"): "活动扫荡", + self.tr("暂无任务"): "暂无任务", + self.tr("日常小游戏"): "日常小游戏", + self.tr("咖啡厅邀请"): "咖啡厅邀请", # switch self.tr("新的配置"): "新的配置", @@ -100,6 +103,11 @@ def __init__(self, parent=None): self.tr('日服'): '日服', # patstyles combobox - self.tr('拖动礼物'): '拖动礼物' - } + self.tr('拖动礼物'): '拖动礼物', + + # emulator combobox + self.tr('MuMu模拟器'): 'MuMu模拟器', + self.tr('蓝叠模拟器'): '蓝叠模拟器', + self.tr('蓝叠国际版'): '蓝叠国际版' + } From 3b3398adb85e254f7f51b9ad8d53cfabde7c03e0 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:55:20 +0100 Subject: [PATCH 21/30] feat: add Japanese option in GUI --- gui/i18n/ja_JP.ts | 1404 ++++++++++++++++++++++++++++++++++++++++++ gui/util/language.py | 3 +- i18n.pro | 4 +- 3 files changed, 1409 insertions(+), 2 deletions(-) create mode 100644 gui/i18n/ja_JP.ts diff --git a/gui/i18n/ja_JP.ts b/gui/i18n/ja_JP.ts new file mode 100644 index 000000000..0c706f3ac --- /dev/null +++ b/gui/i18n/ja_JP.ts @@ -0,0 +1,1404 @@ + + + + + BAASTitleBar + + + 帮助 + + + + + ConfigTranslation + + + 每日特别委托 + + + + + 悬赏通缉 + + + + + 竞技场 + + + + + 收集每日体力 + + + + + 收集小组体力 + + + + + 商店购买 + + + + + 日程 + + + + + 主线清除体力 + + + + + 自动MomoTalk + + + + + 咖啡厅 + + + + + 查收邮箱 + + + + + 自动制造 + + + + + 收集奖励 + + + + + 普通关清体力 + + + + + 困难关清体力 + + + + + 总力战 + + + + + 学院交流会 + + + + + 凌晨四点重启 + + + + + 活动扫荡 + + + + + 暂无任务 + + + + + 日常小游戏 + + + + + 咖啡厅邀请 + + + + + 新的配置 + + + + + 功能开关 + + + + + 竞技场商店购买 + + + + + 扫荡及购买券设置 + + + + + 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 + + + + + 帮助你收集咖啡厅体力和信用点 + + + + + 自动每日日程 + + + + + 商店里买东西 + + + + + 竞技场商店里买东西 + + + + + 主线关卡自动清除体力与每日困难 + + + + + 帮助你自动打竞技场 + + + + + 帮助你自动制造 + + + + + 总力战期间自动打总力战 + + + + + 各种扫荡及购买券次数设置 + + + + + 初级经验书 + + + + + 中级经验书 + + + + + 高级经验书 + + + + + 特级经验书 + + + + + 初级经验珠 + + + + + 中级经验珠 + + + + + 高级经验珠 + + + + + 特级经验珠 + + + + + 随机初级神秘古物 + + + + + 随机中级神秘古物 + + + + + 静子神明文字x5 + + + + + 真白神明文字x5 + + + + + 纱绫神明文字x5 + + + + + 风香神明文字x5 + + + + + 歌原神明文字x5 + + + + + 初级经验书x5 + + + + + 中级经验书x10 + + + + + 高级经验书x3 + + + + + 特级经验书x1 + + + + + 信用点x5k + + + + + 信用点x75k + + + + + 信用点x125k + + + + + 官服 + + + + + B服 + + + + + 国际服 + + + + + 日服 + + + + + 拖动礼物 + + + + + MuMu模拟器 + + + + + 蓝叠模拟器 + + + + + 蓝叠国际版 + + + + + DetailSettingMessageBox + + + 配置详情 + + + + + 优先级 + + + + + 执行间隔 + + + + + 每日重置 + + + + + 禁用时间段 + + + + + 前置任务 + + + + + 后置任务 + + + + + 确定 + + + + + 取消 + + + + + EmulatorConfig + + + 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) + + + + + 是否模拟器多开(打开后无视已经启动的模拟器进程,将再启动一个模拟器)) + + + + + 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) + + + + + 模拟器是否多开 + + + + + EventMapConfig + + + 推故事 + + + + + 推任务 + + + + + 推挑战 + + + + + ExploreConfig + + + 是否手动boss战(进入关卡后暂停等待手操) + + + + + 是否不强制打到sss(启用后跳过已通过但未sss的关卡) + + + + + 开启后强制打每一个指定的关卡(不管是否sss) + + + + + 爆发一队 + + + + + 爆发二队 + + + + + 贯穿一队 + + + + + 贯穿二队 + + + + + 神秘一队 + + + + + 神秘二队 + + + + + 振动一队 + + + + + 振动二队 + + + + + HardTaskConfig + + + 打到SSS + + + + + 拿礼物 + + + + + 完成成就任务 + + + + + HistoryWindow + + + 内容 + + + + + 贡献者 + + + + + 提交时间 + + + + + 提交信息 + + + + + 更新日志 + + + + + HomeFragment + + + 蔚蓝档案自动脚本 + + + + + 无任务 + + + + + 启动 + + + + + 档案,启动 + + + + + 开始你的档案之旅 + + + + + 正在运行: + + + + + Layout + + + 输入你需要对手比你低几级,高几级则填负数: + + + + + 输入你最多需要刷新几次: + + + + + 确定 + + + + + 设置成功 + + + + + 刷新次数 + + + + + 是否领取奖励: + + + + + 是否使用邀请券: + + + + + 优先邀请券好感等级低的学生: + + + + + 是否允许学生更换服饰: + + + + + 是否有二号咖啡厅: + + + + + 是否允许重复邀请: + + + + + 列表选择你要添加邀请的学生,修改后请点击确定: + + + + + 添加学生 + + + + + 选择摸头方式: + + + + + 选择第二咖啡厅邀请的学生 + + + + + 目前制造物品优先级,排在前面的会优先选择 + + + + + 是否使用加速券 + + + + + 选择模拟器地址 + + + + + 选择 + + + + + 选择多开模拟器 + + + + + 多开号 + + + + + 推图选项 + + + + + 请在下面填写要推的图,填写方式见-普通图自动推图说明- + + + + + 开始推图 + + + + + 普通关推图 + + + + + 全部(不)启用 + + + + + 刷新执行时间 + + + + + 排序方式: + + + + + 默认排序 + + + + + 按下次执行时间排序 + + + + + 事件 + + + + + 下次刷新时间 + + + + + 启用 + + + + + 更多配置 + + + + + 详细配置 + + + + + <b>困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍</b> + + + + + 困难关推图 + + + + + 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): + + + + + 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: + + + + + 根据学生添加关卡 + + + + + 爱丽丝宝贝 + + + + + 设置失败 + + + + + 优先做好感等级多的日程 + + + + + 日程次数 + + + + + 区域名称 + + + + + 初级 + + + + + 普通 + + + + + 高级 + + + + + 特级 + + + + + 请填写您的截图间隔: + + + + + 截图间隔 + + + + + ADB地址(点击选择) + + + + + 自动查询模拟器失败!请尝试手动输入端口 + + + + + adb地址获取失败 + + + + + 信用点 + + + + + 青辉石 + + + + + 最高难度 + + + + + MainThread + + + 停止 + + + + + 启动 + + + + + 困难图推图已完成 + + + + + 无任务 + + + + + 普通关推图 + + + + + 普通图推图已完成 + + + + + 反和谐成功,请重启BA下载资源 + + + + + 自动主线剧情 + + + + + 主线剧情已完成 + + + + + 自动小组剧情 + + + + + 小组剧情已完成 + + + + + 自动支线剧情 + + + + + 支线剧情已完成 + + + + + 自动活动剧情 + + + + + 活动剧情已完成 + + + + + 自动活动任务 + + + + + 活动任务已完成 + + + + + 自动活动挑战 + + + + + 活动挑战推图已完成 + + + + + OtherConfig + + + 一键反和谐 + + + + + 修复Mumu无法登录日服 + + + + + 显示首页头图(下次启动时生效) + + + + + ProceedPlot + + + 主线剧情需要推的章节数 + + + + + 开始推主线剧情 + + + + + 开始推小组剧情 + + + + + 开始推支线剧情 + + + + + ProcessFragment + + + 调度状态 + + + + + 执行中 + + + + + 暂无正在执行的任务 + + + + + 任务队列 + + + + + 暂无队列中的任务 + + + + + PushConfig + + + 在运行出错时推送 + + + + + 在全部任务完成时推送 + + + + + json 推送 + + + + + ServerChan推送 + + + + + SaveSettingMessageBox + + + 新建配置 + + + + + 输入新建的配置名: + + + + + 确定 + + + + + 取消 + + + + + ServerConfig + + + 请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本 + + + + + 官服 + + + + + B服 + + + + + 国际服 + + + + + 日服 + + + + + 请填写您的adb端口号 + + + + + 检测adb地址(检测目前开启的模拟器adb地址) + + + + + SettingsFragment + + + 普通设置 + + + + + 基本 + + + + + 语言 + + + + + 设置界面的首选语言 + + + + + 应用相关设置 + + + + + 选择你的服务器平台,设置你的端口(不知道端口请设置为0) + + + + + 脚本相关设置 + + + + + 根据你的电脑配置,调整相应的参数。 + + + + + 模拟器启动设置 + + + + + 设置启动模拟器的路径 + + + + + 相关设置 + + + + + 普通图推图设置 + + + + + 根据你的推图需求,调整相应的参数。 + + + + + 困难图推图设置 + + + + + 根据你所需困难图刷关,设置参数。 + + + + + 推剧情 + + + + + 主线剧情,小组剧情,支线剧情 + + + + + 活动图设置 + + + + + 推故事,推任务,推挑战 + + + + + 其他设置 + + + + + 其他的一些小功能与设置 + + + + + 推送设置 + + + + + 推送信息 + + + + + SweepCountConfig + + + <b>各区域扫荡次数以英文逗号分隔</b> + + + + + <b>各区域扫荡次数以英文逗号分隔,扫荡次数可以为max</b> + + + + + 悬赏委托扫荡 + + + + + 学园交流会扫荡 + + + + + 活动关卡扫荡关卡 + + + + + 活动关卡扫荡次数 + + + + + 特殊委托扫荡 + + + + + 国服购买邀请券可在<b>商店购买</b>中实现 + + + + + <b>用券数目设置,下拉框选择</b> + + + + + 悬赏委托扫荡券购买次数 + + + + + 日程券购买次数 + + + + + 学园交流会扫荡券购买次数 + + + + + SwitchFragment + + + 配置设置 + + + + + 功能开关 + + + + + TemplateLayout + + + 执行 + + + + + 确定 + + + + + 设置成功 + + + + + Window + + + 主页 + + + + + 调度 + + + + + 配置 + + + + + 设置 + + + + + 设置失败 + + + + + 是否要删除配置: + + + + + 你需要在确认后重启BAAS以完成更改。 + + + + + bt + + + ConfigTranslation + + + + + ConfigTranslation + 拖动礼物 + + + + + ConfigTranslation + 普通 + + + + + TemplateLayout + + + + + MainThread + + + + + MainThread + 停止 + + + + + helpModal + + + 帮助 + + + + diff --git a/gui/util/language.py b/gui/util/language.py index 27b4ad44d..102d639af 100644 --- a/gui/util/language.py +++ b/gui/util/language.py @@ -7,9 +7,10 @@ class Language(Enum): CHINESE_SIMPLIFIED = QLocale(QLocale.Chinese, QLocale.China) ENGLISH = QLocale(QLocale.English, QLocale.UnitedStates) + JAPANESE = QLocale(QLocale.Japanese, QLocale.Japan) def combobox(): - return ['简体中文', 'English'] + return ['简体中文', 'English', '日本語'] if __name__ == "__main__": for language in Language: diff --git a/i18n.pro b/i18n.pro index 899d59199..95898d2a3 100644 --- a/i18n.pro +++ b/i18n.pro @@ -30,4 +30,6 @@ SOURCES += \ gui/util/config_translation.py \ window.py \ -TRANSLATIONS += gui/i18n/en_US.ts +TRANSLATIONS += gui/i18n/en_US.ts \ + gui/i18n/ja_JP.ts \ + From cdae7d1d2228551146e0a718010a9cc544033805 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Mon, 15 Jul 2024 20:56:12 +0100 Subject: [PATCH 22/30] refactor: auto_translate.py --- auto_translate.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/auto_translate.py b/auto_translate.py index 54892d15d..6508c940f 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -84,8 +84,6 @@ def handle(self, request): # Find all 'source' tags and translate their text for source in root.iter('source'): - source_text = source.text - translated_text = request.translate(source_text) # Find the 'translation' tag within the parent 'message' tag translation = source.getparent().find('translation') @@ -95,9 +93,9 @@ def handle(self, request): if translation.attrib['type'] == 'obsolete': # Delete the parent 'message' tag if 'type' is 'obsolete' source.getparent().getparent().remove(source.getparent()) - else: + elif translation.attrib['type'] == 'unfinished' and not translation.text: # Update the 'translation' tag if 'type' is not 'obsolete' - translation.text = translated_text + translation.text = request.translate(source.text) else: # Don't update the 'translation' tag if 'type' attribute doesn't exist continue From 7b412e416b03d460248fc3f942c5a98d857c34c2 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Mon, 15 Jul 2024 23:06:19 +0100 Subject: [PATCH 23/30] feat: Japanese language draft --- auto_translate.py | 110 ++-- gui/i18n/ja_JP.qm | Bin 0 -> 24360 bytes gui/i18n/ja_JP.ts | 535 +++++++++--------- requirements-i18n.txt | 3 +- ...343\201\257\345\277\205\350\252\255).html" | 92 +++ ...43\203\263(\351\207\215\350\246\201).html" | 96 ++++ ...\343\203\211\343\203\254\343\202\271.html" | 8 + ...\343\203\240\345\261\236\346\200\247.html" | 165 ++++++ ...\345\213\225\350\252\254\346\230\216.html" | 105 ++++ ...\343\203\230\343\203\253\343\203\227.html" | 77 +++ ...\343\202\213\346\211\213\351\240\206.html" | 69 +++ ...\343\202\214\343\201\276\343\201\231.html" | 197 +++++++ ...\343\201\256\350\252\254\346\230\216.html" | 10 + 13 files changed, 1137 insertions(+), 330 deletions(-) create mode 100644 gui/i18n/ja_JP.qm create mode 100644 "src/descriptions/ja_JP/Azur Archives Game Internals (\345\210\235\343\202\201\343\201\246\350\252\255\343\202\200\343\203\246\343\203\274\343\202\266\343\203\274\343\201\257\345\277\205\350\252\255).html" create mode 100644 "src/descriptions/ja_JP/\343\202\250\343\202\271\343\202\253\343\203\254\343\203\274\343\202\267\343\203\247\343\203\263\343\201\256\343\202\254\343\202\244\343\203\211\343\203\251\343\202\244\343\203\263(\351\207\215\350\246\201).html" create mode 100644 "src/descriptions/ja_JP/\344\270\200\350\210\254\347\232\204\343\201\252\343\202\250\343\203\237\343\203\245\343\203\254\343\203\274\343\202\277 ADB \343\202\242\343\203\211\343\203\254\343\202\271.html" create mode 100644 "src/descriptions/ja_JP/\345\220\204\345\234\260\345\237\237\343\201\253\345\277\205\350\246\201\343\201\252\343\203\201\343\203\274\343\203\240\345\261\236\346\200\247.html" create mode 100644 "src/descriptions/ja_JP/\346\234\254\347\267\250\343\201\256\350\207\252\345\213\225\350\252\254\346\230\216.html" create mode 100644 "src/descriptions/ja_JP/\346\247\213\346\210\220\343\201\256\343\202\271\343\202\261\343\202\270\343\203\245\343\203\274\343\203\253\350\250\255\345\256\232\343\201\256\343\203\230\343\203\253\343\203\227.html" create mode 100644 "src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\343\203\200\343\202\244\343\202\242\343\202\260\343\203\251\343\203\240\343\202\271\343\202\244\343\203\274\343\203\227\343\202\222\345\237\213\343\202\201\343\202\213\346\211\213\351\240\206.html" create mode 100644 "src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\345\233\263\343\201\256\350\252\254\346\230\216\343\201\257\350\207\252\345\213\225\347\232\204\343\201\253\343\203\227\343\203\203\343\202\267\343\203\245\343\201\225\343\202\214\343\201\276\343\201\231.html" create mode 100644 "src/descriptions/ja_JP/\351\233\243\346\230\223\345\272\246\345\233\263\346\247\213\346\210\220\343\201\256\350\252\254\346\230\216.html" diff --git a/auto_translate.py b/auto_translate.py index 6508c940f..12b6ad4d7 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -1,10 +1,8 @@ import os -import codecs -import translatehtml +import translators as ts +from bs4 import BeautifulSoup from lxml import etree -from argostranslate import package, translate - from gui.util.language import Language @@ -19,59 +17,48 @@ def handle(self, request): class Request: - from_code = "zh" - def __init__(self, handlers: list[Handler], language: Language, argos_model: str): + def __init__(self, handlers: list[Handler], + qt_language: Language, + translator: str = 'bing', + from_lang: str = 'auto', + to_lang: str = 'en'): """ Parameters ---------- handlers: list[Handler] - a list of handlers that represent the the files to translate. + a list of handlers that represent the files to translate. - language: Language + qt_language: Language the memeber of the enum Language to translate - argos_model: str - The argos model to load for translation + translator: str + see https://github.com/uliontse/translators + + from_lang: str + see https://github.com/uliontse/translators + + to_lang: str + see https://github.com/uliontse/translators """ - self.language = language - self.strLang = language.value.name() + self.qt_language = qt_language + self.strLang = qt_language.value.name() self.handlers = handlers - self.to_code = argos_model - self.model = None - - def translate(self, text): - translation = self.model.translate(text) - print(translation) - return translation + self.translator = translator + self.from_lang = from_lang + self.to_lang = to_lang + + def translate_text(self, text): + text = ts.translate_text(text, self.translator, self.from_lang, self.to_lang) + print(text) + return text + + def translate_html(self, html_text): + return ts.translate_html(html_text, self.translator, self.from_lang, self.to_lang) def process(self): self.handlers[0].handle(self) -class ModelHandler(Handler): - """Load argos model. It must always be the first element in the list of handlers""" - def handle(self, request): - # Load Argos Translate model - to_code = request.to_code - - available_packages = package.get_available_packages() - available_package = list( - filter( - lambda x: x.from_code == request.from_code and x.to_code == to_code, available_packages - ) - )[0] - download_path = available_package.download() - package.install_from_path(download_path) - - # Translate - installed_languages = translate.get_installed_languages() - from_lang = list(filter(lambda x: x.code == request.from_code, installed_languages))[0] - to_lang = list(filter(lambda x: x.code == to_code, installed_languages))[0] - - request.model = from_lang.get_translation(to_lang) - self.set_next(request) - - class XmlHandler(Handler): """Translate ts files""" def handle(self, request): @@ -95,7 +82,7 @@ def handle(self, request): source.getparent().getparent().remove(source.getparent()) elif translation.attrib['type'] == 'unfinished' and not translation.text: # Update the 'translation' tag if 'type' is not 'obsolete' - translation.text = request.translate(source.text) + translation.text = request.translate_text(source.text) else: # Don't update the 'translation' tag if 'type' attribute doesn't exist continue @@ -109,7 +96,7 @@ class HtmlHandler(Handler): """Generate descriptions""" def translate_mission_types(self, request, input_dir, output_dir): input_path = os.path.join(input_dir, '各区域所需队伍属性.html') - output_path = os.path.join(output_dir, request.translate('各区域所需队伍属性') + '.html') + output_path = os.path.join(output_dir, request.translate_text('各区域所需队伍属性') + '.html') translations = { '爆发': 'Explosive', @@ -129,7 +116,7 @@ def translate_mission_types(self, request, input_dir, output_dir): def handle(self, request): input_dir = 'src/descriptions/' - output_dir = f'src/descriptions_{request.strLang}' + output_dir = f'src/descriptions/{request.strLang}' # Ensure the output directory exists if not os.path.exists(output_dir): os.makedirs(output_dir) @@ -142,23 +129,26 @@ def handle(self, request): if filename.endswith('.html'): # Parse the HTML file with BeautifulSoup - with codecs.open(os.path.join(input_dir, filename), 'r', 'utf-8') as f_in: - - # Translate all text in the HTML file - soup = translatehtml.translate_html(request.model, f_in) - - # Write the translated HTML to the output directory - name, extension = os.path.splitext(filename) - output_name = f'{request.translate(name)}.html' - with codecs.open(os.path.join(output_dir, output_name), 'w', 'utf-8') as f_out: - f_out.write(str(soup.prettify())) + with open(os.path.join(input_dir, filename), 'r') as f: + html = f.read() + translated_html = request.translate_html(html) + soup = BeautifulSoup(translated_html, 'lxml') + prettyHTML = soup.prettify() + + # Write the translated HTML to the output directory + name, extension = os.path.splitext(filename) + output_name = f'{request.translate_text(name)}.html' + with open(os.path.join(output_dir, output_name), 'w') as f: + f.write(prettyHTML) if __name__ == "__main__": - model = ModelHandler() - ts = XmlHandler() + gui = XmlHandler() descriptions = HtmlHandler() - request_en = Request([model, ts], Language.ENGLISH, 'en') - request_en.process() + # request_en = Request([gui, descriptions], Language.ENGLISH, 'bing', 'zh-Hans', 'en') + # # request_en.process() + + request_jp = Request([descriptions], Language.JAPANESE, 'bing', 'zh-Hans', 'ja') + request_jp.process() diff --git a/gui/i18n/ja_JP.qm b/gui/i18n/ja_JP.qm new file mode 100644 index 0000000000000000000000000000000000000000..1f8cfa1237fe4c55599fd4abbec20f34ef5d47b7 GIT binary patch literal 24360 zcmbV!33yaRwtsb&&O)a<#DFpE3}RpaDc-&vXDiQKMo;*CP1L01Q2}BG3;4M z2!u5l5&}dp3ks5iZ5&3%n*fsoK?BsemO5Hea^69y6EOErXy3?U)ET1m*@ zFG;Vhg9r&6N-Q;N2)X?xiGAQEA=4+2`}3b7$Vto*MQKLLM7q_~7acLV~|CeDLG%fTv>kWbmH}iG0X#c^)O?oxjztAs@F2%ssr z_K6Khyzm(z@kayZ#ajuP@=1Vg8rFULwt&MsKP6=NqJR@^WSK3LL&I5p?@i;3M%{Fz$5VBOhX2x8ELEc>EF} z$p9Vef z?d`b61U*#u9U&9$44M`Nywm;|G_7nrA$@a$QpU08%Y!a7MiO%0$)Jxm{+f`))S!!J zb_0)Rg04p6e$bVm@9wh_GAu9Xp9wEupWA{XBk?`z_ra0xVn4>T1^12pk&tntg9jc1 zADA`;-@fk?+&2b~zr_GP8y7qw4Ri{z22XkqeA#z!@HBq^iQo(4u#dmm8~oX$Snr+H z!IuWr5;AjDuswA<_GfPJ^%MD^&lAR&0S^-rVaD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cxDY|gMQdlIK`t-8+mZc;YBhWww}MSKA= zX=(FM!Rzk0z=)U?>2QXyQFlIP3Og}FE9E&;bk9)(dk2NqYmJI4{-uMtTy<9vPxer- zHx22X*m#&xts$Yh0bSHM9g3LTRb`!=4y~^pZbHxD_BPF_*5eZ`wkd7;js=>FtnUhp z5#4;e4`V-GWa;uxMIVN4Sw>ds))jP&Lcx2l-jn7%?eWpg6SQnn#eB)jMv;g0o+T*D zvh-H>L++fPe&IoE;qsx*FaBac1F}WAKt5|ybuSEKFK6xHIIY96`w@{^j^sMLv~Qs2 z-;fyU>P>pod=AiR{%pD~hDAX`UxNjAVjd@$P1R-py?9(do1b^nhApx#eKIL;LDo{k F{{rmnXI%gQ literal 0 HcmV?d00001 diff --git a/gui/i18n/ja_JP.ts b/gui/i18n/ja_JP.ts index 0c706f3ac..599fe7753 100644 --- a/gui/i18n/ja_JP.ts +++ b/gui/i18n/ja_JP.ts @@ -1,4 +1,3 @@ - @@ -6,7 +5,7 @@ 帮助 - + ヘルプ @@ -14,332 +13,332 @@ 每日特别委托 - + 毎日の特別注文 悬赏通缉 - + 賞金獲得手配 竞技场 - + アリーナ 收集每日体力 - + デイリースタミナを集める 收集小组体力 - + グループでスタミナを集める 商店购买 - + 店舗での購入 日程 - + 計画 主线清除体力 - + 本編はスタミナクリア 自动MomoTalk - + 自動MomoTalk 咖啡厅 - + カフェ 查收邮箱 - + メールボックスを確認する 自动制造 - + 自動製造 收集奖励 - + 報酬を集める 普通关清体力 - + 普通関清スタミナ 困难关清体力 - + 体力クリアが難しい 总力战 - + 総合力戦 学院交流会 - + 教員交流会 凌晨四点重启 - + 朝4時に再開 活动扫荡 - + イベントスイープ 暂无任务 - + タスクはまだありません 日常小游戏 - + 毎日のミニゲーム 咖啡厅邀请 - + カフェ招待 新的配置 - + 新しい構成 功能开关 - + 機能スイッチ 竞技场商店购买 - + アリーナショップ購入 扫荡及购买券设置 - + バウチャーの一括購入設定 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 - + 重要、ここに各機能がオンになっているかどうかを制御する機能スイッチがありますので、開始する前に有効になっているかどうかを確認してください。 帮助你收集咖啡厅体力和信用点 - + カフェのスタミナとクレジットを集めるのに役立ちます 自动每日日程 - + 自動日次スケジュール 商店里买东西 - + お店で物を買う 竞技场商店里买东西 - + アリーナショップで物を買う 主线关卡自动清除体力与每日困难 - + メインレベルはスタミナと毎日の難易度を自動的にクリアします 帮助你自动打竞技场 - + アリーナを自動的にプレイするのに役立ちます 帮助你自动制造 - + 製造の自動化を支援 总力战期间自动打总力战 - + 総力戦中に自動的に総力戦を戦う 各种扫荡及购买券次数设置 - + 各種クリーニング・クーポン購入時間設定 初级经验书 - + 初心者体験ブック 中级经验书 - + 中級体験書 高级经验书 - + アドバンストエクスペリエンスブック 特级经验书 - + 特別体験ブック 初级经验珠 - + 初心者体験ビーズ 中级经验珠 - + 中級XPビーズ 高级经验珠 - + アドバンストエクスペリエンスビーズ 特级经验珠 - + プレミアム EXP ビーズ 随机初级神秘古物 - + ランダムの主要な神秘的なアーティファクト 随机中级神秘古物 - + ランダム中級神秘古代遺物 静子神明文字x5 - + 神明静子 text x5 真白神明文字x5 - + 真白神テキスト×5 纱绫神明文字x5 - + 神戸沙耶 テキスト x5 风香神明文字x5 - + 風香神テキスト x5 歌原神明文字x5 - + 歌原上明 テキスト x5 初级经验书x5 - + 初心者XPブック x5 中级经验书x10 - + 中級XPブック x10 高级经验书x3 - + 上級XPブック x3 特级经验书x1 - + スペシャルEXPブック x1 信用点x5k - + クレジット x5k 信用点x75k - + クレジットx75k 信用点x125k - + クレジット x125k 官服 - + 公式ユニフォーム B服 - + Bスーツ 国际服 - + 国際サーバー 日服 - + デイウェア 拖动礼物 - + ギフトをドラッグする MuMu模拟器 - + MuMuエミュレータ 蓝叠模拟器 - + Blue Stackシミュレータ 蓝叠国际版 - + ブルースタックインターナショナルエディション @@ -347,47 +346,47 @@ 配置详情 - + 構成の詳細 优先级 - + 優先権 执行间隔 - + 実行間隔 每日重置 - + 毎日のリセット 禁用时间段 - + 期間を無効にする 前置任务 - + 前提条件のタスク 后置任务 - + ポストタスク 确定 - + 確かですか 取消 - + キャンセル @@ -395,22 +394,22 @@ 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) - + Baas の実行中にエミュレータの電源を入れます (エミュレータの機能スイッチを起動し、オフにしてもエミュレータは起動しません) 是否模拟器多开(打开后无视已经启动的模拟器进程,将再启动一个模拟器)) - + エミュレータがマルチオープンかどうか(すでに起動しているエミュレータプロセスを無視して、エミュレータを開いた後、別のエミュレータが起動します)) 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) - + エミュレータの起動時刻を待ちます(エミュレータの起動からデスクトップの読み込みが完了するまでの時間(秒単位、通常はデフォルト)です) 模拟器是否多开 - + シミュレーターがよりオープンであるかどうか @@ -418,17 +417,17 @@ 推故事 - + ストーリーをプッシュする 推任务 - + プッシュタスク 推挑战 - + 課題をプッシュする @@ -436,57 +435,57 @@ 是否手动boss战(进入关卡后暂停等待手操) - + 手動でボスと戦うかどうか(レベルに入ったら一時停止し、手動演習を待ちます) 是否不强制打到sss(启用后跳过已通过但未sss的关卡) - + SSS を強制的にヒットさせないかどうか (有効にした後、SSS は通過したが SSS ではないレベルをスキップ) 开启后强制打每一个指定的关卡(不管是否sss) - + 有効にすると、指定されたすべてのレベルを強制的にプレイします(SSSに関係なく) 爆发一队 - + チームでブレイクアウト 爆发二队 - + セカンドチームのアウトブレイク 贯穿一队 - + チームを駆け抜ける 贯穿二队 - + セカンドチームを通して 神秘一队 - + ミステリーチーム 神秘二队 - + ミステリーチーム2 振动一队 - + チームをバイブレーションする 振动二队 - + セカンドチームを振動させる @@ -494,17 +493,17 @@ 打到SSS - + SSSを打つ 拿礼物 - + ギフトを贈る 完成成就任务 - + 達成ミッションをクリアする @@ -512,27 +511,27 @@ 内容 - + コンテンツ 贡献者 - + 貢献 提交时间 - + 提出時間 提交信息 - + 情報の送信 更新日志 - + 変更履歴 @@ -540,32 +539,32 @@ 蔚蓝档案自动脚本 - + Teal Archives 自動スクリプト 无任务 - + タスクなし 启动 - + 始める 档案,启动 - + アーカイブ、起動 开始你的档案之旅 - + アーカイブの旅を始めましょう 正在运行: - + ランニング: @@ -573,287 +572,287 @@ 输入你需要对手比你低几级,高几级则填负数: - + 対戦相手が自分より下にいるために必要なレベル数を入力し、数レベル上の場合は負の数を入力します。 输入你最多需要刷新几次: - + 更新する必要がある最大回数を入力します。 确定 - + 確かですか 设置成功 - + セットアップは成功しました 刷新次数 - + 更新の回数 是否领取奖励: - + 報酬を受け取るには: 是否使用邀请券: - + 招待券を使用するかどうか: 优先邀请券好感等级低的学生: - + 評価の低い学生のための優先招待クーポン: 是否允许学生更换服饰: - + 生徒が服装を変えることができるかどうか: 是否有二号咖啡厅: - + カフェその2はありますか? 是否允许重复邀请: - + 重複する招待を許可するかどうか: 列表选择你要添加邀请的学生,修改后请点击确定: - + 招待状に追加する生徒を選択し、編集後に [OK] をクリックします。 添加学生 - + 学生を追加する 选择摸头方式: - + 頭に触れる方法を選択します。 选择第二咖啡厅邀请的学生 - + 生徒を招待する 2 つ目のカフェを選択します 目前制造物品优先级,排在前面的会优先选择 - + 現在、製造品目の優先順位は、リストの最初にある人に優先されます 是否使用加速券 - + アクセラレータクーポンを使用するかどうか 选择模拟器地址 - + シミュレータのアドレスを選択します 选择 - + 選ぶ 选择多开模拟器 - + マルチオープンエミュレータを選択します 多开号 - + マルチオープニングナンバー 推图选项 - + プッシュマップオプション 请在下面填写要推的图,填写方式见-普通图自动推图说明- - + 以下に押す図形を記入していただき、その記入方法は -普通の図形の自動押しの記述- 开始推图 - + 画像のプッシュを開始する 普通关推图 - + 通常のグアントゥイ図 全部(不)启用 - + すべて(無効)に 刷新执行时间 - + 更新実行時間 排序方式: - + 並び替え: 默认排序 - + デフォルトの並べ替え 按下次执行时间排序 - + 最終実行時刻で並べ替え 事件 - + 出来事 下次刷新时间 - + 次回の更新時刻 启用 - + エネーブル 更多配置 - + その他の構成 详细配置 - + 詳細な構成 <b>困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍</b> - + <b>難易度マップのチーム属性はノーマルマップと同じです(ノーマルマップの設定を参照)ので、ヘルプの指示に従って難易度マップのレベルを選択し、対応するマップに従ってチームを設定してください</b> 困难关推图 - + グラフが閉じにくい - 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): - + 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): + 通常のレベルと時間(例:「1-1-1、1-2-3」は、レベルが1-1で1回プレイされ、その後、レベルが1-2で3回プレイされることを意味します): 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: - + 難しいレベルの設定は上記と同じですが、注:最大回数は3回です)、カンマは英語のカンマで、日本語と海外のサーバーには最大で入力できます。 根据学生添加关卡 - + 学生に基づいてレベルを追加する 爱丽丝宝贝 - + アリス・ベイビー 设置失败 - + セットアップに失敗しました 优先做好感等级多的日程 - + 多くのレベルの好感のあるスケジュールが優先されます 日程次数 - + イベントの数 区域名称 - + 地域の名前 初级 - + ジュニア 普通 - + 通常の 高级 - + 年上 特级 - + 请填写您的截图间隔: - + スクリーンショットの間隔を入力してください。 截图间隔 - + スクリーンショットの間隔 ADB地址(点击选择) - + ADBアドレス(クリックして選択) 自动查询模拟器失败!请尝试手动输入端口 - + 自動クエリ エミュレーターが失敗しました。 ポートを手動で入力してみます adb地址获取失败 - + adbアドレスを取得できませんでした 信用点 - + クレジット 青辉石 - + ラップライト 最高难度 - + 最高難易度 @@ -861,97 +860,97 @@ 停止 - + やめて 启动 - + 始める 困难图推图已完成 - + 難しい図のプッシュマップが完成しました 无任务 - + タスクなし 普通关推图 - + 通常のグアントゥイ図 普通图推图已完成 - + 通常のフィギュアプッシュが完了しました 反和谐成功,请重启BA下载资源 - + アンチハーモニーが成功しました。BAを再起動してリソースをダウンロードしてください 自动主线剧情 - + 自動本編 主线剧情已完成 - + 本編は完成しました 自动小组剧情 - + 自動グループプロット 小组剧情已完成 - + グループストーリーが完成しました 自动支线剧情 - + 自動サイドプロット 支线剧情已完成 - + サイドストーリーが完成しました 自动活动剧情 - + プロットを自動的にアクティブにする 活动剧情已完成 - + イベントプロットが完了しました 自动活动任务 - + タスクを自動的に移動する 活动任务已完成 - + アクティブなタスクが完了しました 自动活动挑战 - + 自動アクティビティの課題 活动挑战推图已完成 - + イベントチャレンジプッシュマップが完成しました @@ -959,17 +958,17 @@ 一键反和谐 - + ワンクリックアンチハーモニー 修复Mumu无法登录日服 - + Mumuが日本のサーバーにログインできない問題を修正しました 显示首页头图(下次启动时生效) - + ホームヘッダー画像の表示(次回の起動時に有効) @@ -977,22 +976,22 @@ 主线剧情需要推的章节数 - + メインストーリーでプッシュする必要がある章の数 开始推主线剧情 - + メインストーリーのプッシュを開始します 开始推小组剧情 - + グループプロットのプッシュを開始する 开始推支线剧情 - + サイドプロットをプッシュし始める @@ -1000,27 +999,27 @@ 调度状态 - + スケジュールステータス 执行中 - + 実行 暂无正在执行的任务 - + 進行中のタスクはありません 任务队列 - + タスクキュー 暂无队列中的任务 - + キューにタスクがない @@ -1028,22 +1027,22 @@ 在运行出错时推送 - + 実行中のエラー時にプッシュ 在全部任务完成时推送 - + すべてのタスクが完了したときにプッシュされます json 推送 - + JSONプッシュ ServerChan推送 - + サイファーが押す @@ -1051,22 +1050,22 @@ 新建配置 - + 新しい構成を作成する 输入新建的配置名: - + 新しい構成の名前を入力します。 确定 - + 確かですか 取消 - + キャンセル @@ -1074,37 +1073,37 @@ 请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本 - + サーバーを選択し、サーバーを慎重に切り替え、サーバーを切り替えた後にスクリプトを再起動してください 官服 - + 公式ユニフォーム B服 - + Bスーツ 国际服 - + 国際サーバー 日服 - + デイウェア 请填写您的adb端口号 - + ADBポート番号を入力してください 检测adb地址(检测目前开启的模拟器adb地址) - + ADB アドレスの検出 (現在有効なエミュレータの ADB アドレスを確認してください) @@ -1112,117 +1111,117 @@ 普通设置 - + 通常設定 基本 - + 肝要 语言 - + 言語 设置界面的首选语言 - + インターフェイスの優先言語を設定する 应用相关设置 - + 関連する設定を適用する 选择你的服务器平台,设置你的端口(不知道端口请设置为0) - + サーバープラットフォームを選択し、ポートを設定します(ポートがわからない場合は、0に設定してください) 脚本相关设置 - + スクリプト関連の設定 根据你的电脑配置,调整相应的参数。 - + PCの構成に応じてパラメータを調整します。 模拟器启动设置 - + エミュレータの起動設定 设置启动模拟器的路径 - + エミュレーターを起動するパスを設定する 相关设置 - + 関連設定 普通图推图设置 - + 通常のグラフプッシュ画像設定 根据你的推图需求,调整相应的参数。 - + プッシュのニーズに応じて、対応するパラメータを調整します。 困难图推图设置 - + 難しいグラフプッシュマップの設定 根据你所需困难图刷关,设置参数。 - + 必要な難易度に応じてパラメータを設定します。 推剧情 - + プロットをプッシュする 主线剧情,小组剧情,支线剧情 - + メインプロット、グループプロット、サイドプロット 活动图设置 - + アクティビティ図の設定 推故事,推任务,推挑战 - + ストーリーをプッシュし、タスクをプッシュし、チャレンジをプッシュ 其他设置 - + その他の設定 其他的一些小功能与设置 - + その他の小さな機能と設定 推送设置 - + プッシュ設定 推送信息 - + プッシュメッセージ @@ -1230,62 +1229,62 @@ <b>各区域扫荡次数以英文逗号分隔</b> - + <b>各領域のスイープの数はコンマで区切られます</b> <b>各区域扫荡次数以英文逗号分隔,扫荡次数可以为max</b> - + <b>各領域の掃引数はカンマで区切られ、掃引数は最大</b>にすることができます 悬赏委托扫荡 - + 報奨金注文の一掃 学园交流会扫荡 - + 学校交流が一掃されます。 活动关卡扫荡关卡 - + イベント レベル: スイープ レベル 活动关卡扫荡次数 - + アクティブ・レベル・スイープの数 特殊委托扫荡 - + 特注スイープ 国服购买邀请券可在<b>商店购买</b>中实现 - + 国内サーバー購入の招待券は<b>、店舗購入</b>で実現できます <b>用券数目设置,下拉框选择</b> - + <b>使用するクーポンの数を設定し、ドロップダウンリストから選択します</b> 悬赏委托扫荡券购买次数 - + バウンティオーダースイープチケットの購入回数 日程券购买次数 - + イベントのチケットを購入できる回数 学园交流会扫荡券购买次数 - + 学校交流会のスイープチケット購入回数 @@ -1293,12 +1292,12 @@ 配置设置 - + 設定を構成する 功能开关 - + 機能スイッチ @@ -1306,17 +1305,17 @@ 执行 - + 実行する 确定 - + 確かですか 设置成功 - + セットアップは成功しました @@ -1324,37 +1323,37 @@ 主页 - + ホームページ 调度 - + 派遣 配置 - + 意気 设置 - + 並べる 设置失败 - + セットアップに失敗しました 是否要删除配置: - + 設定を削除しますか? 你需要在确认后重启BAAS以完成更改。 - + 変更を完了するには、確認後に BAAS を再起動する必要があります。 @@ -1362,35 +1361,35 @@ ConfigTranslation - + 設定 ConfigTranslation 拖动礼物 - + 設定 ConfigTranslation 普通 - + 設定 TemplateLayout - + テンプラトラ ユー MainThread - + メイン・トレッド MainThread 停止 - + メイン・トレッド @@ -1398,7 +1397,7 @@ 帮助 - + ヘルプ - + \ No newline at end of file diff --git a/requirements-i18n.txt b/requirements-i18n.txt index 992351dfe..f7392fefa 100644 --- a/requirements-i18n.txt +++ b/requirements-i18n.txt @@ -1,4 +1,3 @@ -argostranslate bs4 lxml -translatehtml \ No newline at end of file +translators \ No newline at end of file diff --git "a/src/descriptions/ja_JP/Azur Archives Game Internals (\345\210\235\343\202\201\343\201\246\350\252\255\343\202\200\343\203\246\343\203\274\343\202\266\343\203\274\343\201\257\345\277\205\350\252\255).html" "b/src/descriptions/ja_JP/Azur Archives Game Internals (\345\210\235\343\202\201\343\201\246\350\252\255\343\202\200\343\203\246\343\203\274\343\202\266\343\203\274\343\201\257\345\277\205\350\252\255).html" new file mode 100644 index 000000000..a4252f900 --- /dev/null +++ "b/src/descriptions/ja_JP/Azur Archives Game Internals (\345\210\235\343\202\201\343\201\246\350\252\255\343\202\200\343\203\246\343\203\274\343\202\266\343\203\274\343\201\257\345\277\205\350\252\255).html" @@ -0,0 +1,92 @@ + + + + + +

+ アズールアーカイブ + + ゲーム内の設定 + + : +

+

+ + + **必須** + + + : +

+

+ + オプション - >画像 + + :戦闘画面の上下の黒いバー:オフ +

+

+ + 記憶の殿堂 + + :赤穂、愛瑠、若茂は選ばない +

+

+ + 国際言語 + + :英語 +

+

+ + 推奨 + + (スクリプトの実行には影響しません) +

+ + + + + + + + + + + + + + + + + + + + + + + +
+ 解決 + + 最高 +
+ フレーム + + 60 +
+ 高速レンダリングモード + + コンパチ +
+ 後処理 + + 親切 +
+ アンチエイリアシング + + 親切 +
+

+

+ + diff --git "a/src/descriptions/ja_JP/\343\202\250\343\202\271\343\202\253\343\203\254\343\203\274\343\202\267\343\203\247\343\203\263\343\201\256\343\202\254\343\202\244\343\203\211\343\203\251\343\202\244\343\203\263(\351\207\215\350\246\201).html" "b/src/descriptions/ja_JP/\343\202\250\343\202\271\343\202\253\343\203\254\343\203\274\343\202\267\343\203\247\343\203\263\343\201\256\343\202\254\343\202\244\343\203\211\343\203\251\343\202\244\343\203\263(\351\207\215\350\246\201).html" new file mode 100644 index 000000000..ee2b2dc07 --- /dev/null +++ "b/src/descriptions/ja_JP/\343\202\250\343\202\271\343\202\253\343\203\254\343\203\274\343\202\267\343\203\247\343\203\263\343\201\256\343\202\254\343\202\244\343\203\211\343\203\251\343\202\244\343\203\263(\351\207\215\350\246\201).html" @@ -0,0 +1,96 @@ + + +

+ + 問題を報告する前に、次の点を考慮してください。 + +

+

+ + 1.この問題は以前に発生しましたか、そして私はそれを自分で解決しようとすることができますか(Baidu、チュートリアル)。 + +

+

+ + 解決できない場合 + +

+

+ + 2.今走るたびにこの問題が発生しますか? + +

+

+ + 3. 他の人が問題を解決するのを助けるのに十分な情報を提供するにはどうすればいいですか? + +

+

+ + 4. QQグループにカラーチャートを投稿すると、問題の解決に役立つ他の人にとってより魅力的になる場合があります。 + +

+

+ + + 問題の種類と対応 + + レポートの内容(黄色が必要) + + + +

+

+ + 1. XXXページで立ち往生して動かない! : + +

+

+ + (1). + + スタック時の1280x720ゲーム画面 + + + (MuMuがF9を押すスクリーンショット) + + +

+

+ (2). Baasログのスクリーンショット +

+

+ (3). ページを切り替えてみて、このページでしか動かなくなるかどうかを確認してみてください +

+

+ + 2.絵を押して、格子が立ち往生して動けなくなったら歩きました! : + +

+

+ (1). もう一度1〜2回押してみて、毎回1つの位置に動かないか確認します。 +

+

+ + + 「プッシュ開始」をクリックしてから動かなくなったときまでのビデオを録画し、エミュレーターゲームインターフェイスとBaasログインターフェイスの同じ画面記録に注意してください。 + + +

+

+ + 3. XXX設定をセットアップしましたが、ヒットしませんでした! /  XXXをセットしてないのに当たった! : + +

+

+ (1). 設定手順を注意深く読んで、正しく入力する方法を理解しているかどうかを確認してください。 +

+

+ + + (2). 設定とプログラムログのスクリーンショット。 + + +

+ + \ No newline at end of file diff --git "a/src/descriptions/ja_JP/\344\270\200\350\210\254\347\232\204\343\201\252\343\202\250\343\203\237\343\203\245\343\203\254\343\203\274\343\202\277 ADB \343\202\242\343\203\211\343\203\254\343\202\271.html" "b/src/descriptions/ja_JP/\344\270\200\350\210\254\347\232\204\343\201\252\343\202\250\343\203\237\343\203\245\343\203\254\343\203\274\343\202\277 ADB \343\202\242\343\203\211\343\203\254\343\202\271.html" new file mode 100644 index 000000000..6655babe7 --- /dev/null +++ "b/src/descriptions/ja_JP/\344\270\200\350\210\254\347\232\204\343\201\252\343\202\250\343\203\237\343\203\245\343\203\254\343\203\274\343\202\277 ADB \343\202\242\343\203\211\343\203\254\343\202\271.html" @@ -0,0 +1,8 @@ + + +

+

+
複数のポートはご自身でご確認ください

シミュレータポートを1つ開く

1.MuMu:7555
2.ブルースタック/サンダーボルト:5555(開いているadbポートデバッグ機能を確認するためのBlueStacksエミュレーター)
3.ナイトゴッド:62001/59865
4.むむ12:16384
5. MEmu: 21503
+


+ + \ No newline at end of file diff --git "a/src/descriptions/ja_JP/\345\220\204\345\234\260\345\237\237\343\201\253\345\277\205\350\246\201\343\201\252\343\203\201\343\203\274\343\203\240\345\261\236\346\200\247.html" "b/src/descriptions/ja_JP/\345\220\204\345\234\260\345\237\237\343\201\253\345\277\205\350\246\201\343\201\252\343\203\201\343\203\274\343\203\240\345\261\236\346\200\247.html" new file mode 100644 index 000000000..f43f0e5e8 --- /dev/null +++ "b/src/descriptions/ja_JP/\345\220\204\345\234\260\345\237\237\343\201\253\345\277\205\350\246\201\343\201\252\343\203\201\343\203\274\343\203\240\345\261\236\346\200\247.html" @@ -0,0 +1,165 @@ + + + + + +

+ + + 26 [ ミスティック , アウトブレイク ] + + +

+

+ + + 25[ 振動 , スルー ] + + +
+ + + 24[ 振動 ・ 破裂 ] + + +
+ + + 23[ 発生 、 を通じて ] + + +
+ + + 22 [ スルー , ミステリー ] + + +
+ + + 21[ ミステリー , アウトブレイク ] + + +
+ + + 20[ 発生 ・ 通し ] + + +
+ + + 19[ 通し , ミスティック ] + + +
+ + + 18[ ミスティック , アウトブレイク ] + + +
+ + + 17[ 発生 , 浸透] + + +
+ + + 16[ 通し 、 ミスティック ] + + +
+ + + 15[ ミステリー , ミステリー ] + + +
+ + + 14[ アウトブレイク , ミステリー ] + + +
+ + + 13[ スルー , スルー ] + + +
+ + + 12[ ミステリー , アウトブレイク ] + + +
+ + + 11[ スルー , ミステリー ] + + +
+ + + 10[ アウトブレイク , ミステリー ] + + +
+ + + 9 [ 発生 、 を通じて ] + + +
+ + + 8 [ 貫通 、 貫通 ] + + +
+ + + 7 [ アウトブレイク , アウトブレイク ] + + +
+ + + 6 [ スルー 、 スルー ] + + +
+ + + 5 [ アウトブレイク ] + + +
+ + + 4 [ から ] + + +
+ + + 3 [ から ] + + +
+ + + 2 [ アウトブレイク ] + + +
+ + + 1 [ アウトブレイク ] + + +

+ + diff --git "a/src/descriptions/ja_JP/\346\234\254\347\267\250\343\201\256\350\207\252\345\213\225\350\252\254\346\230\216.html" "b/src/descriptions/ja_JP/\346\234\254\347\267\250\343\201\256\350\207\252\345\213\225\350\252\254\346\230\216.html" new file mode 100644 index 000000000..ad46ad2e0 --- /dev/null +++ "b/src/descriptions/ja_JP/\346\234\254\347\267\250\343\201\256\350\207\252\345\213\225\350\252\254\346\230\216.html" @@ -0,0 +1,105 @@ + + + + + +

+ + + メインストーリーのパラメータ設定 + + +

+

+ + + プロットの自動プッシュは、グリッドの移動に役立ちます + + + だがしかし + + + 最終章では、一部の戦闘が自動でプレイできない + + +

+

+ + 番号はチャプターマッピングに対応 + +

+

+ + 1:チャプター1 + +

+

+ + 2: チャプター2 + +

+

+ + 3: チャプター3 + +

+

+ + 4:チャプター4 + +

+

+ + 5:最終章 + +

+

+ + 6: チャプター5 + +

+

+ + プッシュするチャプタは、""で区切って順番に示されます。 + +

+

+ + 例: + +

+

+ + 135年 + +

+

+ + 第1章、第3章、最終章が順番に押されるということです + +

+

+ + 何も残さないと、デフォルト設定が使用されます + +

+

+ + 代表ユニフォーム:1、2、3 + +

+

+ + 国際: 1, 2, 3, 4, 5, 4 + +

+

+ + 毎日: 1, 2, 3, 4, 5, 4, 6 + +

+
+
 
+
+ + diff --git "a/src/descriptions/ja_JP/\346\247\213\346\210\220\343\201\256\343\202\271\343\202\261\343\202\270\343\203\245\343\203\274\343\203\253\350\250\255\345\256\232\343\201\256\343\203\230\343\203\253\343\203\227.html" "b/src/descriptions/ja_JP/\346\247\213\346\210\220\343\201\256\343\202\271\343\202\261\343\202\270\343\203\245\343\203\274\343\203\253\350\250\255\345\256\232\343\201\256\343\203\230\343\203\253\343\203\227.html" new file mode 100644 index 000000000..6322c0ea8 --- /dev/null +++ "b/src/descriptions/ja_JP/\346\247\213\346\210\220\343\201\256\343\202\271\343\202\261\343\202\270\343\203\245\343\203\274\343\203\253\350\250\255\345\256\232\343\201\256\343\203\230\343\203\253\343\203\227.html" @@ -0,0 +1,77 @@ + + + + + +

+ + + スケジュール設定の入力に関するヘルプ: + + +

+

+ 1.優先度:キューに2つ以上のタスクがある場合、優先度の低いタスクが優先されます +

+

+ 2.実行間隔:整数0は1日の間隔を意味します。 +

+

+ 3.デイリーリセット: +

+

+ 対応するタスクをこれらの時刻に実行します (複数のタイムスタンプをコンマで区切ることができます)。 +

+

+ [[Ha, Mark, S]]の形式に入力します。 + + + (UTC時間) + + +

+

+ + + 例 + + :[ [ 0 , 0 , 0 ] , [ 20 , 0 , 0 ] ] + +

+

+ + 表示:北京時間(UTC + 8)8時、4時の固定実行 + +

+

+ 4.無効期間: +

+

+ 無効になっているすべての期間にタスクを実行しない (複数の期間をカンマで区切って指定できます) +

+

+ [ [ [ h1, m1, s1 ] , [ h2 , m2 , s1 ] ] の形式 に入力します。 + + + (UTC時間) + + +

+

+ + + 例 + + :[ [ 0 , 0 , 0 ] , [ 24, 0 , 0 ] ] + +

+

+ + 一日中やらないということ + +

+

+ 5. プレタスク、ポストタスク:プレタスクのすべてのタスクをタスクの前(後)に実行します +

+ + diff --git "a/src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\343\203\200\343\202\244\343\202\242\343\202\260\343\203\251\343\203\240\343\202\271\343\202\244\343\203\274\343\203\227\343\202\222\345\237\213\343\202\201\343\202\213\346\211\213\351\240\206.html" "b/src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\343\203\200\343\202\244\343\202\242\343\202\260\343\203\251\343\203\240\343\202\271\343\202\244\343\203\274\343\203\227\343\202\222\345\237\213\343\202\201\343\202\213\346\211\213\351\240\206.html" new file mode 100644 index 000000000..ad8341585 --- /dev/null +++ "b/src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\343\203\200\343\202\244\343\202\242\343\202\260\343\203\251\343\203\240\343\202\271\343\202\244\343\203\274\343\203\227\343\202\222\345\237\213\343\202\201\343\202\213\346\211\213\351\240\206.html" @@ -0,0 +1,69 @@ + + + + + +

+ 各スイープ構成は、「Regin」-「Tasknon」-「Whiptims」のような形をしています。 +

+

+ 示す + + 地域 + + 'Regian' & Embuspu; + + レベル + + 'Tasker-Nongber' & Embusp; + + スイープの数 + + 'Swiptims' & Embuspu; +

+

+ 各構成は ',' で区切られます +

+

+ 1. + + + スイープレベルが利用可能です + + + : +

+

+ チュートリアル - 1 すべてのマップの後に 5 つのマップがある +

+

+ 2. + + + 特別な指示 + + +

+

+ 国際的、日本の「スニプティム」は「マックス」になることができます +

+

+ チュートリアルでは、文字列 'Tutoriar' を修正するために 'Regian' が必要です +

+

+ BAASは、現在のスタミナとレベルスタミナに基づいて現在のレベルをスイープできるかどうかを計算し、不足しているレベルや「最大」の数でスイープされたレベルは直接終了します +

+

+ 例: +

+

+ 国際線サービスで十分な場合 +

+

+ チュートリアル-1-20,15-3-3,20-3-MAX +

+

+ 最初にチュートリアル-1を20回クリーンアップし、次に15-3、3回スイープしてから、すべてのスタミナを20-3スイープすることを示します +

+ + diff --git "a/src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\345\233\263\343\201\256\350\252\254\346\230\216\343\201\257\350\207\252\345\213\225\347\232\204\343\201\253\343\203\227\343\203\203\343\202\267\343\203\245\343\201\225\343\202\214\343\201\276\343\201\231.html" "b/src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\345\233\263\343\201\256\350\252\254\346\230\216\343\201\257\350\207\252\345\213\225\347\232\204\343\201\253\343\203\227\343\203\203\343\202\267\343\203\245\343\201\225\343\202\214\343\201\276\343\201\231.html" new file mode 100644 index 000000000..1f8eddcd5 --- /dev/null +++ "b/src/descriptions/ja_JP/\351\200\232\345\270\270\343\201\256\345\233\263\343\201\256\350\252\254\346\230\216\343\201\257\350\207\252\345\213\225\347\232\204\343\201\253\343\203\227\343\203\203\343\202\267\343\203\245\343\201\225\343\202\214\343\201\276\343\201\231.html" @@ -0,0 +1,197 @@ + + +

+

+

+ 通常の図の自動プッシュの説明: +

+

+ 1.使用説明書: +

+

+ (1):必須 + + + アンロック + + + 自動的にラウンドを終了し、 + + + オートバトル + + + (自動検出してオン) +

+

+ (2):対応レベルのメインストーリーは正常 + + + 4 - 25 + + +

+

+ (3):BAASがマップを押すと、チームはクリック座標とルートを移動し、ブルーファイルゲームに複数のチームがある場合、ゲーム内のチームの数、サイズ座標、移動順序によって異なるため、すべての動きは1回しかクリックされません。 +

+

+ (4):(3)により、画像が自動的にプッシュされた場合 + + + 選択したチームの数が最小から最大であることを確認する必要があります + + 。 + + + +

+

+ + + (5):BAASはに従って選択します + + + 通常の画像プッシュ画像設定<> + + + + + 選択したチーム属性 + + + + そして + + + <チーム選択ロジック> + + + マップをプッシュするための適切な構成を見つける + +

+

+ + (6):プッシュ + + + 拍車 + + + レベルは保証される必要があります< + + + + 指定されたすべてのレベルを適用 + + + + >オプション + + + シャットダウン + + + +

+

+ 最初の属性は [1] で、2 番目の属性は [2] であることに注意してください。 +

+

+ チーム選択ロジック: +

+

+ 1 優先保証[1] 拘束関係に基づいて残りのチーム番号を選択し、残りの対応するチーム属性の拘束関係を徐々に減らします。 +

+

+ 2 チームを選択する場合 (4 - チーム番号) > = 必要な残りのチーム数。 +

+

+ 3 1と2が保証できない場合は、対応するチームの拘束関係を徐々に減らす[1] +

+

+ 4 一部のチームが選択され、4 - これらのチームの最大数 >= 残りの必須チーム数の場合、残りのチームはオプションの番号の順に入力されます。 +

+

+ 5 上記の条件のいずれも満たされない場合、1、2、3... 選択したチームに番号を付ける +

+

+ + 例: + +

+

+ 「23フィギュア[バースト、スルー]」のチームを選択する際の順番を試してみてください。 +

+

+ 最初のチームから抜け出す、最初のチームを通して->最初のチームから抜け出す、2番目のチームを通して->最初のチームから抜け出す、2番目のチームを抜ける->... +

+

+ ファーストチーム番号が3で、上記の順番で選ばれなかった場合は、4がセカンドチームとして選ばれる +

+

+ まだ選ばれていない場合は、1 2が最終チームとして選ばれます +

+

+ + + 通常のマッププッシュのレベルを埋めるための手順: + + +

+

+ + 1. もし + + + 特定のレベルごとに強制プレイが有効になっていません + + + 記入する各数字は押すエリアを示し、現在のレベルがSSSであるかどうかに応じて、エリア内の各レベルをプレイするかどうかをプログラムが判断します + +

+

+ + 例: + +

+

+ + 15,16,14 + +

+

+ + 15、16、14を順番に押すということです。 + +

+

+ + 2. + + + もし + + + 特定の各レベルを強制的にプレイできます + + + で、領域内のすべてのレベルを一度プッシュする数値を入力し、指定したレベルを示す数値 - 数値を入力します + +

+

+ + 例: + +

+

+ + 15,16-3 + +

+

+ + これは、15-1、15-2、15-3、15-4、15-5、16-3を順番にプレイすることを意味します + +

+ + \ No newline at end of file diff --git "a/src/descriptions/ja_JP/\351\233\243\346\230\223\345\272\246\345\233\263\346\247\213\346\210\220\343\201\256\350\252\254\346\230\216.html" "b/src/descriptions/ja_JP/\351\233\243\346\230\223\345\272\246\345\233\263\346\247\213\346\210\220\343\201\256\350\252\254\346\230\216.html" new file mode 100644 index 000000000..d79f3ff8a --- /dev/null +++ "b/src/descriptions/ja_JP/\351\233\243\346\230\223\345\272\246\345\233\263\346\247\213\346\210\220\343\201\256\350\252\254\346\230\216.html" @@ -0,0 +1,10 @@ + + + + + +
+
難易度マップの使用方法は、チーム選択ロジックやノーマルマップと同じで、一部の難易度マップには3つのチームが必要であり、3番目のチームの属性は、そのエリアに必要な属性の最初の属性と同じです

プッシュマップレベルに入力する手順:

プッシュマップレベルに入力される文字列は、これらの文字または単語 "-"、"s"、"precent"、"tasker"、"、"、および数字を超えてはなりません
コンマで分割し、複数の文字列に変換
1.文字列にキーワード「sss」、「present」、「task」がありません
例: 15、12-2
難易度マップに合わせて、マップ設定の3つのスイッチ(15-1、15-2、15-3、12-2)を押して、SSS/プレゼントをもらう/チャレンジタスクをクリアする

2. 数字の後に文字列が続き、"-"で区切られます。
例:15-sss-present
SSSに(15-1、15-2、15-3)ヒットしてプレゼントをもらう

3. 2つの数字(対応するレベルに割り当てられています)
例: 15-3-sss-task
SSSに15-3ヒットし、チャレンジを完了します

4. 事例紹介
スイッチがすべてオンになっているので、7,8-SSS、9-3-taskと入力します。
これは、(7-1、7-2、7-3)がSSSに当たり、ギフトをもらってチャレンジタスクを完了し、(8-1、8-2、8-3)がSSSにヒットし、9-3がチャレンジタスクを完了することを意味します
注:Baasは、レベルがsssにヒットしたかどうか、ギフトを受け取ったかどうかを自動的に判断し、sssがヒットしたかギフトを受け取った場合、レベルはスキップされます。
+
+ + From 339548df6bb2edb2576a574e563b870b743127dc Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:28:27 +0100 Subject: [PATCH 24/30] fix: notification when switching language --- gui/fragments/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index 624f7ece0..95d5b8653 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -141,7 +141,7 @@ def __showRestartTooltip(self): notification.success( 'Language updated successfully', 'It will take effect after restart', - info_widget=self, + self.config ) def __connectSignalToSlot(self): From 5cab453323d3f7b22573ca917cde9cc62ba140b6 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Tue, 16 Jul 2024 00:51:26 +0100 Subject: [PATCH 25/30] fix: translation for emulatorConfig --- auto_translate.py | 5 ++-- gui/i18n/en_US.qm | Bin 29297 -> 29522 bytes gui/i18n/en_US.ts | 58 +++++++++++++++++++++++----------------------- gui/i18n/ja_JP.qm | Bin 24360 -> 24537 bytes gui/i18n/ja_JP.ts | 14 +++++------ 5 files changed, 39 insertions(+), 38 deletions(-) diff --git a/auto_translate.py b/auto_translate.py index 12b6ad4d7..c3ba79847 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -147,8 +147,9 @@ def handle(self, request): descriptions = HtmlHandler() # request_en = Request([gui, descriptions], Language.ENGLISH, 'bing', 'zh-Hans', 'en') - # # request_en.process() + request_en = Request([gui], Language.ENGLISH, 'bing', 'zh-Hans', 'en') + request_en.process() - request_jp = Request([descriptions], Language.JAPANESE, 'bing', 'zh-Hans', 'ja') + request_jp = Request([gui], Language.JAPANESE, 'bing', 'zh-Hans', 'ja') request_jp.process() diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index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&}iyhK=4(K)LaeB=+#U&Gl-*mv-y@LK^Ce>8C zVAx8j8?Ot#*%P=^@SopGG5az?U}qCB>pdYjlN?YE3BiS=Am_9YfqFnwFC?1i!J;xD z@n z3d19G-2Q@aPvcAc|E-eU;f>Utg#cp!SqqtuhpqVM)bvTKGI zI6)TS+K?mfA%pY3s{q z|67vItCVKgLrKn~nYFN03e+9|o?a(~Zu>Lf^Mw@8Hj%&*$=;Ss&W=kf$0C5B2h!io z4q_DZrd0nws;nnMrFX+u0r@{kJ+Dy|$>${Z*C%KQ9+rk2m*~JtGH(h2m^N7`wUd%Q zSr_95bltLdPd`mLy&PPaLlLf#pGcv;HGL#Md9jfCv|Kh1eMX(|jvU!bQRW28v!)Z_ z@>n@Fv6CKNzFtmSUrCu2%T=$Ewb@N_NAJso1@hMi&r*x5lCK{oB`HhgzGT{O`c1ys zLnRh<(5Yw)j+|HIVK+q@R_Vdibb0uPAE}i)<r#{pdrO(l$!1uLpihGkfVN@viNQ0MwEqqDSF>)cbW6NldVV6fqx!Gn7SPj2i= z2|F1o&BX##PV7ZFR{y?#yu#1$ho3fX9@^6G**Mg;e`rhd;O;i(i0wp|CL`1Qe|GXJ ANdN!< diff --git a/gui/i18n/en_US.ts b/gui/i18n/en_US.ts index 2822a518f..38cfd932e 100644 --- a/gui/i18n/en_US.ts +++ b/gui/i18n/en_US.ts @@ -409,8 +409,8 @@
- 模拟器是否多开 - Enable multi-instance for the emulator + 是否启用内建的自动扫描模拟器功能(开启后将自动识别系统内已安装的模拟器) + Enable auto emulator scanning function (will automatically detect installed emulators on the system when enabled)
@@ -563,7 +563,7 @@ Start Script - + 正在运行: Running: @@ -849,111 +849,111 @@ For JP or Global server, you can use 'max'. 选择 Select - - - 选择多开模拟器 - Select multi-instance emulator - 多开号 Port + + + 选择模拟器类型 + Select the emulator type + MainThread - + 停止 Stop - + 启动 Start - + 困难图推图已完成 Clear Hard Mission completed - + 普通图推图已完成 Clear Normal Mission completed - + 反和谐成功,请重启BA下载资源 Anti-harmony success, please restart BA download resources - + 主线剧情已完成 Main Story Completed - + 小组剧情已完成 Group Story Completed - + 支线剧情已完成 Mini story completed - + 活动剧情已完成 Event Story Completed - + 活动任务已完成 Event Quest Completed - + 活动挑战推图已完成 Event Challenge Completed - + 无任务 No task - + 普通关推图 Clear Normal Mission - + 自动主线剧情 Main Story - + 自动小组剧情 Group Story - + 自动支线剧情 Mini Story - + 自动活动剧情 Clear Event Story - + 自动活动任务 Clear Event Quest - + 自动活动挑战 Clear Event Challenge @@ -1386,12 +1386,12 @@ For JP or Global server, you can use 'max'. ConfigTranslation - + MainThread MainThread - + MainThread 停止 MainThread diff --git a/gui/i18n/ja_JP.qm b/gui/i18n/ja_JP.qm index 1f8cfa1237fe4c55599fd4abbec20f34ef5d47b7..52de875205dd4d8e04b01543ac59e6dd86a07747 100644 GIT binary patch delta 2351 zcmY*aX;4&G7Cx{0b@%J-J&+xQ27|J=JwOnUT@YjuL6E35XiQup5mB6&7|V7;S%RXN zN{l0mXhbYU1&cvMDNxHLQBhJ3N!ftffD(lPqcfs7ANEu#`O)?D?R)RJ=li~MPFG%J z+AlFhuKGJ9KU+%V*+hz&ehBI!61O1~tUP)GK`BSf*i6qLP|C~PA&xmFQP zR@1e+SwsP~bieF5(X1oXVINC0u8E=bl|&QIGE5`lI<05ex1;z^#%xb0QA{K=Ju;0b z)QO2|@F&u9DNOYKdqjTr%v#q$qWK-n-TpWt*(2ue>n0*HGVRX)A~FkOx|WD|FpYUs zS3~5S$~w5n!3xSo<;5toskyw1G;LaBw)o0`=`K{e8wKPic9Z%Q9ds)w3k(uWr# z;nG%VU+5(wuR#;0*s)G;uR)x0*7c_XkX*=mXCDRWX4dbJ3sf#(gP)Bj3c1dP9UdT> z-pR&{LE`hiU}Fk>iL5i&M4zLd5X}fP6Zv$@oX)^j%}&|)L+#j?%X}>uB=Wep zQR1YJjF&w~1urpGX3&)rCArCZlJ*l>rOSrTWrLTM+}3dxk(LK`0*}Z&7*7aXEB6eC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#H^P1l5C+-yxX>J24YuQdke9OgSjc3P-_~2+3?c zgv7-*Y2KUgnv1KnWId=&F-wg-?*Mt}>Yh^=nop!JkD`-V$S9Nncy;Kx?}LQzoP#J2Vb(c3>rH3z7!$X{89gBq41zFN} z^?yJjy)?cJ45a7Ds+2r*^3Z|i7FlIBKy#DK*8Ub9O~~AC3_;;hnd|xpn)b`;^(ZLf z4OxAm5kuE1Ys)Msz~;cXD48!uJk5Rwn%Bur+psNkT~^uUBB;V#{fN(1%U+S7GXJ>j zW&I`A-he#$@)~G;+kr}?15?*IurNmU?N|#2&2oGITwm-X$FHk}bdTkP4n)ljloPJt zyr@~8-G|OIUF5V16dJQb&TlKje)H{;-)^3cy>eY{2`fipqx^I`{#o=>mSGE?wH;pM z*Ypnmfk#thfH#wEQjRM(lmX?g@`G{`Pp(p_Y*ZTYt4A4CmMCUrlaiw>Q___j{#jER zJZ^&xb%UE~26i+I{`K&{wtWM8J{o9!+m<@TvneOg?rof^*p(sWpFc%u_&I}ZbK+## S@%>LhY+i|nn%t632mBvDja4H6 diff --git a/gui/i18n/ja_JP.ts b/gui/i18n/ja_JP.ts index 599fe7753..6b17744b4 100644 --- a/gui/i18n/ja_JP.ts +++ b/gui/i18n/ja_JP.ts @@ -408,8 +408,8 @@ - 模拟器是否多开 - シミュレーターがよりオープンであるかどうか + 是否启用内建的自动扫描模拟器功能(开启后将自动识别系统内已安装的模拟器) + 内蔵の自動スキャンシミュレータ機能を有効にするかどうか(有効にすると、インストールされているシミュレータがシステム内で自動的に認識されます) @@ -664,11 +664,6 @@ 选择 選ぶ - - - 选择多开模拟器 - マルチオープンエミュレータを選択します - 多开号 @@ -854,6 +849,11 @@ 最高难度 最高難易度 + + + 选择模拟器类型 + シミュレーターの種類を選択する + MainThread From fb6121827b1c8b1ef65bc026d3b083fee1d281f0 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Tue, 16 Jul 2024 01:14:04 +0100 Subject: [PATCH 26/30] refactor: auto_translate.py --- auto_translate.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/auto_translate.py b/auto_translate.py index c3ba79847..dc759ea76 100644 --- a/auto_translate.py +++ b/auto_translate.py @@ -1,4 +1,5 @@ import os +import subprocess import translators as ts from bs4 import BeautifulSoup @@ -59,6 +60,13 @@ def process(self): self.handlers[0].handle(self) +class Pylupdate5Handler(Handler): + def handle(self, request): + result = subprocess.run(['pylupdate5', 'i18n.pro'], capture_output=True, text=True) + print(result.stdout) + self.set_next(request) + + class XmlHandler(Handler): """Translate ts files""" def handle(self, request): @@ -140,14 +148,26 @@ def handle(self, request): output_name = f'{request.translate_text(name)}.html' with open(os.path.join(output_dir, output_name), 'w') as f: f.write(prettyHTML) - + + +class LreleaseHandler(Handler): + def handle(self, request): + directory = os.path.join(os.getcwd(), 'gui', 'i18n') + result = subprocess.run(['lrelease', f'{request.strLang}.ts'], cwd=directory, capture_output=True, text=True) + print(result.stdout) + self.set_next(request) + if __name__ == "__main__": + pylupdate = Pylupdate5Handler() gui = XmlHandler() descriptions = HtmlHandler() + lrelease = LreleaseHandler() + + # request_en = Request([pylupdate, gui, descriptions, lrelease], Language.ENGLISH, 'bing', 'zh-Hans', 'en') + # request_en.process() - # request_en = Request([gui, descriptions], Language.ENGLISH, 'bing', 'zh-Hans', 'en') - request_en = Request([gui], Language.ENGLISH, 'bing', 'zh-Hans', 'en') + request_en = Request([pylupdate, gui, lrelease], Language.ENGLISH, 'bing', 'zh-Hans', 'en') request_en.process() request_jp = Request([gui], Language.JAPANESE, 'bing', 'zh-Hans', 'ja') From 12d922e23e4838753d45cdb936d963b0fbc07228 Mon Sep 17 00:00:00 2001 From: Kiramei <1710623513@qq.com> Date: Tue, 16 Jul 2024 17:33:49 +0800 Subject: [PATCH 27/30] Fix: Improve the expression of en_US --- gui/i18n/en_US.qm | Bin 29522 -> 29992 bytes gui/i18n/en_US.ts | 76 +++++++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/gui/i18n/en_US.qm b/gui/i18n/en_US.qm index 297f49732bdb9a25ef4bb9f7f8e300dd66f3426f..3260ad423cdd61a43c2bf29b9c5ad16d86e71a15 100644 GIT binary patch delta 3465 zcma)9X;f6_8Gi5FS?+B2f+&K>D#(C!gONdyNMMMPIW{_jrIH^fnwZSDf zsi$c)xWy&a){dN16OAp#m{=Fo9yK|ls8uUbsflS4Q|xX9( zX{x!u-Gv)_DR;lqgD7@8_vNX3MCpq){AY)Wa)xO1tBZ)N0~&+pdeA771Gz-kIZbTA zpNM?QH8YN0B1%4@sfeo~DqW^&%mLWwZ#CQ3e?l}iT+_8*B&t}W=`AWi)OgKhPuQ>< zn!Y0-KP#K(3Vx5MU+})YSs-cTN6RyaB5izj+-joA>3sHCpp35KSM2L0s(PK@ywXmT zoA4pO%k3npzrcSGi@=lnRl8^!f84Sd2j1q7pD+^nNAOpp_CvJ>{_3GjWMdQGpZY!k zN2+#VsvM~CcI7P7PS_9(@m|y>-w7kileJSe4-jR=Xmf@DXYE>TPDcWfZ;!TM+%}?V zChgJPP%F1k``4dMBbwK$J%8}mMAJ*O_l9C$=hhBP0<5Uj+6U=7iA>MyJUp--c3tOj z3Th^OrSl%~4N>YjTvcE)k zbR5z!GeCE#6#VR8>v{t>5!FQNZWg_YglyG4>~cU4v);#lDv?wUdxgkD&_{5QL~+mR zBh#Qyex^SAbTd(AhQ6u)hzr$`qrcRQOwEba_ihO%8oowBwBRKaJH`#z?%)XcDoR0#yf)E4GBxi1k+DUkfum5zc(EPx>NA(K*@wu2*dN3 z9U=Hm-9qGjP4L^Z5mHtO{?nm=v|I3>2?9lJLIkZMGOQ9(LJ_dsM@acc7LnL2q~#%% zb501=f!jbRT3EE~4EF1U7CBBkw0P73;p6LmL_>0gi{m~(<#!8x?H5p!uL%8j;2?dl+ddd-KT{B;I?>*_lUx`S%$x|4uZv6{1||; z*DQYBXf>P8;{Qn`QOYrk?S2Ycs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#0mdkC!7IAiakpUOYTaO;s~_XU&`9edXBkLw)4q4dNo@ry}SYl3YO-t zrnDtaY3JEhjET~j*N<>Wu1jCZ@BYSS(sbKzC_B=Dhf01OT>~oTmaXyFR0+$>RPf6#s%K^@Z$-GJq z?tX$^&vM69e|IdsRoZ73dXUS>( zWL|kv&S@oJdy8Cpu#wXq`WN}>eKGvo&6M}YHUZV`^1Y37=w*n5hu(SDBC*>?cuPqS zE>|`LUr3*V3RI&JwOE412sl;A9mb=Eu^O%Xs4FYbh6e6i#P59G#VI>N(u<2= z=W5G;WohEQgKtzbuK4xcR=(|E#%jJFKD=AKZ^lyos#kTa66f*@U9S^zmA6JmDrFA` z8nd{O0F(~?>t9rSB8rs-5jLeW;%DKs(ixeqT#1ZO{Kn2wZbpn&){S*Wk@_wLkFdE7_n`aE``Ua%-3328pw6mu!*Ho8e872z&Nf>sy33}wXTP<7;Q+pxoq zVQ%wzuQF;RO6sm0Ngg?7`S6|wK2iH-`EdNL9!pTK$dg98&P@7VE5s@9r>+|nj(h@d z87A$vuW6WunnZ1?CS_$>v{57s)yl(Z6~tP=qHeot2%rgVO3IYi&4Cn5HLVtPu7N4} zg1&^^+M)~=`dQUJbR(j=%8ZOiWo1UH(wOcqv?%Xpj8XbCUI+@tH11J5N1YAT54Dd} zV6CnfGS3KtO<8CUlFRO+D^}6DcG%bIgid8*?p6(3x;J;BhQu-pE(?LKq{7>_{{Yxf B=~Dmz diff --git a/gui/i18n/en_US.ts b/gui/i18n/en_US.ts index 38cfd932e..e9b57dd47 100644 --- a/gui/i18n/en_US.ts +++ b/gui/i18n/en_US.ts @@ -129,7 +129,8 @@ 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 - Control whether each task is turned on, make sure to do it before starting the script. + Control whether each task is turned on, +make sure to do it before starting the script. @@ -244,12 +245,12 @@ 随机初级神秘古物 - A random primary mystical antiquities. + Random Beginner Material 随机中级神秘古物 - Random middle-class mythology. + Random Intermediate Material @@ -334,7 +335,7 @@ 日常小游戏 - Daily Game Activity + Daily Game Activity @@ -395,22 +396,26 @@ 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) - Open the emulator when running Baas + <b>Open the emulator on running Baas</b> <br/>(The switch for start emulator. Emulator won't be started if closed) 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) - Seconds to wait for the emulator to start + <b>The time waiting for emulator startup</b> <br/> +(The time(metered in seconds) from the start<br/> + to the desktop loaded status, regularly set unchanged) 是否模拟器多开(打开后无视已经启动的模拟器进程,将再启动一个模拟器)) - Enable emulator multi-instance (ignore existing emulator processes and start a new emulator when enabled) + <b>Enable emulator multi-instance?</b> (ignore existing <br/> +emulator processes and start a new emulator if enabled) 是否启用内建的自动扫描模拟器功能(开启后将自动识别系统内已安装的模拟器) - Enable auto emulator scanning function (will automatically detect installed emulators on the system when enabled) + <b>Enable auto emulator scanning function?</b> (will automatically <br/> +detect installed emulators on the system when enabled) @@ -436,17 +441,20 @@ 是否手动boss战(进入关卡后暂停等待手操) - Manual boss battle (pause and wait for manual control after entering the level) + Manual boss battle? (Pause and Wait for + manual control after entering the battle) 是否不强制打到sss(启用后跳过已通过但未sss的关卡) - Skip achieving SSS rank (skip levels that have been completed but not reached SSS after enabling) + Skip getting SSS rank (If enabled, The script +will skip completed but unSSSed levels) 开启后强制打每一个指定的关卡(不管是否sss) - Force play each specified level after enabling (regardless of SSS rank) + Force play each specified level if + enabled (regardless of SSSed rank) @@ -555,7 +563,7 @@ 档案,启动 - Launch + BlueArchive, Launch @@ -565,7 +573,7 @@ 正在运行: - Running: + Running: @@ -574,7 +582,7 @@ 输入你需要对手比你低几级,高几级则填负数: Enter how many ranks below or above you need the opponent to be. -Use positive number for below and negative for above. +Use positive number for below and negative for above: @@ -639,13 +647,13 @@ Use positive number for below and negative for above. 推图选项 - Slide Options + Map-clear Options 请在下面填写要推的图,填写方式见-普通图自动推图说明- - Please enter the stages to be cleared. -See Clear Hard and Normal Stages in Help. + Please enter the stages to be cleared. +See Clear Hard and Normal Stages in Help @@ -665,7 +673,7 @@ See Clear Hard and Normal Stages in Help. 排序方式: - Sort by: + Sort by: @@ -707,7 +715,7 @@ See Clear Hard and Normal Stages in Help. 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: Set hard stages as above, with a maximum of 3 sweeps. Use commas for separation. -For JP or Global server, you can use 'max'. +For JP or Global server, you can use 'max': @@ -722,7 +730,7 @@ For JP or Global server, you can use 'max'. 优先做好感等级多的日程 - Prioritize lessons with higher affection levels + Prioritize lessons with higher affection levels @@ -792,72 +800,72 @@ For JP or Global server, you can use 'max'. 普通关推图 - Normal Level Push Map + Normal Level Mainline Map Clear 更多配置 - More Configuration + More Configuration 困难关推图 - Hard to push map + Hard Mainline Map Clear 设置失败 - Setup failed + Setup failed 截图间隔 - Intercept + Screenshot Interval 详细配置 - Detailed Configuration + Detailed Configuration 是否领取奖励: - Claim rewards: + Claim rewards? : 优先邀请券好感等级低的学生: - Priority is given to students with low levels of affection: + Is Priority given to low-affection-level students? : 是否允许学生更换服饰: - Are students allowed to change clothes: + Allow students to change clothes? : 是否允许重复邀请: - Whether to repeat invitations: + Repeat invitations? : 选择模拟器地址 - Emulator Path + Choose Emulator Path 选择 - Select + Select 多开号 - Port + Multi-account 选择模拟器类型 - Select the emulator type + Select the emulator type From 5be1fe33e45673747d6a3536e27533476354463e Mon Sep 17 00:00:00 2001 From: Kiramei <1710623513@qq.com> Date: Wed, 17 Jul 2024 13:57:39 +0800 Subject: [PATCH 28/30] Feat: Support Japanese Display --- gui/i18n/ja_JP.qm | Bin 24537 -> 24127 bytes gui/i18n/ja_JP.ts | 535 +++++++++++++++++++++++----------------------- 2 files changed, 268 insertions(+), 267 deletions(-) diff --git a/gui/i18n/ja_JP.qm b/gui/i18n/ja_JP.qm index 52de875205dd4d8e04b01543ac59e6dd86a07747..c7d8673f24e5cd11a24ce6af35470f087772e2fa 100644 GIT binary patch delta 6416 zcmaJ_30ze5_W#}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z79U!r|}JF+Ci9p^A=-@ zijEm5qw`UOC9FDTUnf~5#QKj7FV@3BX5{GIj4DL)+ifI&eR;Dptr_$U?< zuhKTrpW*vaD!g44ALSR)Sws9x`T(%|vQx7_b%NCo}11G$8_4R znXO2mjt;h!-Ozjtx@N>Ca-J%AxKBuoaton9;>1<-fJ2zh+5|FMP*xSmjwTlM3TgksdYQh`&VT`Q1&1-M znQgp2C@I;`_bNzi3(S^az*pGQL1O%b|0Fp^?u5CW zKQ&sK7QH+HSqPyZVe8x*OOFq{xo9g@SS<3^b&=z)D%xm$16-XicKKlT zOU?W1M_^s5Z`ZG$hQq1OVmTGk!CK5FI|PxvFlVE)fXOXCQ0r(87Qe~zhb?yZYHyZ8 z|LT|yZS}xJmN?0r)eGmcBujv+%kui#9y}8ZGeqrpq0z9nEqxtb;G|G)FNej$meBaP zE~VeO0@p+x<dsD&bhE>R!S0TX?aA9^>-}JO+ek$s z@v9MUF;jHBV{3A|v9Y;c&Rv=DX?x3k%Ib1cq?##J6Yj7Zx%e&>QfR{*-&#vY6}$q- z6Qlh9Lw_?e&pam-ocNq$Q($rILv; zwd2^T(cY4=+yqy)Z?qSqqjfA%>A>C^qrvApMpo8iOoZ?wZ_IKGTSpKyJ{?EtT?F7Z K!uH#k)c*r1v0{h- diff --git a/gui/i18n/ja_JP.ts b/gui/i18n/ja_JP.ts index 6b17744b4..b19f9d9ff 100644 --- a/gui/i18n/ja_JP.ts +++ b/gui/i18n/ja_JP.ts @@ -1,3 +1,4 @@ + @@ -5,7 +6,7 @@ 帮助 - ヘルプ + ヘルプ @@ -13,332 +14,332 @@ 每日特别委托 - 毎日の特別注文 + 毎日の特別依頼 悬赏通缉 - 賞金獲得手配 + 指名手配 竞技场 - アリーナ + 戦術対抗戦 收集每日体力 - デイリースタミナを集める + 毎日のAPを集める 收集小组体力 - グループでスタミナを集める + グループAPを集める 商店购买 - 店舗での購入 + しょっぷで買い物 日程 - 計画 + スケジュール 主线清除体力 - 本編はスタミナクリア + 本編ステージでAPをクリア 自动MomoTalk - 自動MomoTalk + 自動MomoTalk 咖啡厅 - カフェ + カフェ 查收邮箱 - メールボックスを確認する + 自動メール確認 自动制造 - 自動製造 + 自動製造 收集奖励 - 報酬を集める + 報酬を集める 普通关清体力 - 普通関清スタミナ + 普通ステージでAPをクリア 困难关清体力 - 体力クリアが難しい + ハードステージでAPをクリア 总力战 - 総合力戦 + 総力戦 学院交流会 - 教員交流会 + 学園交流会 凌晨四点重启 - 朝4時に再開 + 朝4時に再開 活动扫荡 - イベントスイープ + イベントスイープ 暂无任务 - タスクはまだありません + タスクなし 日常小游戏 - 毎日のミニゲーム + 毎日のゲーム 咖啡厅邀请 - カフェ招待 + カフェ招待 新的配置 - 新しい構成 + 新しい設定 功能开关 - 機能スイッチ + 機能スイッチ 竞技场商店购买 - アリーナショップ購入 + 戦術対抗戦ショップ購入 扫荡及购买券设置 - バウチャーの一括購入設定 + スイープ・クーポン購入設定 重要,此处为功能开关,控制各功能是否开启,启动前请检查是否开启。 - 重要、ここに各機能がオンになっているかどうかを制御する機能スイッチがありますので、開始する前に有効になっているかどうかを確認してください。 + 重要、ここに各機能がオンになっているかどうかを制御する機能スイッ<bt/>チがありますので、開始する前に有効になっているかどうかを確認してください。 帮助你收集咖啡厅体力和信用点 - カフェのスタミナとクレジットを集めるのに役立ちます + カフェのAPとクレジットを集める 自动每日日程 - 自動日次スケジュール + 自動毎日スケジュール 商店里买东西 - お店で物を買う + ショッピング 竞技场商店里买东西 - アリーナショップで物を買う + 戦術対抗戦ショップで物を買う 主线关卡自动清除体力与每日困难 - メインレベルはスタミナと毎日の難易度を自動的にクリアします + 本編ステージでAPをクリアと毎日ハードステージクリア 帮助你自动打竞技场 - アリーナを自動的にプレイするのに役立ちます + アリーナをクリア 帮助你自动制造 - 製造の自動化を支援 + 自動製造 总力战期间自动打总力战 - 総力戦中に自動的に総力戦を戦う + 総力戦中に自動的に総力戦を戦う 各种扫荡及购买券次数设置 - 各種クリーニング・クーポン購入時間設定 + 各種スイープ・クーポン購入時間設定 初级经验书 - 初心者体験ブック + 初級レポート 中级经验书 - 中級体験書 + 中級レポート 高级经验书 - アドバンストエクスペリエンスブック + 高級レポート 特级经验书 - 特別体験ブック + 特級レポート 初级经验珠 - 初心者体験ビーズ + 初級強化珠 中级经验珠 - 中級XPビーズ + 中級強化珠 高级经验珠 - アドバンストエクスペリエンスビーズ + 高級強化珠 特级经验珠 - プレミアム EXP ビーズ + 特級強化珠 随机初级神秘古物 - ランダムの主要な神秘的なアーティファクト + ランダム初級神秘古物 随机中级神秘古物 - ランダム中級神秘古代遺物 + ランダム中級神秘古物 静子神明文字x5 - 神明静子 text x5 + 静子 神名文字 x5 真白神明文字x5 - 真白神テキスト×5 + 真白神名文字×5 纱绫神明文字x5 - 神戸沙耶 テキスト x5 + 紗綾 神名文字 x5 风香神明文字x5 - 風香神テキスト x5 + 風香神名文字 x5 歌原神明文字x5 - 歌原上明 テキスト x5 + 歌原 神名文字 x5 初级经验书x5 - 初心者XPブック x5 + 初级レポート x5 中级经验书x10 - 中級XPブック x10 + 中級レポート x10 高级经验书x3 - 上級XPブック x3 + 高級レポート x3 特级经验书x1 - スペシャルEXPブック x1 + 特級レポート x1 信用点x5k - クレジット x5k + クレジット x5k 信用点x75k - クレジットx75k + クレジットx75k 信用点x125k - クレジット x125k + クレジット x125k 官服 - 公式ユニフォーム + 中国代理サーバー B服 - Bスーツ + ビリビリサーバー 国际服 - 国際サーバー + 国際サーバー 日服 - デイウェア + 日本サーバー 拖动礼物 - ギフトをドラッグする + ギフトドラッグ MuMu模拟器 - MuMuエミュレータ + MuMuエミュレータ 蓝叠模拟器 - Blue Stackシミュレータ + Blue Stack「中国」シミュレータ 蓝叠国际版 - ブルースタックインターナショナルエディション + Blue Stack「国際」シミュレータ @@ -346,47 +347,47 @@ 配置详情 - 構成の詳細 + 構成の詳細 优先级 - 優先権 + 優先権 执行间隔 - 実行間隔 + 実行間隔 每日重置 - 毎日のリセット + 毎日のリセット 禁用时间段 - 期間を無効にする + 無効期間 前置任务 - 前提条件のタスク + 前提のタスク 后置任务 - ポストタスク + ポストタスク 确定 - 確かですか + 決定 取消 - キャンセル + キャンセル @@ -394,22 +395,22 @@ 在运行Baas时打开模拟器(启动模拟器的功能开关,关闭后不会启动模拟器) - Baas の実行中にエミュレータの電源を入れます (エミュレータの機能スイッチを起動し、オフにしてもエミュレータは起動しません) + <b>Baas の実行中にエミュレータを起動するのか</b> (エミュレータの機<br/>能スイッチを起動し、オフにしてもエミュレータは起動しません) 是否模拟器多开(打开后无视已经启动的模拟器进程,将再启动一个模拟器)) - エミュレータがマルチオープンかどうか(すでに起動しているエミュレータプロセスを無視して、エミュレータを開いた後、別のエミュレータが起動します)) + <b>エミュレータがマルチオープンかとうか</b>(すでに起動しているエミュレータプロセ<br/>スを無視して、エミュレータを開いた後、別のエミュレータが起動します)) 等待模拟器启动时间(模拟器从开始启动到桌面加载完成的时间(秒),一般默认) - エミュレータの起動時刻を待ちます(エミュレータの起動からデスクトップの読み込みが完了するまでの時間(秒単位、通常はデフォルト)です) + <b>エミュレータの起動を待てる時間</b>(エミュレータの起動からデスクトッ<br/>プの読み込みが完了するまでの時間(秒単位、通常はデフォルト)です) 是否启用内建的自动扫描模拟器功能(开启后将自动识别系统内已安装的模拟器) - 内蔵の自動スキャンシミュレータ機能を有効にするかどうか(有効にすると、インストールされているシミュレータがシステム内で自動的に認識されます) + <b>内蔵の自動スキャンシミュレータ機能を有効にするかどうか</b>(有効にすると、<br/>インストールされているシミュレータがシステム内で自動的に認識されます) @@ -417,17 +418,17 @@ 推故事 - ストーリーをプッシュする + ストーリーをクリアする 推任务 - プッシュタスク + タスクをクリアする 推挑战 - 課題をプッシュする + 挑戦をクリアする @@ -435,57 +436,57 @@ 是否手动boss战(进入关卡后暂停等待手操) - 手動でボスと戦うかどうか(レベルに入ったら一時停止し、手動演習を待ちます) + 手動でボスと戦うかどうか(レベルに入ったら一時停止し、手動演習を待ちます) 是否不强制打到sss(启用后跳过已通过但未sss的关卡) - SSS を強制的にヒットさせないかどうか (有効にした後、SSS は通過したが SSS ではないレベルをスキップ) + SSS を強制的にヒットさせないかどうか (有効にした後、SSS は通過したが SSS ではないレベルをスキップ) 开启后强制打每一个指定的关卡(不管是否sss) - 有効にすると、指定されたすべてのレベルを強制的にプレイします(SSSに関係なく) + 有効にすると、指定されたすべてのレベルを強制的にプレイします(SSSに関係なく) 爆发一队 - チームでブレイクアウト + 第一爆発チーム 爆发二队 - セカンドチームのアウトブレイク + 第二爆発チーム 贯穿一队 - チームを駆け抜ける + 第一貫串チーム 贯穿二队 - セカンドチームを通して + 第二貫串チーム 神秘一队 - ミステリーチーム + 第一神秘チーム 神秘二队 - ミステリーチーム2 + 第二神秘チーム 振动一队 - チームをバイブレーションする + 第一振动チーム 振动二队 - セカンドチームを振動させる + 第二振动チーム @@ -493,17 +494,17 @@ 打到SSS - SSSを打つ + SSSを完成するのか 拿礼物 - ギフトを贈る + ギフトを貰うのか 完成成就任务 - 達成ミッションをクリアする + 達成ミッションをクリアするのか @@ -511,27 +512,27 @@ 内容 - コンテンツ + コンテンツ 贡献者 - 貢献 + 貢献者 提交时间 - 提出時間 + 提出時間 提交信息 - 情報の送信 + 提出メッセージ 更新日志 - 変更履歴 + 変更履歴 @@ -539,32 +540,32 @@ 蔚蓝档案自动脚本 - Teal Archives 自動スクリプト + ブルアカ 自動スクリプト 无任务 - タスクなし + タスクなし 启动 - 始める + 起動 档案,启动 - アーカイブ、起動 + ブルアカ、起動 开始你的档案之旅 - アーカイブの旅を始めましょう + アーカイブの旅を始めましょう 正在运行: - ランニング: + 実行中: @@ -572,287 +573,287 @@ 输入你需要对手比你低几级,高几级则填负数: - 対戦相手が自分より下にいるために必要なレベル数を入力し、数レベル上の場合は負の数を入力します。 + 対戦相手が自分より下にいるために必要なレベル数を入力し、数レベル上の場合は負の数を入力します: 输入你最多需要刷新几次: - 更新する必要がある最大回数を入力します。 + 更新する必要がある最大回数を入力します: 确定 - 確かですか + 確認 设置成功 - セットアップは成功しました + セットアップ成功 刷新次数 - 更新の回数 + 更新の回数 是否领取奖励: - 報酬を受け取るには: + 報酬を受け取るには: 是否使用邀请券: - 招待券を使用するかどうか: + 招待券を使用するのか: 优先邀请券好感等级低的学生: - 評価の低い学生のための優先招待クーポン: + 好意評価の低い学生に優先招待するのか: 是否允许学生更换服饰: - 生徒が服装を変えることができるかどうか: + 生徒が服装を変えることができるのか: 是否有二号咖啡厅: - カフェその2はありますか? + 二号カフェはありますか: 是否允许重复邀请: - 重複する招待を許可するかどうか: + 重複する招待を許可するのか: 列表选择你要添加邀请的学生,修改后请点击确定: - 招待状に追加する生徒を選択し、編集後に [OK] をクリックします。 + 招待状に追加する生徒を選択し、編集後に [確認] をクリックしよう: 添加学生 - 学生を追加する + 追加する生徒 选择摸头方式: - 頭に触れる方法を選択します。 + 頭に触れる方法を選択します: 选择第二咖啡厅邀请的学生 - 生徒を招待する 2 つ目のカフェを選択します + 2号カフェで招待する生徒を選択します 目前制造物品优先级,排在前面的会优先选择 - 現在、製造品目の優先順位は、リストの最初にある人に優先されます + 現在、製造品目の優先順位は、リストの最初にある人に優先されます 是否使用加速券 - アクセラレータクーポンを使用するかどうか + アクセラレータクーポンを使用するのか 选择模拟器地址 - シミュレータのアドレスを選択します + シミュレータのアドレスを選択します 选择 - 選ぶ + 選ぶ 多开号 - マルチオープニングナンバー + マルチアカウント 推图选项 - プッシュマップオプション + クリアオプション 请在下面填写要推的图,填写方式见-普通图自动推图说明- - 以下に押す図形を記入していただき、その記入方法は -普通の図形の自動押しの記述- + 以下に押すステージを記入していただき、その記入方法は普通のステージと同じで説明を見てください 开始推图 - 画像のプッシュを開始する + クリアを開始する 普通关推图 - 通常のグアントゥイ図 + 通常のステージのクリア 全部(不)启用 - すべて(無効)に + すべて有効(無効) 刷新执行时间 - 更新実行時間 + 更新実行時間 排序方式: - 並び替え: + 並び替え: 默认排序 - デフォルトの並べ替え + デフォルトの並べ替え 按下次执行时间排序 - 最終実行時刻で並べ替え + 最終実行時刻で並べ替え 事件 - 出来事 + アクティビティ 下次刷新时间 - 次回の更新時刻 + 次回の更新時刻 启用 - エネーブル + エネーブル 更多配置 - その他の構成 + その他の構成 详细配置 - 詳細な構成 + 詳細な設定 <b>困难图队伍属性和普通图相同(见普通图推图设置),请按照帮助中说明选择推困难图关卡并按对应图设置队伍</b> - <b>難易度マップのチーム属性はノーマルマップと同じです(ノーマルマップの設定を参照)ので、ヘルプの指示に従って難易度マップのレベルを選択し、対応するマップに従ってチームを設定してください</b> + <b>難易度ステージのチーム属性は普通のステージと同じです(普通のステージの設定を参照)ので、<br/>ヘルプの指示に従ってレベルを選択し、対応するステージに従ってチームを設定してください</b> 困难关推图 - グラフが閉じにくい + ハードステージをクリア - 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): - 通常のレベルと時間(例:「1-1-1、1-2-3」は、レベルが1-1で1回プレイされ、その後、レベルが1-2で3回プレイされることを意味します): + 普通关卡与次数(如"1-1-1,1-2-3"表示关卡1-1打一次,然后关卡1-2打三次): + 普通のステージ名時間(例:「1-1-1、1-2-3」は、レベルが1-1で1回プレイされ、その後、レベルが1-2で3回プレイされることを意味します): 困难关卡设置同上,注意:次数最多为3),逗号均为英文逗号,日服、国际服可填max: - 難しいレベルの設定は上記と同じですが、注:最大回数は3回です)、カンマは英語のカンマで、日本語と海外のサーバーには最大で入力できます。 + ハードステージの設定は上記と同じですが、(注:最大回数は3回です)、カンマは英語のカンマで、日本サーバーと海外サーバーには「max」で入力できます: 根据学生添加关卡 - 学生に基づいてレベルを追加する + 学生に基づいてレベルを追加する 爱丽丝宝贝 - アリス・ベイビー + アリス・ベイビー 设置失败 - セットアップに失敗しました + セットアップ失敗 优先做好感等级多的日程 - 多くのレベルの好感のあるスケジュールが優先されます + 好感が多くのスケジュールが優先されます 日程次数 - イベントの数 + スケジュールの回数 区域名称 - 地域の名前 + 地域の名前 初级 - ジュニア + ジュニア 普通 - 通常の + 普通 高级 - 年上 + 高級 特级 - + 特級 请填写您的截图间隔: - スクリーンショットの間隔を入力してください。 + スクリーンショットの間隔を入力してください: 截图间隔 - スクリーンショットの間隔 + スクリーンショットの間隔 ADB地址(点击选择) - ADBアドレス(クリックして選択) + ADBアドレス(クリックして選択) 自动查询模拟器失败!请尝试手动输入端口 - 自動クエリ エミュレーターが失敗しました。 ポートを手動で入力してみます + エミュレーターは見つからない。 ポートを手動で入力してください adb地址获取失败 - adbアドレスを取得できませんでした + adbアドレスを取得できませんでした 信用点 - クレジット + クレジット 青辉石 - ラップライト + 青煇石 最高难度 - 最高難易度 + 最高難易度 选择模拟器类型 - シミュレーターの種類を選択する + シミュレーターの種類を選択する @@ -860,97 +861,97 @@ 停止 - やめて + 止める 启动 - 始める + 起動 困难图推图已完成 - 難しい図のプッシュマップが完成しました + ハードステージがクリアしました 无任务 - タスクなし + タスクなし 普通关推图 - 通常のグアントゥイ図 + 普通ステージをクリアする 普通图推图已完成 - 通常のフィギュアプッシュが完了しました + 普通ステージがクリアしました 反和谐成功,请重启BA下载资源 - アンチハーモニーが成功しました。BAを再起動してリソースをダウンロードしてください + アンチハーモニーが成功しました。BAを再起動してリソースをダウンロードしてください 自动主线剧情 - 自動本編 + 本編プロットをクリアする 主线剧情已完成 - 本編は完成しました + 本編プロットがクリアしました 自动小组剧情 - 自動グループプロット + グループプロットをクリアする 小组剧情已完成 - グループストーリーが完成しました + グループストーリーがクリアしました 自动支线剧情 - 自動サイドプロット + サブプロットをクリアする 支线剧情已完成 - サイドストーリーが完成しました + サブストーリーがクリアしました 自动活动剧情 - プロットを自動的にアクティブにする + イベントプロットをクリアする 活动剧情已完成 - イベントプロットが完了しました + イベントプロットがクリアしました 自动活动任务 - タスクを自動的に移動する + イベントタスクをクリアする 活动任务已完成 - アクティブなタスクが完了しました + イベントタスクがクリアしました 自动活动挑战 - 自動アクティビティの課題 + イベント挑戦をクリアする 活动挑战推图已完成 - イベントチャレンジプッシュマップが完成しました + イベントチャレンジがクリアしました @@ -958,17 +959,17 @@ 一键反和谐 - ワンクリックアンチハーモニー + アンチハーモニーをする 修复Mumu无法登录日服 - Mumuが日本のサーバーにログインできない問題を修正しました + Mumuが日本サーバーにログインできない問題を修正する 显示首页头图(下次启动时生效) - ホームヘッダー画像の表示(次回の起動時に有効) + ホームヘッダー画像を表示するのか(次回の起動時に有効) @@ -976,22 +977,22 @@ 主线剧情需要推的章节数 - メインストーリーでプッシュする必要がある章の数 + クリアしたい本編プロット章の数 开始推主线剧情 - メインストーリーのプッシュを開始します + 本編プロットをクリアする 开始推小组剧情 - グループプロットのプッシュを開始する + グループプロットをクリアする 开始推支线剧情 - サイドプロットをプッシュし始める + サブプロットをクリアする @@ -999,27 +1000,27 @@ 调度状态 - スケジュールステータス + スケジュールステータス 执行中 - 実行 + 実行中 暂无正在执行的任务 - 進行中のタスクはありません + 進行中のタスクはない 任务队列 - タスクキュー + タスク隊列 暂无队列中的任务 - キューにタスクがない + 隊列にタスクがない @@ -1027,22 +1028,22 @@ 在运行出错时推送 - 実行中のエラー時にプッシュ + 実行中のエラー時に配信 在全部任务完成时推送 - すべてのタスクが完了したときにプッシュされます + すべてのタスクが完了したときに配信します json 推送 - JSONプッシュ + JSON配信 ServerChan推送 - サイファーが押す + 「ServerChan」配信 @@ -1050,22 +1051,22 @@ 新建配置 - 新しい構成を作成する + 新しい設定を作成する 输入新建的配置名: - 新しい構成の名前を入力します。 + 新しい設定の名前を入力します: 确定 - 確かですか + 確認 取消 - キャンセル + キャンセル @@ -1073,37 +1074,37 @@ 请选择您的服务器,请慎重切换服务器,切换服务器后请重新启动脚本 - サーバーを選択し、サーバーを慎重に切り替え、サーバーを切り替えた後にスクリプトを再起動してください + サーバーを選択し、サーバーを慎重に切り替え、サーバーを切り替えた後にスクリプトを再起動してください 官服 - 公式ユニフォーム + 中国代理サーバー B服 - Bスーツ + ビリビリサーバー 国际服 - 国際サーバー + 国際サーバー 日服 - デイウェア + 日本サーバー 请填写您的adb端口号 - ADBポート番号を入力してください + ADBポート番号を入力してください 检测adb地址(检测目前开启的模拟器adb地址) - ADB アドレスの検出 (現在有効なエミュレータの ADB アドレスを確認してください) + ADB アドレスの検出 (現在有効なエミュレータの ADB アドレスを確認してください) @@ -1111,117 +1112,117 @@ 普通设置 - 通常設定 + 通常設定 基本 - 肝要 + 基本 语言 - 言語 + 言語 设置界面的首选语言 - インターフェイスの優先言語を設定する + 画面の優先言語を設定する 应用相关设置 - 関連する設定を適用する + アプリ関連設定 选择你的服务器平台,设置你的端口(不知道端口请设置为0) - サーバープラットフォームを選択し、ポートを設定します(ポートがわからない場合は、0に設定してください) + サーバーを選択し、ポートを設定します(ポートがわからない場合は、0に設定してください) 脚本相关设置 - スクリプト関連の設定 + スクリプト関連設定 根据你的电脑配置,调整相应的参数。 - PCの構成に応じてパラメータを調整します。 + PCの構成に応じてパラメータを調整します。 模拟器启动设置 - エミュレータの起動設定 + エミュレータの起動設定 设置启动模拟器的路径 - エミュレーターを起動するパスを設定する + エミュレーターを起動するパスを設定する 相关设置 - 関連設定 + 関連設定 普通图推图设置 - 通常のグラフプッシュ画像設定 + 普通ステージのクリアの設定 根据你的推图需求,调整相应的参数。 - プッシュのニーズに応じて、対応するパラメータを調整します。 + プッシュのニーズに応じて、対応するパラメータを調整します。 困难图推图设置 - 難しいグラフプッシュマップの設定 + ハードステージのクリアの設定 根据你所需困难图刷关,设置参数。 - 必要な難易度に応じてパラメータを設定します。 + 必要な難易度に応じてパラメータを設定します。 推剧情 - プロットをプッシュする + プロットをクリアする 主线剧情,小组剧情,支线剧情 - メインプロット、グループプロット、サイドプロット + 本編プロット、グループプロット、サブプロット 活动图设置 - アクティビティ図の設定 + イベントクリアの設定 推故事,推任务,推挑战 - ストーリーをプッシュし、タスクをプッシュし、チャレンジをプッシュ + ストーリークリア、タスククリア、挑戦クリア 其他设置 - その他の設定 + その他の設定 其他的一些小功能与设置 - その他の小さな機能と設定 + その他の機能と設定 推送设置 - プッシュ設定 + 配信設定 推送信息 - プッシュメッセージ + 配信メッセージ @@ -1229,62 +1230,62 @@ <b>各区域扫荡次数以英文逗号分隔</b> - <b>各領域のスイープの数はコンマで区切られます</b> + <b>各領域のスイープの数はコンマで区切られます</b> <b>各区域扫荡次数以英文逗号分隔,扫荡次数可以为max</b> - <b>各領域の掃引数はカンマで区切られ、掃引数は最大</b>にすることができます + <b>各領域の掃引数はカンマで区切られ、掃引数は最大</b>にすることができます 悬赏委托扫荡 - 報奨金注文の一掃 + 指名手配スイープ 学园交流会扫荡 - 学校交流が一掃されます。 + 学校交流会のスイープ 活动关卡扫荡关卡 - イベント レベル: スイープ レベル + イベントステージスイープの名 活动关卡扫荡次数 - アクティブ・レベル・スイープの数 + イベントステージスイープの数 特殊委托扫荡 - 特注スイープ + 特殊依頼スイープ 国服购买邀请券可在<b>商店购买</b>中实现 - 国内サーバー購入の招待券は<b>、店舗購入</b>で実現できます + 中国代理サーバー購入の招待券は<b>、店舗購入</b>で実現できます <b>用券数目设置,下拉框选择</b> - <b>使用するクーポンの数を設定し、ドロップダウンリストから選択します</b> + <b>使用するクーポンの数を設定し、ドロップダウンリストから選択します</b> 悬赏委托扫荡券购买次数 - バウンティオーダースイープチケットの購入回数 + 指名手配スイープチケットの購入回数 日程券购买次数 - イベントのチケットを購入できる回数 + イベントのチケットを購入する回数 学园交流会扫荡券购买次数 - 学校交流会のスイープチケット購入回数 + 学校交流会のスイープチケット購入回数 @@ -1292,12 +1293,12 @@ 配置设置 - 設定を構成する + 構成の設定 功能开关 - 機能スイッチ + 機能スイッチ @@ -1305,17 +1306,17 @@ 执行 - 実行する + 実行する 确定 - 確かですか + 確認 设置成功 - セットアップは成功しました + セットアップ成功 @@ -1323,37 +1324,37 @@ 主页 - ホームページ + ホーム 调度 - 派遣 + スケジュール 配置 - 意気 + 構成 设置 - 並べる + 設定 设置失败 - セットアップに失敗しました + セットアップ失敗 是否要删除配置: - 設定を削除しますか? + 設定を削除しますか: 你需要在确认后重启BAAS以完成更改。 - 変更を完了するには、確認後に BAAS を再起動する必要があります。 + 変更を完了するには、確認後に BAAS を再起動する必要があります。 @@ -1361,35 +1362,35 @@ ConfigTranslation - 設定 + 構成の翻訳 ConfigTranslation 拖动礼物 - 設定 + ギフトをドラグする ConfigTranslation 普通 - 設定 + 普通 TemplateLayout - テンプラトラ ユー + 実行 MainThread - メイン・トレッド + メイン・トレッド MainThread 停止 - メイン・トレッド + メイン・トレッド @@ -1397,7 +1398,7 @@ 帮助 - ヘルプ + ヘルプ - \ No newline at end of file +
From 80c11636d2a0457c8ad6c9433c038211b2e9ba47 Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Wed, 17 Jul 2024 23:04:57 +0800 Subject: [PATCH 29/30] fix : multi notice when having more than one config file --- develop_tools/explore_task_data_generator.py | 2 +- gui/fragments/settings.py | 7 +++++-- window.py | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/develop_tools/explore_task_data_generator.py b/develop_tools/explore_task_data_generator.py index 09ed2a488..564f4d850 100644 --- a/develop_tools/explore_task_data_generator.py +++ b/develop_tools/explore_task_data_generator.py @@ -1,5 +1,5 @@ # this script is used to generate explore task data which can be used -# in function common_gird_method in module.explore_normal_task, the function is under this line +# in function common_gird_method which is under this line in module.explore_normal_task from module.explore_normal_task import common_gird_method diff --git a/gui/fragments/settings.py b/gui/fragments/settings.py index 95d5b8653..310d30d8b 100644 --- a/gui/fragments/settings.py +++ b/gui/fragments/settings.py @@ -6,13 +6,13 @@ from PyQt5.QtWidgets import QWidget from qfluentwidgets import (ComboBoxSettingCard, ExpandLayout, FluentIcon as FIF, ScrollArea, TitleLabel, SettingCardGroup) +import window from gui.components import expand from gui.components.template_card import SimpleSettingCard from gui.util.language import Language from gui.util import notification from gui.util.translator import baasTranslator as bt - class SettingsFragment(ScrollArea): def __init__(self, parent=None, config=None): super().__init__(parent=parent) @@ -138,12 +138,15 @@ def __initLayout(self): def __showRestartTooltip(self): """ show restart tooltip """ + if time.time() - window.LAST_NOTICE_TIME < 0.1: + return notification.success( 'Language updated successfully', 'It will take effect after restart', self.config ) + window.LAST_NOTICE_TIME = time.time() def __connectSignalToSlot(self): """ connect signal to slot """ - bt.cfg.appRestartSig.connect(self.__showRestartTooltip) \ No newline at end of file + bt.cfg.appRestartSig.connect(self.__showRestartTooltip) diff --git a/window.py b/window.py index dbf8048c9..bef511031 100644 --- a/window.py +++ b/window.py @@ -29,7 +29,7 @@ # Offer the error to the error.log ICON_DIR = 'gui/assets/logo.png' - +LAST_NOTICE_TIME = 0 def update_config_reserve_old(config_old, config_new): # 保留旧配置原有的键,添加新配置中没有的,删除新配置中没有的键 for key in config_new: @@ -455,7 +455,7 @@ def start(): app.installTranslator(bt) bt.loadCfgTranslation() - + w = Window() # 聚焦窗口 w.setFocus(True) From 8aa30306a9546c8acbc665b310ca2816651432ac Mon Sep 17 00:00:00 2001 From: pur1fy <2274916027@qq.com> Date: Wed, 17 Jul 2024 23:07:18 +0800 Subject: [PATCH 30/30] move auto_translate to develop tools folder --- .gitignore | 1 - .../auto_translate.py | 28 +++++++++---------- 2 files changed, 14 insertions(+), 15 deletions(-) rename auto_translate.py => develop_tools/auto_translate.py (91%) diff --git a/.gitignore b/.gitignore index 3c31ea97e..c8e14cbdb 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ !window.py !window.spec !i18n.pro -!auto_translate.py !requirements-i18n.txt src/explore_task_data/__pycache__/normal_task_11.cpython-39.pyc *.pyc diff --git a/auto_translate.py b/develop_tools/auto_translate.py similarity index 91% rename from auto_translate.py rename to develop_tools/auto_translate.py index dc759ea76..8882f9fe3 100644 --- a/auto_translate.py +++ b/develop_tools/auto_translate.py @@ -18,16 +18,16 @@ def handle(self, request): class Request: - def __init__(self, handlers: list[Handler], - qt_language: Language, - translator: str = 'bing', - from_lang: str = 'auto', + def __init__(self, handlers: list[Handler], + qt_language: Language, + translator: str = 'bing', + from_lang: str = 'auto', to_lang: str = 'en'): """ Parameters ---------- handlers: list[Handler] - a list of handlers that represent the files to translate. + a list of handlers that represent the files to translate. qt_language: Language the memeber of the enum Language to translate @@ -44,7 +44,7 @@ def __init__(self, handlers: list[Handler], self.qt_language = qt_language self.strLang = qt_language.value.name() self.handlers = handlers - self.translator = translator + self.translator = translator self.from_lang = from_lang self.to_lang = to_lang @@ -52,10 +52,10 @@ def translate_text(self, text): text = ts.translate_text(text, self.translator, self.from_lang, self.to_lang) print(text) return text - + def translate_html(self, html_text): return ts.translate_html(html_text, self.translator, self.from_lang, self.to_lang) - + def process(self): self.handlers[0].handle(self) @@ -65,14 +65,14 @@ def handle(self, request): result = subprocess.run(['pylupdate5', 'i18n.pro'], capture_output=True, text=True) print(result.stdout) self.set_next(request) - + class XmlHandler(Handler): """Translate ts files""" def handle(self, request): # Load the XML from a file - input_file = os.path.join('gui/i18n/', f'{request.strLang}.ts') - output_file = os.path.join('gui/i18n/', f'{request.strLang}.ts') + input_file = os.path.join('../gui/i18n/', f'{request.strLang}.ts') + output_file = os.path.join('../gui/i18n/', f'{request.strLang}.ts') tree = etree.parse(input_file) root = tree.getroot() @@ -123,7 +123,7 @@ def translate_mission_types(self, request, input_dir, output_dir): f.write(text) def handle(self, request): - input_dir = 'src/descriptions/' + input_dir = '../src/descriptions/' output_dir = f'src/descriptions/{request.strLang}' # Ensure the output directory exists if not os.path.exists(output_dir): @@ -142,7 +142,7 @@ def handle(self, request): translated_html = request.translate_html(html) soup = BeautifulSoup(translated_html, 'lxml') prettyHTML = soup.prettify() - + # Write the translated HTML to the output directory name, extension = os.path.splitext(filename) output_name = f'{request.translate_text(name)}.html' @@ -152,7 +152,7 @@ def handle(self, request): class LreleaseHandler(Handler): def handle(self, request): - directory = os.path.join(os.getcwd(), 'gui', 'i18n') + directory = os.path.join(os.getcwd(), '../gui', 'i18n') result = subprocess.run(['lrelease', f'{request.strLang}.ts'], cwd=directory, capture_output=True, text=True) print(result.stdout) self.set_next(request)