[totem/wip/hadess/devel-app-name: 1/2] main: Allow translation of development branch app name
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem/wip/hadess/devel-app-name: 1/2] main: Allow translation of development branch app name
- Date: Thu, 3 Feb 2022 16:15:25 +0000 (UTC)
commit a5cd7d442cb9ba5d38091c849a51377fa6c1f243
Author: Bastien Nocera <hadess hadess net>
Date: Thu Feb 3 16:31:12 2022 +0100
main: Allow translation of development branch app name
Rather than using an icon, use a string that can be translated as the
app name.
"Preview" will the suffix for that app name until we agree on a common
name in https://gitlab.gnome.org/Teams/Design/os-mockups/-/issues/155
data/meson.build | 1 +
data/org.gnome.Totem.desktop.in.in | 2 +-
flatpak/org.gnome.Totem.Devel.json | 1 -
meson.build | 6 ++++--
src/totem.c | 4 ++++
5 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index b5bad747c..3bd9ac254 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -62,6 +62,7 @@ r = run_command(desktop_sh, mime_type_list, uri_schemes_list, check: true)
desktop_conf = configuration_data()
desktop_conf.set('VERSION', totem_version)
desktop_conf.set('APPLICATION_ID', application_id)
+desktop_conf.set('APPLICATION_NAME', application_name)
desktop_conf.set('MIME_TYPE', r.stdout().strip())
source_desktop = 'org.gnome.Totem.desktop'
diff --git a/data/org.gnome.Totem.desktop.in.in b/data/org.gnome.Totem.desktop.in.in
index 0e3b6bdc2..d7b2ab678 100644
--- a/data/org.gnome.Totem.desktop.in.in
+++ b/data/org.gnome.Totem.desktop.in.in
@@ -1,5 +1,5 @@
[Desktop Entry]
-Name=Videos
+Name=@APPLICATION_NAME@
Comment=Play movies
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list
MUST also end with a semicolon! Do NOT translate or remove the application name from the list! It is used for
search.
Keywords=Video;Movie;Film;Clip;Series;Player;DVD;TV;Disc;Totem;
diff --git a/flatpak/org.gnome.Totem.Devel.json b/flatpak/org.gnome.Totem.Devel.json
index f0d528cae..b6231dccb 100644
--- a/flatpak/org.gnome.Totem.Devel.json
+++ b/flatpak/org.gnome.Totem.Devel.json
@@ -5,7 +5,6 @@
"sdk": "org.gnome.Sdk",
"command": "totem",
"tags": ["nightly"],
- "desktop-file-name-suffix": " ☢️",
"finish-args": [
/* X11 + XShm access */
"--share=ipc", "--socket=fallback-x11",
diff --git a/meson.build b/meson.build
index 802b51fd5..f6e7a3cfe 100644
--- a/meson.build
+++ b/meson.build
@@ -41,12 +41,13 @@ totem_debug = get_option('buildtype').contains('debug')
cc = meson.get_compiler('c')
+# The app_name needs to match src/totem.c
if get_option('profile') == 'development'
profile = '.Devel'
- name_suffix = ' ☢️'
+ application_name = 'Videos Preview'
else
profile = ''
- name_suffix = ''
+ application_name = 'Videos'
endif
application_id = 'org.gnome.Totem@0@'.format(profile)
@@ -70,6 +71,7 @@ set_defines = [
foreach define: set_defines
config_h.set_quoted(define[0], define[1])
endforeach
+config_h.set10('DEVELOPMENT_VERSION', get_option('profile') == 'development')
# Compiler flags
common_flags = [
diff --git a/src/totem.c b/src/totem.c
index 3ea46b7c3..f98be837e 100644
--- a/src/totem.c
+++ b/src/totem.c
@@ -70,7 +70,11 @@ main (int argc, char **argv)
#endif
g_set_prgname ("totem");
+#if DEVELOPMENT_VERSION
+ g_set_application_name (_("Videos Preview"));
+#else
g_set_application_name (_("Videos"));
+#endif
gtk_window_set_default_icon_name (APPLICATION_ID);
g_setenv("PULSE_PROP_media.role", "video", TRUE);
g_setenv("PULSE_PROP_application.icon_name", APPLICATION_ID, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]