]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop-entry: localize application names
authortokyo4j <hrak1529@gmail.com>
Wed, 2 Apr 2025 17:19:04 +0000 (02:19 +0900)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 2 Apr 2025 19:43:45 +0000 (20:43 +0100)
This commit localizes application names in the window switcher set via
'desktop_entry_name' or '%n' specifier.

src/desktop-entry.c

index f28ce9cb7c5f83576db7012635ef3f629c627e7e..05e0168aae002f95e91298ce67655b0d074d653d 100644 (file)
@@ -81,7 +81,12 @@ desktop_entry_init(struct server *server)
        sfdo_icon_ctx_set_log_handler(
                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) {
                goto err_desktop_db;
        }