summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorGunnar Hjalmarsson <gunnarhj@ubuntu.com>2014-07-26 00:12:59 +0200
committerGunnar Hjalmarsson <gunnarhj@ubuntu.com>2014-07-26 00:12:59 +0200
commit2772e07f276d1bfc4e7929b62475edf3a439b645 (patch)
tree0921f45e3b443f8895f4cf4f7ea872e062c2e8bb /debian
parentc1c68f5f9e5cb13ba1d15fc383edb0ef1b27193f (diff)
downloadlightdm-git-2772e07f276d1bfc4e7929b62475edf3a439b645.tar.gz
Make the real name of a guest account translatable. Fixes: https://launchpad.net/bugs/1177713
Diffstat (limited to 'debian')
-rw-r--r--debian/guest-account.sh (renamed from debian/guest-account)12
-rw-r--r--debian/lightdm.install1
-rw-r--r--debian/patches/05_translate_debian_files.patch15
-rw-r--r--debian/patches/05_translate_guest_session_dialog.patch15
-rw-r--r--debian/patches/series2
-rwxr-xr-xdebian/rules1
6 files changed, 28 insertions, 18 deletions
diff --git a/debian/guest-account b/debian/guest-account.sh
index 47cfe70a..60908984 100644
--- a/debian/guest-account
+++ b/debian/guest-account.sh
@@ -8,6 +8,16 @@
# If this succeeds, this script needs to print the username as the last line to
# stdout.
+export TEXTDOMAINDIR=/usr/share/locale-langpack
+export TEXTDOMAIN=lightdm
+
+# set the system wide locale for gettext calls
+if [ -f /etc/default/locale ]; then
+ . /etc/default/locale
+ LANGUAGE=
+ export LANG LANGUAGE
+fi
+
add_account ()
{
HOME=`mktemp -td guest-XXXXXX`
@@ -36,7 +46,7 @@ add_account ()
fi
else
# does not exist, so create it
- adduser --system --no-create-home --home / --gecos "Guest" --group --shell /bin/bash $USER || {
+ adduser --system --no-create-home --home / --gecos $(gettext "Guest") --group --shell /bin/bash $USER || {
umount "$HOME"
rm -rf "$HOME"
exit 1
diff --git a/debian/lightdm.install b/debian/lightdm.install
index 726383b7..1da4aeb9 100644
--- a/debian/lightdm.install
+++ b/debian/lightdm.install
@@ -9,7 +9,6 @@ etc/lightdm/lightdm.conf usr/share/doc/lightdm/
etc/lightdm/keys.conf usr/share/doc/lightdm/
etc/apparmor.d
debian/lightdm-session usr/sbin
-debian/guest-account usr/sbin
debian/guest-session-auto.sh usr/lib/lightdm
debian/lightdm-greeter-session usr/lib/lightdm
debian/source_lightdm.py usr/share/apport/package-hooks
diff --git a/debian/patches/05_translate_debian_files.patch b/debian/patches/05_translate_debian_files.patch
new file mode 100644
index 00000000..382192c5
--- /dev/null
+++ b/debian/patches/05_translate_debian_files.patch
@@ -0,0 +1,15 @@
+Description: Grab translatable strings from debian/* files
+ This is done as an Ubuntu patch, since debian/* files are not included upstream.
+Forwarded: not-needed
+Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
+
+--- lightdm.orig/po/POTFILES.in 2014-01-23 19:17:23.143894000 +0100
++++ lightdm/po/POTFILES.in 2014-07-24 23:28:19.519106226 +0200
+@@ -1,5 +1,7 @@
+ # List of source files containing translatable strings.
+ # Please keep this file sorted alphabetically.
+ [encoding: UTF-8]
++debian/guest-account.sh
++debian/guest-session-auto.sh
+ src/lightdm.c
+ src/dm-tool.c
diff --git a/debian/patches/05_translate_guest_session_dialog.patch b/debian/patches/05_translate_guest_session_dialog.patch
deleted file mode 100644
index 398a4a12..00000000
--- a/debian/patches/05_translate_guest_session_dialog.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: Grab translatable strings from debian/guest-session-auto.sh
- This is done as an Ubuntu patch, since debian/guest-session-auto.sh
- is not an upstream file.
-Forwarded: not-needed
-Author: Gunnar Hjalmarsson <gunnarhj@ubuntu.com>
-
---- lightdm.orig/po/POTFILES.in 2014-01-24 14:44:56.240966000 +0100
-+++ lightdm/po/POTFILES.in 2014-01-24 15:09:58.651191195 +0100
-@@ -1,5 +1,6 @@
- # List of source files containing translatable strings.
- # Please keep this file sorted alphabetically.
- [encoding: UTF-8]
-+debian/guest-session-auto.sh
- src/lightdm.c
- src/dm-tool.c
diff --git a/debian/patches/series b/debian/patches/series
index 4d371dde..4bb2ea00 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,3 @@
01_transition_ubuntu2d_ubuntu_desktop.patch
04_language_handling.patch
-05_translate_guest_session_dialog.patch
+05_translate_debian_files.patch
diff --git a/debian/rules b/debian/rules
index d0651d04..b83cccfe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,6 +21,7 @@ override_dh_install:
rm -r debian/tmp/usr/share/help/C/
# we do install pam through installpam and init through installinit
dh_install -X.a -X.la -Xpam.d -X'etc/init/lightdm.conf' --fail-missing
+ install -D debian/guest-account.sh debian/lightdm/usr/sbin/guest-account
chmod +x debian/lightdm/usr/lib/lightdm/lightdm-greeter-session
chmod +x debian/lightdm/usr/lib/lightdm/guest-session-auto.sh