From 2f52013da10b0d947f1aa76e24282134ae5dae7f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 4 Sep 2023 06:07:26 +0300 Subject: [PATCH 17/17] Change "Autosettler" to "Autoworker" on client side strings See osdn #48578 Signed-off-by: Marko Lindqvist --- client/control.c | 4 ++-- client/control.h | 2 +- client/gui-gtk-3.22/citydlg.c | 4 ++-- client/gui-gtk-3.22/menu.c | 14 +++++++------- client/gui-gtk-4.0/citydlg.c | 2 +- client/gui-gtk-4.0/menu.c | 26 +++++++++++++------------- client/gui-qt/citydlg.cpp | 2 +- client/gui-qt/menu.cpp | 10 +++++----- client/gui-qt/menu.h | 2 +- client/gui-sdl2/menu.c | 2 +- data/gtk3.22_menus.xml | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) diff --git a/client/control.c b/client/control.c index 38c6c7052f..458075944b 100644 --- a/client/control.c +++ b/client/control.c @@ -1356,7 +1356,7 @@ int check_recursive_road_connect(struct tile *ptile, const struct extra_type *pe /*******************************************************************//** Can tile be irrigated by given unit? Unit can be NULL to check if - any settler type unit of any player can irrigate. + any worker type unit of any player can irrigate. ***********************************************************************/ static bool can_be_irrigated(const struct tile *ptile, const struct unit *punit) @@ -3552,7 +3552,7 @@ void key_unit_auto_explore(void) Call to request (from the server) that the focus unit is put into autoworker mode. **************************************************************************/ -void key_unit_auto_settle(void) +void key_unit_auto_work(void) { unit_list_iterate(get_units_in_focus(), punit) { if (can_unit_do_autoworker(punit)) { diff --git a/client/control.h b/client/control.h index d5260a471c..cd45012208 100644 --- a/client/control.h +++ b/client/control.h @@ -243,7 +243,7 @@ void key_recall_previous_focus_unit(void); void key_unit_move(enum direction8 gui_dir); void key_unit_airbase(void); void key_unit_auto_explore(void); -void key_unit_auto_settle(void); +void key_unit_auto_work(void); void key_unit_build_city(void); void key_unit_build_wonder(void); void key_unit_connect(enum unit_activity activity, diff --git a/client/gui-gtk-3.22/citydlg.c b/client/gui-gtk-3.22/citydlg.c index 8745b704e5..b1083e5610 100644 --- a/client/gui-gtk-3.22/citydlg.c +++ b/client/gui-gtk-3.22/citydlg.c @@ -2954,8 +2954,8 @@ static void popup_workertask_dlg(struct city *pcity, struct tile *ptile) workertask_req.loc = ptile; shl = choice_dialog_start(GTK_WINDOW(toplevel), - _("What Action to Request"), - _("Select autosettler activity:")); + _("What Action to Request"), + _("Select autoworker activity:")); ptask = worker_task_list_get(pcity->task_reqs, 0); if (ptask != NULL) { diff --git a/client/gui-gtk-3.22/menu.c b/client/gui-gtk-3.22/menu.c index 24a27070fb..78c1c967da 100644 --- a/client/gui-gtk-3.22/menu.c +++ b/client/gui-gtk-3.22/menu.c @@ -244,7 +244,7 @@ static void unit_upgrade_callback(GtkMenuItem *item, gpointer data); static void unit_convert_callback(GtkMenuItem *item, gpointer data); static void unit_disband_callback(GtkMenuItem *item, gpointer data); static void build_city_callback(GtkMenuItem *item, gpointer data); -static void auto_settle_callback(GtkMenuItem *item, gpointer data); +static void auto_work_callback(GtkMenuItem *item, gpointer data); static void build_road_callback(GtkMenuItem *item, gpointer data); static void build_irrigation_callback(GtkMenuItem *item, gpointer data); static void cultivate_callback(GtkMenuItem *item, gpointer data); @@ -566,8 +566,8 @@ static struct menu_entry_info menu_entries[] = G_CALLBACK(unit_disband_callback), MGROUP_UNIT }, { "BUILD_CITY", N_("_Build City"), GDK_KEY_b, 0, G_CALLBACK(build_city_callback), MGROUP_UNIT }, - { "AUTO_SETTLER", N_("_Auto Settler"), GDK_KEY_a, 0, - G_CALLBACK(auto_settle_callback), MGROUP_UNIT }, + { "AUTO_WORKER", N_("_Auto Worker"), GDK_KEY_a, 0, + G_CALLBACK(auto_work_callback), MGROUP_UNIT }, { "BUILD_ROAD", N_("Build _Road"), GDK_KEY_r, 0, G_CALLBACK(build_road_callback), MGROUP_UNIT }, { "BUILD_IRRIGATION", N_("Build _Irrigation"), GDK_KEY_i, 0, @@ -1761,11 +1761,11 @@ static void build_city_callback(GtkMenuItem *item, gpointer data) } /************************************************************************//** - Action "AUTO_SETTLE" callback. + Action "AUTO_WORK" callback. ****************************************************************************/ -static void auto_settle_callback(GtkMenuItem *action, gpointer data) +static void auto_work_callback(GtkMenuItem *action, gpointer data) { - key_unit_auto_settle(); + key_unit_auto_work(); } /************************************************************************//** @@ -2599,7 +2599,7 @@ void real_menus_update(void) menu_entry_set_sensitive("UNIT_UNSENTRY", units_have_activity_on_tile(punits, ACTIVITY_SENTRY)); - menu_entry_set_sensitive("AUTO_SETTLER", + menu_entry_set_sensitive("AUTO_WORKER", can_units_do(punits, can_unit_do_autoworker)); menu_entry_set_sensitive("UNIT_EXPLORE", can_units_do_activity(punits, ACTIVITY_EXPLORE)); diff --git a/client/gui-gtk-4.0/citydlg.c b/client/gui-gtk-4.0/citydlg.c index 676fc56fce..2be16e9e96 100644 --- a/client/gui-gtk-4.0/citydlg.c +++ b/client/gui-gtk-4.0/citydlg.c @@ -3060,7 +3060,7 @@ static void popup_workertask_dlg(struct city *pcity, struct tile *ptile) shl = choice_dialog_start(GTK_WINDOW(toplevel), _("What Action to Request"), - _("Select autosettler activity:")); + _("Select autoworker activity:")); ptask = worker_task_list_get(pcity->task_reqs, 0); if (ptask != NULL) { diff --git a/client/gui-gtk-4.0/menu.c b/client/gui-gtk-4.0/menu.c index d770e00a40..b22bd41e32 100644 --- a/client/gui-gtk-4.0/menu.c +++ b/client/gui-gtk-4.0/menu.c @@ -473,9 +473,9 @@ static void unit_deboard_callback(GSimpleAction *action, static void build_city_callback(GSimpleAction *action, GVariant *parameter, gpointer data); -static void auto_settle_callback(GSimpleAction *action, - GVariant *parameter, - gpointer data); +static void auto_work_callback(GSimpleAction *action, + GVariant *parameter, + gpointer data); static void cultivate_callback(GSimpleAction *action, GVariant *parameter, gpointer data); @@ -786,8 +786,8 @@ static struct menu_entry_info menu_entries[] = { "BUILD_CITY", N_("_Build City"), "build_city", "b", MGROUP_UNIT, NULL, FALSE }, - { "AUTO_SETTLER", N_("_Auto Settler"), - "auto_settle", "a", MGROUP_UNIT, + { "AUTO_WORKER", N_("_Auto Worker"), + "auto_work", "a", MGROUP_UNIT, NULL, FALSE }, { "BUILD_ROAD", N_("Build _Road"), "build_road", "r", MGROUP_UNIT, @@ -1106,7 +1106,7 @@ const GActionEntry acts[] = { { "done", unit_done_callback }, { "build_city", build_city_callback }, - { "auto_settle", auto_settle_callback }, + { "auto_work", auto_work_callback }, { "build_road", build_road_callback }, { "build_irrigation", build_irrigation_callback }, { "build_mine", build_mine_callback }, @@ -2472,13 +2472,13 @@ static void build_city_callback(GSimpleAction *action, } /************************************************************************//** - Action "AUTO_SETTLE" callback. + Action "AUTO_WORK" callback. ****************************************************************************/ -static void auto_settle_callback(GSimpleAction *action, - GVariant *parameter, - gpointer data) +static void auto_work_callback(GSimpleAction *action, + GVariant *parameter, + gpointer data) { - key_unit_auto_settle(); + key_unit_auto_work(); } /************************************************************************//** @@ -3168,7 +3168,7 @@ static GMenu *setup_menus(GtkApplication *app) work_menu = g_menu_new(); menu_entry_init(work_menu, "BUILD_CITY"); - menu_entry_init(work_menu, "AUTO_SETTLER"); + menu_entry_init(work_menu, "AUTO_WORKER"); /* Placeholder submenus (so that menu update has something to replace) */ submenu = g_menu_new(); @@ -3846,7 +3846,7 @@ void real_menus_update(void) units_can_do_action(punits, ACTION_DISBAND_UNIT, TRUE)); - menu_entry_set_sensitive(map, "AUTO_SETTLER", + menu_entry_set_sensitive(map, "AUTO_WORKER", can_units_do(punits, can_unit_do_autoworker)); menu_entry_set_sensitive(map, "UNIT_EXPLORE", can_units_do_activity(punits, ACTIVITY_EXPLORE)); diff --git a/client/gui-qt/citydlg.cpp b/client/gui-qt/citydlg.cpp index db952f658d..54d12cadb5 100644 --- a/client/gui-qt/citydlg.cpp +++ b/client/gui-qt/citydlg.cpp @@ -1367,7 +1367,7 @@ void city_map::context_menu(QPoint point) ptask = worker_task_list_get(mcity->task_reqs, 0); wid_act = new QWidgetAction(this); - wid_act->setDefaultWidget(new QLabel(_("Autosettler activity:"))); + wid_act->setDefaultWidget(new QLabel(_("Autoworker activity:"))); con_menu = new QMenu(this); con_menu->addAction(wid_act); diff --git a/client/gui-qt/menu.cpp b/client/gui-qt/menu.cpp index 1d04aa3c22..01914ecef9 100644 --- a/client/gui-qt/menu.cpp +++ b/client/gui-qt/menu.cpp @@ -1301,11 +1301,11 @@ void mr_menu::setup_menus() fc_shortcuts::sc()->get_shortcut(SC_BUILDCITY)))); menu_list.insert(BUILD, act); connect(act, &QAction::triggered, this, &mr_menu::slot_build_city); - act = main_menu->addAction(_("Auto Settler")); + act = main_menu->addAction(_("Auto Worker")); act->setShortcut(QKeySequence(shortcut_to_string( fc_shortcuts::sc()->get_shortcut(SC_AUTOMATE)))); menu_list.insert(AUTOWORKER, act); - connect(act, &QAction::triggered, this, &mr_menu::slot_auto_settler); + connect(act, &QAction::triggered, this, &mr_menu::slot_auto_worker); main_menu->addSeparator(); act = main_menu->addAction(_("Build Road")); menu_list.insert(ROAD, act); @@ -2711,11 +2711,11 @@ void mr_menu::slot_action() } /**********************************************************************//** - Action "AUTO_SETTLER" + Action "AUTO_WORKER" **************************************************************************/ -void mr_menu::slot_auto_settler() +void mr_menu::slot_auto_worker() { - key_unit_auto_settle(); + key_unit_auto_work(); } /**********************************************************************//** diff --git a/client/gui-qt/menu.h b/client/gui-qt/menu.h index e0d073471d..b0e43cf9d5 100644 --- a/client/gui-qt/menu.h +++ b/client/gui-qt/menu.h @@ -314,7 +314,7 @@ private slots: void slot_build_path(int id); void slot_build_base(int id); void slot_build_city(); - void slot_auto_settler(); + void slot_auto_worker(); void slot_build_road(); void slot_build_irrigation(); void slot_cultivate(); diff --git a/client/gui-sdl2/menu.c b/client/gui-sdl2/menu.c index 24f713f08e..74c0c4af6b 100644 --- a/client/gui-sdl2/menu.c +++ b/client/gui-sdl2/menu.c @@ -624,7 +624,7 @@ void create_units_order_widgets(void) /* --------- */ /* Auto Worker */ - fc_snprintf(cbuf, sizeof(cbuf), "%s (%s)", _("Auto Settler"), "A"); + fc_snprintf(cbuf, sizeof(cbuf), "%s (%s)", _("Auto Worker"), "A"); buf = create_themeicon(current_theme->o_autowork_icon, main_data.gui, WF_HIDDEN | WF_RESTORE_BACKGROUND diff --git a/data/gtk3.22_menus.xml b/data/gtk3.22_menus.xml index 8a72347444..50deb080e6 100644 --- a/data/gtk3.22_menus.xml +++ b/data/gtk3.22_menus.xml @@ -338,7 +338,7 @@ - + -- 2.40.1