You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-28 16:07:14 +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:
@@ -2105,7 +2105,8 @@ void Tree::update_column(int p_col) {
|
||||
}
|
||||
|
||||
columns.write[p_col].xl_title = atr(columns[p_col].title);
|
||||
columns.write[p_col].text_buf->add_string(columns[p_col].xl_title, theme_cache.tb_font, theme_cache.tb_font_size, columns[p_col].language);
|
||||
const String &lang = columns[p_col].language.is_empty() ? _get_locale() : columns[p_col].language;
|
||||
columns.write[p_col].text_buf->add_string(columns[p_col].xl_title, theme_cache.tb_font, theme_cache.tb_font_size, lang);
|
||||
columns.write[p_col].cached_minimum_width_dirty = true;
|
||||
}
|
||||
|
||||
@@ -2174,7 +2175,8 @@ void Tree::update_item_cell(TreeItem *p_item, int p_col) const {
|
||||
} else {
|
||||
font_size = theme_cache.font_size;
|
||||
}
|
||||
p_item->cells.write[p_col].text_buf->add_string(valtext, font, font_size, p_item->cells[p_col].language);
|
||||
const String &lang = p_item->cells[p_col].language.is_empty() ? _get_locale() : p_item->cells[p_col].language;
|
||||
p_item->cells.write[p_col].text_buf->add_string(valtext, font, font_size, lang);
|
||||
|
||||
BitField<TextServer::LineBreakFlag> break_flags = TextServer::BREAK_MANDATORY | TextServer::BREAK_TRIM_START_EDGE_SPACES | TextServer::BREAK_TRIM_END_EDGE_SPACES;
|
||||
switch (p_item->cells.write[p_col].autowrap_mode) {
|
||||
|
||||
Reference in New Issue
Block a user