desktop-entry: localize application names

This commit localizes application names in the window switcher set via
'desktop_entry_name' or '%n' specifier.
This commit is contained in:
tokyo4j 2025-04-03 02:19:04 +09:00 committed by Johan Malm
parent 885919fc5f
commit fdc8537eee

View file

@ -81,7 +81,12 @@ desktop_entry_init(struct server *server)
sfdo_icon_ctx_set_log_handler( sfdo_icon_ctx_set_log_handler(
sfdo->icon_ctx, level, log_handler, "sfdo-icon"); sfdo->icon_ctx, level, log_handler, "sfdo-icon");
sfdo->desktop_db = sfdo_desktop_db_load(sfdo->desktop_ctx, NULL); char *locale = NULL;
#if HAVE_NLS
locale = setlocale(LC_ALL, "");
#endif
sfdo->desktop_db = sfdo_desktop_db_load(sfdo->desktop_ctx, locale);
if (!sfdo->desktop_db) { if (!sfdo->desktop_db) {
goto err_desktop_db; goto err_desktop_db;
} }