You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
Make text-related nodes translation domain aware
- Makes `is_layout_rtl()` translation domain aware - Makes various text-drawing controls translation domain aware - Makes translation preview use the project's fallback locale when disabled
This commit is contained in:
@@ -1017,11 +1017,12 @@ void PopupMenu::_shape_item(int p_idx) const {
|
||||
} else {
|
||||
items.write[p_idx].text_buf->set_direction((TextServer::Direction)items[p_idx].text_direction);
|
||||
}
|
||||
items.write[p_idx].text_buf->add_string(items.write[p_idx].xl_text, font, font_size, items[p_idx].language);
|
||||
const String &lang = items[p_idx].language.is_empty() ? _get_locale() : items[p_idx].language;
|
||||
items.write[p_idx].text_buf->add_string(items.write[p_idx].xl_text, font, font_size, lang);
|
||||
|
||||
items.write[p_idx].accel_text_buf->clear();
|
||||
items.write[p_idx].accel_text_buf->set_direction(is_layout_rtl() ? TextServer::DIRECTION_RTL : TextServer::DIRECTION_LTR);
|
||||
items.write[p_idx].accel_text_buf->add_string(_get_accel_text(items.write[p_idx]), font, font_size);
|
||||
items.write[p_idx].accel_text_buf->add_string(_get_accel_text(items.write[p_idx]), font, font_size, lang);
|
||||
items.write[p_idx].dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user