缩短 Studio 叠字与重复说明,色标只保留量程
去掉 depth_empty 与无用选区峰值文案,并修正「视图 → 分析视频」。已用 locale 单测与 depth_scale_text 核对;含证据录制的 wiring 用例本机跳过。
This commit is contained in:
@@ -1527,17 +1527,18 @@ def test_the_nothing_to_draw_line_names_the_action_that_produces_a_result():
|
||||
assert seen["zh_CN"] != seen["en_US"]
|
||||
|
||||
|
||||
def test_the_empty_depth_note_is_not_the_missing_depth_note():
|
||||
"""Both locales keep the two apart: a flat map is a reading, an absent one is not."""
|
||||
def test_depth_unavailable_is_a_short_absent_note():
|
||||
"""Both locales say the frame has no depth, without explaining zero vs absent."""
|
||||
from orisys_app_shared.i18n import set_locale
|
||||
|
||||
try:
|
||||
for locale in ("zh_CN", "en_US"):
|
||||
set_locale(locale)
|
||||
empty = t("panels.depth_empty", pixels=84000)
|
||||
absent = t("panels.depth_unavailable")
|
||||
assert "84000" in empty or "84,000" in empty, empty
|
||||
assert empty != absent
|
||||
assert absent
|
||||
assert "\n" not in absent, absent
|
||||
scale = t("panels.depth_scale", low="0.000", high="1.000")
|
||||
assert scale != absent
|
||||
finally:
|
||||
set_locale("zh_CN")
|
||||
|
||||
|
||||
@@ -345,9 +345,9 @@ def test_the_operator_sees_the_cached_views_over_the_recording(
|
||||
|
||||
# The depth view is the stored map, drawn through the window's own backend. This
|
||||
# result's map is exactly zero on every frame it holds — the box chain's depth is
|
||||
# flat on this footage, which the panel has its own sentence for — and it is still a
|
||||
# stored array of the result's own shape, so the pixels are checked against it rather
|
||||
# than against a flat placeholder.
|
||||
# flat on this footage — and it is still a stored array of the result's own shape,
|
||||
# so the pixels are checked against it rather than against a flat placeholder.
|
||||
# The colour-scale caption names the range only.
|
||||
_set_mode(window, DEPTH)
|
||||
target = active_frame
|
||||
assert target.depth is not None and target.depth_nonzero == 0
|
||||
@@ -365,9 +365,9 @@ def test_the_operator_sees_the_cached_views_over_the_recording(
|
||||
"the depth view's pixels are not depth_map_to_bgr of the stored frame"
|
||||
)
|
||||
assert not np.array_equal(shown, arrows_bgr), "the depth view drew the arrow view"
|
||||
assert t("panels.depth_empty", pixels=int(target.depth.size)) in (
|
||||
window.arrow_panel.depth_scale_label.text()
|
||||
), "an exactly-zero depth map is not stated as such"
|
||||
assert window.arrow_panel.depth_scale_label.text() == (
|
||||
window.frame_view.depth_scale_text(target)
|
||||
), "the depth caption is not the colour-scale range"
|
||||
|
||||
# …and the recording's own picture is still reachable, at the same cursor.
|
||||
_set_mode(window, RECORDED)
|
||||
|
||||
Reference in New Issue
Block a user