summaryrefslogtreecommitdiff
path: root/editor/localization_editor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/localization_editor.cpp')
-rw-r--r--editor/localization_editor.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp
index 3fe1aa557d..9d48a43d4d 100644
--- a/editor/localization_editor.cpp
+++ b/editor/localization_editor.cpp
@@ -98,7 +98,7 @@ void LocalizationEditor::_translation_delete(Object *p_item, int p_column, int p
ERR_FAIL_INDEX(idx, translations.size());
- translations.remove(idx);
+ translations.remove_at(idx);
undo_redo->create_action(TTR("Remove Translation"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations", translations);
@@ -276,7 +276,7 @@ void LocalizationEditor::_translation_res_option_delete(Object *p_item, int p_co
ERR_FAIL_COND(!remaps.has(key));
PackedStringArray r = remaps[key];
ERR_FAIL_INDEX(idx, r.size());
- r.remove(idx);
+ r.remove_at(idx);
remaps[key] = r;
undo_redo->create_action(TTR("Remove Resource Remap Option"));
@@ -321,7 +321,7 @@ void LocalizationEditor::_translation_filter_option_changed() {
}
} else {
if (l_idx != -1) {
- f_locales.remove(l_idx);
+ f_locales.remove_at(l_idx);
}
}
@@ -397,7 +397,7 @@ void LocalizationEditor::_pot_delete(Object *p_item, int p_column, int p_button)
ERR_FAIL_INDEX(idx, pot_translations.size());
- pot_translations.remove(idx);
+ pot_translations.remove_at(idx);
undo_redo->create_action(TTR("Remove file from POT generation"));
undo_redo->add_do_property(ProjectSettings::get_singleton(), "internationalization/locale/translations_pot_files", pot_translations);
@@ -497,7 +497,7 @@ void LocalizationEditor::update_translations() {
TreeItem *t = translation_filter->create_item(root);
t->set_cell_mode(0, TreeItem::CELL_MODE_CHECK);
- t->set_text(0, n);
+ t->set_text(0, vformat("[%s] %s", l, n));
t->set_editable(0, true);
t->set_tooltip(0, l);
t->set_checked(0, is_checked);
@@ -537,7 +537,7 @@ void LocalizationEditor::update_translations() {
if (langnames.length() > 0) {
langnames += ",";
}
- langnames += names[i];
+ langnames += vformat("[%s] %s", langs[i], names[i]);
translation_locales_idxs_remap.write[l_idx] = i;
l_idx++;
}
@@ -546,7 +546,7 @@ void LocalizationEditor::update_translations() {
if (i > 0) {
langnames += ",";
}
- langnames += names[i];
+ langnames += vformat("[%s] %s", langs[i], names[i]);
}
}
@@ -641,7 +641,7 @@ LocalizationEditor::LocalizationEditor() {
translation_locales_list_created = false;
TabContainer *translations = memnew(TabContainer);
- translations->set_tab_align(TabContainer::ALIGN_LEFT);
+ translations->set_tab_alignment(TabContainer::ALIGNMENT_LEFT);
translations->set_v_size_flags(Control::SIZE_EXPAND_FILL);
add_child(translations);