]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Make the real name of a guest account translatable. Fixes: https://launchpad.net...
authorGunnar Hjalmarsson <gunnarhj@ubuntu.com>
Fri, 25 Jul 2014 22:12:59 +0000 (00:12 +0200)
committerGunnar Hjalmarsson <gunnarhj@ubuntu.com>
Fri, 25 Jul 2014 22:12:59 +0000 (00:12 +0200)
debian/guest-account.sh [moved from debian/guest-account with 93% similarity]
debian/lightdm.install
debian/patches/05_translate_debian_files.patch [new file with mode: 0644]
debian/patches/05_translate_guest_session_dialog.patch [deleted file]
debian/patches/series
debian/rules

similarity index 93%
rename from debian/guest-account
rename to debian/guest-account.sh
index 47cfe70a7bc085eab9ac219d1b4790407524a209..60908984322c91ca937c07ffb94bf68882d17001 100644 (file)
@@ -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
index 726383b76b157f73c45d0bf38375fc57259d5cc4..1da4aeb97cfca6078e43dac192b2f2ef7f0651d4 100644 (file)
@@ -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 (file)
index 0000000..382192c
--- /dev/null
@@ -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 (file)
index 398a4a1..0000000
+++ /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
index 4d371ddeb59d69d909a7e6a819ec9922718ae4c0..4bb2ea009e32a8fddefe3c509566424a1b71f141 100644 (file)
@@ -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
index d0651d04fabf8f7d857b110a555247669831b8cf..b83cccfe1e1c2c44627de706e720f43d0bdb96f7 100755 (executable)
@@ -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