Merge pull request #114405 from KoBeWi/TracToR

Fix some invalid translation usages
This commit is contained in:
Rémi Verschelde 2026-01-01 16:47:35 +01:00
commit 424310f775
No known key found for this signature in database
GPG key ID: C3336907360768E1
9 changed files with 31 additions and 31 deletions

View file

@ -331,7 +331,7 @@ void EditorResourcePicker::_update_menu_items() {
if (OS::get_singleton()->has_feature("macos") || OS::get_singleton()->has_feature("web_macos") || OS::get_singleton()->has_feature("web_ios")) {
modifier = "Cmd";
}
const String drag_and_drop_text = vformat(TTRC("Hold %s while drag-and-dropping from the FileSystem dock or another resource picker to automatically make a dropped resource unique."), modifier);
const String drag_and_drop_text = vformat(TTR("Hold %s while drag-and-dropping from the FileSystem dock or another resource picker to automatically make a dropped resource unique."), modifier);
if (!unique_enabled) {
if (EditorNode::get_singleton()->is_resource_internal_to_scene(edited_resource) && EditorNode::get_singleton()->get_resource_count(edited_resource) == 1) {

View file

@ -1167,7 +1167,7 @@ ProjectDialog::ProjectDialog() {
rd_not_supported = memnew(Label);
rd_not_supported->set_focus_mode(Control::FOCUS_ACCESSIBILITY);
rd_not_supported->set_text(vformat(TTRC("RenderingDevice-based methods not available on this GPU:\n%s\nPlease use the Compatibility renderer."), RenderingServer::get_singleton()->get_video_adapter_name()));
rd_not_supported->set_text(vformat(TTR("RenderingDevice-based methods not available on this GPU:\n%s\nPlease use the Compatibility renderer."), RenderingServer::get_singleton()->get_video_adapter_name()));
rd_not_supported->set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER);
rd_not_supported->set_custom_minimum_size(Size2(200, 0) * EDSCALE);
rd_not_supported->set_autowrap_mode(TextServer::AUTOWRAP_WORD_SMART);

View file

@ -1096,7 +1096,7 @@ void ProjectManager::_set_new_tag_name(const String p_name) {
for (const String &c : forbidden_tag_characters) {
if (p_name.contains(c)) {
tag_error->set_text(vformat(TTRC("These characters are not allowed in tags: %s."), String(" ").join(forbidden_tag_characters)));
tag_error->set_text(vformat(TTR("These characters are not allowed in tags: %s."), String(" ").join(forbidden_tag_characters)));
return;
}
}

View file

@ -3437,18 +3437,18 @@ void Node3DEditorViewport::_notification(int p_what) {
if (show_info) {
const String viewport_size = vformat(U"%d × %d", viewport->get_size().x * viewport->get_scaling_3d_scale(), viewport->get_size().y * viewport->get_scaling_3d_scale());
String text;
text += vformat(TTR("X: %s\n"), rtos(current_camera->get_position().x).pad_decimals(1));
text += vformat(TTR("Y: %s\n"), rtos(current_camera->get_position().y).pad_decimals(1));
text += vformat(TTR("Z: %s\n"), rtos(current_camera->get_position().z).pad_decimals(1));
text += vformat(TTR("X: %s"), rtos(current_camera->get_position().x).pad_decimals(1)) + "\n";
text += vformat(TTR("Y: %s"), rtos(current_camera->get_position().y).pad_decimals(1)) + "\n";
text += vformat(TTR("Z: %s"), rtos(current_camera->get_position().z).pad_decimals(1)) + "\n";
text += "\n";
text += vformat(
TTR("Size: %s (%.1fMP)\n"),
TTR("Size: %s (%.1fMP)") + "\n",
viewport_size,
viewport->get_size().x * viewport->get_size().y * Math::pow(viewport->get_scaling_3d_scale(), 2) * 0.000001);
text += "\n";
text += vformat(TTR("Objects: %d\n"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_OBJECTS_IN_FRAME));
text += vformat(TTR("Primitives: %d\n"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_PRIMITIVES_IN_FRAME));
text += vformat(TTR("Objects: %d"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_OBJECTS_IN_FRAME)) + "\n";
text += vformat(TTR("Primitives: %d"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_PRIMITIVES_IN_FRAME)) + "\n";
text += vformat(TTR("Draw Calls: %d"), viewport->get_render_info(Viewport::RENDER_INFO_TYPE_VISIBLE, Viewport::RENDER_INFO_DRAW_CALLS_IN_FRAME));
info_label->set_text(text);

View file

@ -784,7 +784,7 @@ Variant EditorSettingsDialog::get_drag_data_fw(const Point2 &p_point, Control *p
return Variant();
}
String label_text = vformat(TTRC("Event %d"), selected->get_meta("event_index"));
String label_text = vformat(TTR("Event %d"), selected->get_meta("event_index"));
Label *label = memnew(Label(label_text));
label->set_modulate(Color(1, 1, 1, 1.0f));
shortcuts->set_drag_preview(label);

View file

@ -222,10 +222,10 @@ void SnapshotRefCountedView::_refcounted_selected() {
Array ref_cycles = (Array)d->extra_debug_data["ref_cycles"];
String count_str = "[ul]\n";
count_str += vformat(TTRC("Native References: %d\n"), native_refs);
count_str += vformat(TTRC("ObjectDB References: %d\n"), objectdb_refs);
count_str += vformat(TTRC("Total References: %d\n"), total_refs);
count_str += vformat(TTRC("ObjectDB Cycles: %d\n"), ref_cycles.size());
count_str += vformat(TTR("Native References: %d"), native_refs) + "\n";
count_str += vformat(TTR("ObjectDB References: %d"), objectdb_refs) + "\n";
count_str += vformat(TTR("Total References: %d"), total_refs) + "\n";
count_str += vformat(TTR("ObjectDB Cycles: %d"), ref_cycles.size()) + "\n";
count_str += "[/ul]\n";
RichTextLabel *counts = memnew(RichTextLabel(count_str));
counts->set_use_bbcode(true);

View file

@ -199,11 +199,11 @@ void TreeSortAndFilterBar::_notification(int p_what) {
TreeSortAndFilterBar::SortOptionIndexes TreeSortAndFilterBar::add_sort_option(const String &p_new_option, SortType p_sort_type, int p_sort_column, bool p_is_default) {
sort_button->set_visible(true);
bool is_first_item = sort_items.is_empty();
SortItem item_ascending(sort_items.size(), vformat(TTRC("Sort By %s (Ascending)"), p_new_option), p_sort_type, true, p_sort_column);
SortItem item_ascending(sort_items.size(), vformat(TTR("Sort By %s (Ascending)"), p_new_option), p_sort_type, true, p_sort_column);
sort_items[item_ascending.id] = item_ascending;
sort_button->get_popup()->add_radio_check_item(item_ascending.label, item_ascending.id);
SortItem item_descending(sort_items.size(), vformat(TTRC("Sort By %s (Descending)"), p_new_option), p_sort_type, false, p_sort_column);
SortItem item_descending(sort_items.size(), vformat(TTR("Sort By %s (Descending)"), p_new_option), p_sort_type, false, p_sort_column);
sort_items[item_descending.id] = item_descending;
sort_button->get_popup()->add_radio_check_item(item_descending.label, item_descending.id);

View file

@ -107,27 +107,27 @@ void SnapshotSummaryView::show_snapshot(GameStateSnapshot *p_data, GameStateSnap
SnapshotView::show_snapshot(p_data, p_diff_data);
explainer_text->set_visible(false);
String snapshot_a_name = diff_data == nullptr ? TTRC("Snapshot") : TTRC("Snapshot A");
String snapshot_b_name = TTRC("Snapshot B");
String snapshot_a_name = diff_data == nullptr ? TTR("Snapshot") : TTR("Snapshot A");
String snapshot_b_name = TTR("Snapshot B");
_push_overview_blurb(snapshot_a_name + " " + TTRC("Overview"), snapshot_data);
_push_overview_blurb(snapshot_a_name + " " + TTR("Overview"), snapshot_data);
if (diff_data) {
_push_overview_blurb(snapshot_b_name + " " + TTRC("Overview"), diff_data);
_push_overview_blurb(snapshot_b_name + " " + TTR("Overview"), diff_data);
}
_push_node_blurb(snapshot_a_name + " " + TTRC("Nodes"), snapshot_data);
_push_node_blurb(snapshot_a_name + " " + TTR("Nodes"), snapshot_data);
if (diff_data) {
_push_node_blurb(snapshot_b_name + " " + TTRC("Nodes"), diff_data);
_push_node_blurb(snapshot_b_name + " " + TTR("Nodes"), diff_data);
}
_push_refcounted_blurb(snapshot_a_name + " " + TTRC("RefCounteds"), snapshot_data);
_push_refcounted_blurb(snapshot_a_name + " " + TTR("RefCounteds"), snapshot_data);
if (diff_data) {
_push_refcounted_blurb(snapshot_b_name + " " + TTRC("RefCounteds"), diff_data);
_push_refcounted_blurb(snapshot_b_name + " " + TTR("RefCounteds"), diff_data);
}
_push_object_blurb(snapshot_a_name + " " + TTRC("Objects"), snapshot_data);
_push_object_blurb(snapshot_a_name + " " + TTR("Objects"), snapshot_data);
if (diff_data) {
_push_object_blurb(snapshot_b_name + " " + TTRC("Objects"), diff_data);
_push_object_blurb(snapshot_b_name + " " + TTR("Objects"), diff_data);
}
}
@ -214,7 +214,7 @@ void SnapshotSummaryView::_push_node_blurb(const String &p_title, GameStateSnaps
return;
}
String c = TTRC("Multiple root nodes [i](possible call to 'remove_child' without 'queue_free')[/i]\n");
String c = TTR("Multiple root nodes [i](possible call to 'remove_child' without 'queue_free')[/i]") + "\n";
c += "[ul]\n";
for (const String &node : nodes) {
c += " " + node + "\n";
@ -243,7 +243,7 @@ void SnapshotSummaryView::_push_refcounted_blurb(const String &p_title, GameStat
return;
}
String c = TTRC("RefCounted objects only referenced in cycles [i](cycles often indicate a memory leaks)[/i]\n");
String c = TTR("RefCounted objects only referenced in cycles [i](cycles often indicate a memory leaks)[/i]") + "\n";
c += "[ul]\n";
for (const String &rc : rcs) {
c += " " + rc + "\n";
@ -273,7 +273,7 @@ void SnapshotSummaryView::_push_object_blurb(const String &p_title, GameStateSna
return;
}
String c = TTRC("Scripted objects not referenced by any other objects [i](unreferenced objects may indicate a memory leak)[/i]\n");
String c = TTR("Scripted objects not referenced by any other objects [i](unreferenced objects may indicate a memory leak)[/i]") + "\n";
c += "[ul]\n";
for (const String &object : objects) {
c += " " + object + "\n";

View file

@ -88,7 +88,7 @@ bool ObjectDBProfilerPanel::handle_debug_message(const String &p_message, const
partial_snapshots[request_id] = PartialSnapshot();
partial_snapshots[request_id].total_size = total_size;
Array args = { request_id, 0, SNAPSHOT_CHUNK_SIZE };
take_snapshot->set_text(vformat(TTRC("Receiving Snapshot (0/%s MiB)"), _to_mb(total_size)));
take_snapshot->set_text(vformat(TTR("Receiving Snapshot (0/%s MiB)"), _to_mb(total_size)));
EditorDebuggerNode::get_singleton()->get_current_debugger()->send_message("snapshot:request_snapshot_chunk", args);
return true;
}
@ -96,7 +96,7 @@ bool ObjectDBProfilerPanel::handle_debug_message(const String &p_message, const
int request_id = p_data[0];
PartialSnapshot &chunk = partial_snapshots[request_id];
chunk.data.append_array(p_data[1]);
take_snapshot->set_text(vformat(TTRC("Receiving Snapshot (%s/%s MiB)"), _to_mb(chunk.data.size()), _to_mb(chunk.total_size)));
take_snapshot->set_text(vformat(TTR("Receiving Snapshot (%s/%s MiB)"), _to_mb(chunk.data.size()), _to_mb(chunk.total_size)));
if (chunk.data.size() != chunk.total_size) {
Array args = { request_id, chunk.data.size(), chunk.data.size() + SNAPSHOT_CHUNK_SIZE };
EditorDebuggerNode::get_singleton()->get_current_debugger()->send_message("snapshot:request_snapshot_chunk", args);