This commit is contained in:
shenjack 2023-01-06 20:01:34 +08:00
parent 9965ca7ab9
commit a26084a563
3 changed files with 9 additions and 3 deletions

View File

@ -52,6 +52,8 @@ class TranslateConfig:
class Translates: class Translates:
name = 'Translate'
def __init__(self, def __init__(self,
value: Union[Dict[str, Any], list, tuple, str], value: Union[Dict[str, Any], list, tuple, str],
config: Optional[TranslateConfig] = None, config: Optional[TranslateConfig] = None,
@ -84,13 +86,15 @@ class Translates:
cache = self.value[item] cache = self.value[item]
cache_get_list.append((True, item)) cache_get_list.append((True, item))
except (KeyError, TypeError): except (KeyError, TypeError):
cache_get_list.append((False, item))
# 出现问题 # 出现问题
if DR_option.report_translate_no_found: if DR_option.report_translate_no_found:
frame = inspect.currentframe() frame = inspect.currentframe()
last_frame = frame.f_back last_frame = frame.f_back
if last_frame.f_code == self.__getattr__.__code__: if last_frame.f_code == self.__getattr__.__code__:
last_frame = last_frame.f_back last_frame = last_frame.f_back
call_info = f'Translate Not Found at {last_frame.f_code.co_name} by {".".join([x[1] for x in cache_get_list])} at:' \ call_info = f'{self.name} Not Found at {last_frame.f_code.co_name} by ' \
f'{".".join([x[1] for x in cache_get_list])} at:' \
f'{last_frame.f_code.co_filename}:{last_frame.f_lineno}' f'{last_frame.f_code.co_filename}:{last_frame.f_lineno}'
print(call_info) print(call_info)
# 如果不抛出错误 # 如果不抛出错误

View File

@ -8,8 +8,8 @@ fonts_folder = "libs/fonts"
[window] [window]
style = "None" style = "None"
width = 937 width = 1024
height = 602 height = 768
visible = true visible = true
gui_scale = 1 gui_scale = 1
caption = "Difficult Rocket {version}" caption = "Difficult Rocket {version}"

View File

@ -1,6 +1,8 @@
$start_time = Get-Uptime $start_time = Get-Uptime
Write-Output $start_time Write-Output $start_time
python .\.github\workflows\get_info.py
$arg = @() $arg = @()
# 输出配置 # 输出配置
$arg += @("--standalone") $arg += @("--standalone")