File: Set-fixed-gettext-POT-template-name.patch

package info (click to toggle)
gnome-session 49.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,744 kB
  • sloc: ansic: 7,390; xml: 591; python: 125; makefile: 48; sh: 42
file content (45 lines) | stat: -rw-r--r-- 1,478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
From: Alessandro Astone <alessandro.astone@canonical.com>
Date: Fri, 17 Oct 2025 13:53:46 +0200
Subject: Set fixed gettext POT template name

Avoid changing the POT template name with every release.
The gnome-session API version does not matter for translatable strings.
The domain being diffrent prevents some translation services like launchpad.net
from re-using translations from the previous version, without a good reason.

(cherry picked from commit e4e15bba1ddcdfc716199de7c9a6b0d179142746)

Origin: future gnome-session 50.0
---
 meson.build    | 3 +--
 po/meson.build | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index f1049f5..69f519a 100644
--- a/meson.build
+++ b/meson.build
@@ -7,7 +7,6 @@ project(
 )
 
 session_version = meson.project_version()
-session_api_name = '@0@-@1@'.format(meson.project_name(), session_version.split('.')[0])
 
 session_prefix = get_option('prefix')
 session_bindir = join_paths(session_prefix, get_option('bindir'))
@@ -30,7 +29,7 @@ set_defines = [
   ['PACKAGE_VERSION', session_version],
   ['VERSION', session_version],
   # i18n
-  ['GETTEXT_PACKAGE', session_api_name]
+  ['GETTEXT_PACKAGE', meson.project_name()]
 ]
 
 foreach define: set_defines
diff --git a/po/meson.build b/po/meson.build
index 77bf1ff..e9b77d7 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1 +1 @@
-i18n.gettext(session_api_name, preset: 'glib')
+i18n.gettext(meson.project_name(), preset: 'glib')