1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

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
9 changed files with 31 additions and 31 deletions

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);