Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 ldm (2:2.2.18-1) unstable; urgency=medium
 .
   * New upstream version.
     - Display LDM only in the first monitor (LP: #693151).
     - DesktopNames replaced X-LightDM-DesktopName in xsession files
       (GNOME: #727546).
     - Fix invalid syntax in .dmrc parsing the default session.
 .
   * debian/control: Update Vcs-Browser to use https URL.
Author: Vagrant Cascadian <vagrant@debian.org>
Bug-Ubuntu: https://bugs.launchpad.net/bugs/693151

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- /dev/null
+++ ldm-2.2.18/ca_ES@valencia.po
@@ -0,0 +1,96 @@
+# Catalan translation for ldm
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the ldm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ldm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-07-12 21:42-0700\n"
+"PO-Revision-Date: 2010-08-31 07:38+0000\n"
+"Last-Translator: David Planella <david.planella@ubuntu.com>\n"
+"Language-Team: Catalan <ca@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2014-01-06 16:02+0000\n"
+"X-Generator: Launchpad (build 16877)\n"
+
+#: ../src/plugin.c:20
+msgid "Username"
+msgstr "Nom d'usuari"
+
+#: ../src/plugin.c:32
+msgid "Password"
+msgstr "Contrasenya"
+
+#: ../src/plugin.c:35
+msgid "Verifying password.  Please wait."
+msgstr "S'està verificant la contrasenya. Espereu..."
+
+#: ../src/plugins/ssh/ssh.c:388
+msgid "No response from server, restarting..."
+msgstr "No hi ha cap resposta del servidor, s'està reiniciant..."
+
+#: ../gtkgreet/greeter.c:250
+#, c-format
+msgid "Automatic login in %d seconds"
+msgstr "Entrarà automàticament en %d segons"
+
+#: ../gtkgreet/greeter.c:513
+msgid "Select _Language ..."
+msgstr "Seleccioneu _la llengua"
+
+#: ../gtkgreet/greeter.c:523
+msgid "Select _Session ..."
+msgstr "Seleccioneu la _sessió"
+
+#: ../gtkgreet/greeter.c:533
+msgid "Select _Host ..."
+msgstr "Seleccioneu _el servidor"
+
+#: ../gtkgreet/greeter.c:566
+msgid "_Reboot"
+msgstr "_Reinicia"
+
+#: ../gtkgreet/greeter.c:574
+msgid "Shut_down"
+msgstr "_Apaga"
+
+#: ../gtkgreet/greeter.c:718
+msgid "_Preferences"
+msgstr "_Preferències"
+
+#: ../gtkgreet/greeter.c:812
+msgid "Login as Guest"
+msgstr "Entra com a convidat"
+
+#: ../gtkgreet/sesswin.c:105 ../gtkgreet/langwin.c:104
+#: ../gtkgreet/prefwin.c:89
+msgid "Default"
+msgstr "Per defecte"
+
+#: ../gtkgreet/sesswin.c:107
+msgid "Failsafe xterm"
+msgstr "L'xterm a prova de fallades"
+
+#: ../gtkgreet/sesswin.c:130
+msgid "Change _Session"
+msgstr "Canvia la _sessió"
+
+#: ../gtkgreet/sesswin.c:141
+msgid "Select your session manager:"
+msgstr "Seleccioneu el gestor de sessions:"
+
+#: ../gtkgreet/hostwin.c:123
+msgid "Select the host for your session to use:"
+msgstr "Seleccioneu el servidor per la sessió actual"
+
+#: ../gtkgreet/langwin.c:127
+msgid "Change _Language"
+msgstr "Canvia la _llengua"
+
+#: ../gtkgreet/langwin.c:138
+msgid "Select the language for your session to use:"
+msgstr "Seleccioneu la llengua per la sessió actual:"
--- ldm-2.2.18.orig/generate_locale_list.py
+++ ldm-2.2.18/generate_locale_list.py
@@ -68,6 +68,8 @@ def get_things():
     return myarr
 
 def nice_name(my_locale):
+    if "ca_ES" in  my_locale:
+	return "Valencià; (Espanya)"
     if my_locale == "":
         return ""
     if not re.search("_", my_locale) and len(my_locale) != 2:
--- ldm-2.2.18.orig/ldminfod/ldminfod
+++ ldm-2.2.18/ldminfod/ldminfod
@@ -190,7 +190,8 @@ if __name__ == "__main__":
             defaultlocale = line.split('=')[1].strip('"')
 
     defaultlocale = defaultlocale.replace('UTF8', 'UTF-8')
-    print "language:" + defaultlocale
+    if len(defaultlocale) > 0:
+        print "language:" + defaultlocale
     # Get list of valid locales from locale -a
     try:
         lines = Popen(['locale', '-a'], stdout=PIPE).communicate()[0]
@@ -212,16 +213,18 @@ if __name__ == "__main__":
             langs=new_langs
 
     langs.sort()
+    supported_encodings = ['.utf8','.utf8@valencia']
     for lang in langs:
         lang = lang.rstrip()
-        if lang.endswith('.utf8'):
-            # locale returns .utf8 when we want .UTF-8
-            lang = lang.replace('.utf8','.UTF-8')
-        else:
-            # if locale did not end with .utf8, do not add to list
-            continue
-        if lang != 'POSIX' and lang != 'C' and lang != defaultlocale:
-            print "language:" + lang
+        for encoding in supported_encodings:
+            if lang.endswith(encoding):
+                # locale returns .utf8 when we want .UTF-8
+                lang = lang.replace('.utf8','.UTF-8')
+            else:
+                # if locale did not end with .utf8, do not add to list
+                continue
+            if lang != 'POSIX' and lang != 'C' and lang != defaultlocale:
+                print "language:" + lang
     try:
         lines = get_sessions('/usr/share/xsessions/')
 
--- ldm-2.2.18.orig/po/LINGUAS
+++ ldm-2.2.18/po/LINGUAS
@@ -1,4 +1,5 @@
 #list all languages here, keep it alphabatical
+ca_ES@valencia
 da
 de
 el
--- /dev/null
+++ ldm-2.2.18/po/ca_ES@valencia.po
@@ -0,0 +1,96 @@
+# Catalan translation for ldm
+# Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008
+# This file is distributed under the same license as the ldm package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ldm\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"POT-Creation-Date: 2011-07-12 21:42-0700\n"
+"PO-Revision-Date: 2010-08-31 07:38+0000\n"
+"Last-Translator: David Planella <david.planella@ubuntu.com>\n"
+"Language-Team: Catalan <ca@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2014-01-06 16:02+0000\n"
+"X-Generator: Launchpad (build 16877)\n"
+
+#: ../src/plugin.c:20
+msgid "Username"
+msgstr "Nom d'usuari"
+
+#: ../src/plugin.c:32
+msgid "Password"
+msgstr "Contrasenya"
+
+#: ../src/plugin.c:35
+msgid "Verifying password.  Please wait."
+msgstr "S'està verificant la contrasenya. Espereu..."
+
+#: ../src/plugins/ssh/ssh.c:388
+msgid "No response from server, restarting..."
+msgstr "No hi ha cap resposta del servidor, s'està reiniciant..."
+
+#: ../gtkgreet/greeter.c:250
+#, c-format
+msgid "Automatic login in %d seconds"
+msgstr "Entrarà automàticament en %d segons"
+
+#: ../gtkgreet/greeter.c:513
+msgid "Select _Language ..."
+msgstr "Seleccioneu _la llengua"
+
+#: ../gtkgreet/greeter.c:523
+msgid "Select _Session ..."
+msgstr "Seleccioneu la _sessió"
+
+#: ../gtkgreet/greeter.c:533
+msgid "Select _Host ..."
+msgstr "Seleccioneu _el servidor"
+
+#: ../gtkgreet/greeter.c:566
+msgid "_Reboot"
+msgstr "_Reinicia"
+
+#: ../gtkgreet/greeter.c:574
+msgid "Shut_down"
+msgstr "_Apaga"
+
+#: ../gtkgreet/greeter.c:718
+msgid "_Preferences"
+msgstr "_Preferències"
+
+#: ../gtkgreet/greeter.c:812
+msgid "Login as Guest"
+msgstr "Entra com a convidat"
+
+#: ../gtkgreet/sesswin.c:105 ../gtkgreet/langwin.c:104
+#: ../gtkgreet/prefwin.c:89
+msgid "Default"
+msgstr "Per defecte"
+
+#: ../gtkgreet/sesswin.c:107
+msgid "Failsafe xterm"
+msgstr "L'xterm a prova de fallades"
+
+#: ../gtkgreet/sesswin.c:130
+msgid "Change _Session"
+msgstr "Canvia la _sessió"
+
+#: ../gtkgreet/sesswin.c:141
+msgid "Select your session manager:"
+msgstr "Seleccioneu el gestor de sessions:"
+
+#: ../gtkgreet/hostwin.c:123
+msgid "Select the host for your session to use:"
+msgstr "Seleccioneu el servidor per la sessió actual"
+
+#: ../gtkgreet/langwin.c:127
+msgid "Change _Language"
+msgstr "Canvia la _llengua"
+
+#: ../gtkgreet/langwin.c:138
+msgid "Select the language for your session to use:"
+msgstr "Seleccioneu la llengua per la sessió actual:"
--- ldm-2.2.18.orig/po/ltsp-cluster-info/el.po
+++ ldm-2.2.18/po/ltsp-cluster-info/el.po
@@ -6,11 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ltsp\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-11-10 10:25-0500\n"
 "PO-Revision-Date: 2013-01-13 22:33+0000\n"
 "Last-Translator: Fotis Tsamis <ftsamis@gmail.com>\n"
 "Language-Team: Greek <el@li.org>\n"
+"Language: el\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
--- ldm-2.2.18.orig/po/ltsp-cluster-info/fr.po
+++ ldm-2.2.18/po/ltsp-cluster-info/fr.po
@@ -9,12 +9,12 @@ msgstr ""
 "PO-Revision-Date: 2013-01-14 03:07+0000\n"
 "Last-Translator: Stéphane Graber <stgraber@stgraber.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"Language: fr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Launchpad-Export-Date: 2013-10-10 04:30+0000\n"
 "X-Generator: Launchpad (build 16799)\n"
-"Language: fr\n"
 
 #: ../../ltsp-cluster-info/ltsp-cluster-info:21
 #, sh-format
--- ldm-2.2.18.orig/po/ltsp-cluster-info/pt_BR.po
+++ ldm-2.2.18/po/ltsp-cluster-info/pt_BR.po
@@ -6,11 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ltsp\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-11-10 10:25-0500\n"
 "PO-Revision-Date: 2013-11-22 11:05+0000\n"
 "Last-Translator: Guilherme Benkenstein <gb@gbti.com.br>\n"
 "Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
--- ldm-2.2.18.orig/po/ltsp-cluster-info/sk.po
+++ ldm-2.2.18/po/ltsp-cluster-info/sk.po
@@ -11,12 +11,12 @@ msgstr ""
 "PO-Revision-Date: 2013-01-14 03:07+0000\n"
 "Last-Translator: Slavko <Unknown>\n"
 "Language-Team: Slovak <nomail>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Launchpad-Export-Date: 2013-10-10 04:30+0000\n"
 "X-Generator: Launchpad (build 16799)\n"
-"Language: \n"
 
 #: ../../ltsp-cluster-info/ltsp-cluster-info:21
 #, sh-format
--- ldm-2.2.18.orig/po/ltsp-cluster-info/zh_TW.po
+++ ldm-2.2.18/po/ltsp-cluster-info/zh_TW.po
@@ -6,11 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ltsp\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-11-10 10:25-0500\n"
 "PO-Revision-Date: 2013-11-13 05:32+0000\n"
 "Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
 "Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
--- ldm-2.2.18.orig/po/rc.d/el.po
+++ ldm-2.2.18/po/rc.d/el.po
@@ -6,11 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ltsp\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-11-10 10:25-0500\n"
 "PO-Revision-Date: 2013-01-13 22:31+0000\n"
 "Last-Translator: Fotis Tsamis <ftsamis@gmail.com>\n"
 "Language-Team: Greek <el@li.org>\n"
+"Language: el\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
--- ldm-2.2.18.orig/po/rc.d/fr.po
+++ ldm-2.2.18/po/rc.d/fr.po
@@ -9,12 +9,12 @@ msgstr ""
 "PO-Revision-Date: 2013-01-14 03:07+0000\n"
 "Last-Translator: Stéphane Graber <stgraber@stgraber.org>\n"
 "Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"Language: fr\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Launchpad-Export-Date: 2013-10-10 04:30+0000\n"
 "X-Generator: Launchpad (build 16799)\n"
-"Language: fr\n"
 
 #: ../../rc.d/S15-userLoginCheck:34 ../../rc.d/S99-ltsp-cluster:12
 #, sh-format
@@ -40,5 +40,4 @@ msgstr ""
 #: ../../rc.d/I01-nbd-checkupdate:36
 #, sh-format
 msgid "A new version of the system is available, rebooting in 10s."
-msgstr ""
-"Une nouvelle version du système est disponible, redémarrage dans 10s."
+msgstr "Une nouvelle version du système est disponible, redémarrage dans 10s."
--- ldm-2.2.18.orig/po/rc.d/pt_BR.po
+++ ldm-2.2.18/po/rc.d/pt_BR.po
@@ -6,11 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ltsp\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-11-10 10:25-0500\n"
 "PO-Revision-Date: 2013-11-22 11:03+0000\n"
 "Last-Translator: Guilherme Benkenstein <gb@gbti.com.br>\n"
 "Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
+"Language: pt_BR\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -40,5 +41,4 @@ msgstr ""
 #: ../../rc.d/I01-nbd-checkupdate:36
 #, sh-format
 msgid "A new version of the system is available, rebooting in 10s."
-msgstr ""
-"Uma nova verão do sistema está disponível, reiniciando em 10 segundos."
+msgstr "Uma nova verão do sistema está disponível, reiniciando em 10 segundos."
--- ldm-2.2.18.orig/po/rc.d/sk.po
+++ ldm-2.2.18/po/rc.d/sk.po
@@ -10,12 +10,12 @@ msgstr ""
 "PO-Revision-Date: 2013-01-14 03:07+0000\n"
 "Last-Translator: Slavko <Unknown>\n"
 "Language-Team: Slovenský <nomail>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "X-Launchpad-Export-Date: 2013-10-10 04:30+0000\n"
 "X-Generator: Launchpad (build 16799)\n"
-"Language: \n"
 
 #: ../../rc.d/S15-userLoginCheck:34 ../../rc.d/S99-ltsp-cluster:12
 #, sh-format
--- ldm-2.2.18.orig/po/rc.d/zh_TW.po
+++ ldm-2.2.18/po/rc.d/zh_TW.po
@@ -6,11 +6,12 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: ltsp\n"
-"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
+"Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2010-11-10 10:25-0500\n"
 "PO-Revision-Date: 2013-11-13 05:30+0000\n"
 "Last-Translator: Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>\n"
 "Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
+"Language: \n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
--- ldm-2.2.18.orig/rc.d/X50-generate-env
+++ ldm-2.2.18/rc.d/X50-generate-env
@@ -43,6 +43,10 @@ if [ -n "$LDM_LANGUAGE" ]; then
     export MY_LANG
 fi
 
+AUX_LANGUAGE=$(echo $LDM_LANGUAGE | sed -e 's/\.UTF-8//g')
+MY_LANG="LC_ALL=$LDM_LANGUAGE LANGUAGE=$AUX_LANGUAGE LANG=$LDM_LANGUAGE"
+export MY_LANG
+
 # Set the DISPLAY env, if not running over encrypted ssh
 if boolean_is_true "$LDM_DIRECTX"; then
     MY_DISP="DISPLAY=${LDMINFO_IPADDR}${DISPLAY}"