You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-17 14:11:06 +00:00
Add TTR context for pagination button texts
(cherry picked from commit 81c21ebf39)
This commit is contained in:
committed by
Rémi Verschelde
parent
98069fa6f1
commit
60fe14c595
@@ -980,7 +980,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
|||||||
hbc->add_constant_override("separation", 5 * EDSCALE);
|
hbc->add_constant_override("separation", 5 * EDSCALE);
|
||||||
|
|
||||||
Button *first = memnew(Button);
|
Button *first = memnew(Button);
|
||||||
first->set_text(TTR("First"));
|
first->set_text(TTR("First", "Pagination"));
|
||||||
if (p_page != 0) {
|
if (p_page != 0) {
|
||||||
first->connect("pressed", this, "_search", varray(0));
|
first->connect("pressed", this, "_search", varray(0));
|
||||||
} else {
|
} else {
|
||||||
@@ -990,7 +990,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
|||||||
hbc->add_child(first);
|
hbc->add_child(first);
|
||||||
|
|
||||||
Button *prev = memnew(Button);
|
Button *prev = memnew(Button);
|
||||||
prev->set_text(TTR("Previous"));
|
prev->set_text(TTR("Previous", "Pagination"));
|
||||||
if (p_page > 0) {
|
if (p_page > 0) {
|
||||||
prev->connect("pressed", this, "_search", varray(p_page - 1));
|
prev->connect("pressed", this, "_search", varray(p_page - 1));
|
||||||
} else {
|
} else {
|
||||||
@@ -1020,7 +1020,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
Button *next = memnew(Button);
|
Button *next = memnew(Button);
|
||||||
next->set_text(TTR("Next"));
|
next->set_text(TTR("Next", "Pagination"));
|
||||||
if (p_page < p_page_count - 1) {
|
if (p_page < p_page_count - 1) {
|
||||||
next->connect("pressed", this, "_search", varray(p_page + 1));
|
next->connect("pressed", this, "_search", varray(p_page + 1));
|
||||||
} else {
|
} else {
|
||||||
@@ -1031,7 +1031,7 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
|
|||||||
hbc->add_child(next);
|
hbc->add_child(next);
|
||||||
|
|
||||||
Button *last = memnew(Button);
|
Button *last = memnew(Button);
|
||||||
last->set_text(TTR("Last"));
|
last->set_text(TTR("Last", "Pagination"));
|
||||||
if (p_page != p_page_count - 1) {
|
if (p_page != p_page_count - 1) {
|
||||||
last->connect("pressed", this, "_search", varray(p_page_count - 1));
|
last->connect("pressed", this, "_search", varray(p_page_count - 1));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user