Keep fallback UI labels Korean
This commit is contained in:
@@ -24,6 +24,7 @@ func _init() -> void:
|
||||
_check_map_focus_contract(failures)
|
||||
_check_battle_presentation_sequence_contract(failures)
|
||||
_check_readability_contract(failures)
|
||||
_check_korean_fallback_labels(failures)
|
||||
_check_dialogue_localization_and_side(failures)
|
||||
_check_event_dialogue_side_passthrough(failures)
|
||||
_check_opening_battle_camp_context(failures)
|
||||
@@ -570,6 +571,54 @@ func _check_readability_contract(failures: Array[String]) -> void:
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_korean_fallback_labels(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
var scene = BattleSceneScript.new()
|
||||
var prepared := state._prepare_unit({
|
||||
"id": "fallback_unit",
|
||||
"class_id": "mystery_unit",
|
||||
"pos": [0, 0]
|
||||
})
|
||||
var labels := [
|
||||
str(prepared.get("class", "")),
|
||||
state._format_move_type("hover_cart"),
|
||||
state._status_display_name("mystery_status"),
|
||||
state._team_status_text("neutral_force"),
|
||||
scene._team_hud_short_text("neutral_force"),
|
||||
scene._unit_team_text("neutral_force"),
|
||||
scene._item_kind_text("mystery"),
|
||||
scene._skill_kind_text("mystery"),
|
||||
scene._format_move_type("hover_cart"),
|
||||
scene._format_identifier_label("mystery_value")
|
||||
]
|
||||
var forbidden := ["Unit", "Unknown", "Player", "Enemy", "Hover Cart", "Mystery"]
|
||||
for label in labels:
|
||||
if label.strip_edges().is_empty():
|
||||
failures.append("fallback labels should not be blank")
|
||||
for word in forbidden:
|
||||
if label.contains(word):
|
||||
failures.append("fallback label should stay Korean-facing, got %s" % label)
|
||||
if prepared.get("class", "") != "부대":
|
||||
failures.append("missing unit class should fall back to 부대: %s" % str(prepared.get("class", "")))
|
||||
if state._format_move_type("hover_cart") != "행군":
|
||||
failures.append("unknown battle-state move type should fall back to 행군")
|
||||
if state._status_display_name("mystery_status") != "상태":
|
||||
failures.append("unknown battle-state status should fall back to 상태")
|
||||
if state._team_status_text("neutral_force") != "전장":
|
||||
failures.append("unknown battle-state team should fall back to 전장")
|
||||
if scene._team_hud_short_text("neutral_force") != "전장":
|
||||
failures.append("unknown HUD team should fall back to 전장")
|
||||
if scene._unit_team_text("neutral_force") != "소속 미상":
|
||||
failures.append("unknown unit team should fall back to 소속 미상")
|
||||
if scene._item_kind_text("mystery") != "물자":
|
||||
failures.append("unknown item kind should fall back to 물자")
|
||||
if scene._skill_kind_text("mystery") != "책략":
|
||||
failures.append("unknown skill kind should fall back to 책략")
|
||||
if scene._format_move_type("hover_cart") != "행군":
|
||||
failures.append("unknown scene move type should fall back to 행군")
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_text_fit_contract(scene, failures: Array[String]) -> void:
|
||||
for method_name in [
|
||||
"_fit_label_font_size_to_text",
|
||||
|
||||
Reference in New Issue
Block a user