Request: Parley w/dfgHiatus's "Please use our new locale system for text!"

This commit is contained in:
SnuffSocket committed 2024-10-22 10:22:01 +03:00
1 parent f9e37fa246
commit fcecfd0d84
4 files changed
+13 -8

No files matched your search

+2
View File
@@ -35,12 +35,14 @@
"error.frame": "Problem while getting frame",
"error.size": "Size of frames to display are of unequal sizes",
"error.capture": "Frame capture issue detected",
"error.winmm": "Failed to load winmm",
"warn.frameDrop": "Frame drop. Corrupted JPEG",
"warn.captureProblem": "Capture source problem, assuming camera disconnected, waiting for reconnect",
"warn.serialCapture": "Serial capture source problem, assuming camera disconnected, waiting for reconnect",
"warn.backpressure1": "CAPTURE QUEUE BACKPRESSURE OF",
"warn.backpressure2": "CHECK FOR CRASH OR TIMING ISSUES IN ALGORITHM",
"warn.oneEuroValues": "OneEuroFilter values must be a legal number",
"warn.timerRes": "Failed to set timer resolution:",
"info.moveToTrackingMode": "Moving to tracking mode",
"info.moveToROIMode": "Moving to ROI mode",
"info.setROI": "Set ROI",
+2
View File
@@ -35,12 +35,14 @@
"error.frame": "Problem while getting frame",
"error.size": "Size of frames to display are of unequal sizes",
"error.capture": "Frame capture issue detected",
"error.winmmDll": "Faiwed to woad winmm",
"warn.frameDrop": "Frame drop. Corrupted JPEG",
"warn.captureProblem": "Capture source problem, assuming camera disconnected, waiting for reconnect",
"warn.serialCapture": "Serial capture source problem, assuming camera disconnected, waiting for reconnect",
"warn.backpressure1": "CAPTURE QUEUE BACKPRESSURE OF",
"warn.backpressure2": "CHECK FOR CRASH OR TIMING ISSUES IN ALGORITHM",
"warn.oneEuroValues": "OneEuroFilter values must be a legal number",
"warn.timerRes": "Faiwed to set timew wesowution:",
"info.moveToTrackingMode": "Moving to tracking mode",
"info.moveToROIMode": "Moving to ROI mode",
"info.setROI": "Set ROI",
@@ -35,12 +35,14 @@
"error.frame": "Problem while getting frame",
"error.size": "Size of frames to display are of unequal sizes",
"error.capture": "Frame capture issue detected",
"error.winmmDll": "We be failin' to load th' winmm, matey!",
"warn.frameDrop": "Frame drop. Corrupted JPEG",
"warn.captureProblem": "Capture source problem, assuming camera disconnected, waiting for reconnect",
"warn.serialCapture": "Serial capture source problem, assuming camera disconnected, waiting for reconnect",
"warn.backpressure1": "CAPTURE QUEUE BACKPRESSURE OF",
"warn.backpressure2": "CHECK FOR CRASH OR TIMING ISSUES IN ALGORITHM",
"warn.oneEuroValues": "OneEuroFilter values must be a legal number",
"warn.timerRes": "We be failin' to set th' timer resolution:",
"info.moveToTrackingMode": "Moving to tracking mode",
"info.moveToROIMode": "Moving to ROI mode",
"info.setROI": "Set ROI",
+7 -8
View File
@@ -33,17 +33,16 @@ from calib_settings_widget import CalibSettingsWidget
from utils.misc_utils import EnsurePath, is_nt, bg_color_highlight, bg_color_clear
from lang_manager import LocaleStringManager as lang
winmm = None
if is_nt:
from winotify import Notification
try:
winmm = windll.winmm
except OSError:
print(f'\033[91m[{lang._instance.get_string("log.error")}] {lang._instance.get_string("error.winmm")}.\033[0m')
os.system("color") # init ANSI color
winmm = None
try:
winmm = windll.winmm
except OSError:
#print("[DEBUG] Failed to load winmm.dll")
pass
# Random environment variable to speed up webcam opening on the MSMF backend.
# https://github.com/opencv/opencv/issues/17687
os.environ["OPENCV_VIDEOIO_MSMF_ENABLE_HW_TRANSFORMS"] = "0"
@@ -67,7 +66,7 @@ def timerResolution(toggle):
rc = c_int(winmm.timeBeginPeriod(1))
if rc.value != 0:
# TIMEERR_NOCANDO = 97
print(f"[WARN] Failed to set timer resolution: {rc.value}")
print(f'\033[93m[{lang._instance.get_string("log.warn")}] {lang._instance.get_string("warn.timerRes")} {rc.value}\033[0m')
else:
winmm.timeEndPeriod(1)