VDR i18n doesn't work if LANGUAGE env is set

Bug #325277 reported by m0sia
4
Affects Status Importance Assigned to Milestone
vdr (Ubuntu)
Fix Released
Undecided
Timo Aaltonen

Bug Description

Binary package hint: vdr

In Ubuntu Server environment variable is set. In my example:
cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANGUAGE="ru_RU:ru:en_GB:en"
LANG="ru_RU.UTF-8"

If it is set vdr doesn't find any locales and i can see errors in syslog:
Feb 4 10:59:34 home-server vdr: [11317] VDR version 1.6.0-1 started
Feb 4 10:59:34 home-server vdr: [11317] switched to user 'vdr'
Feb 4 10:59:34 home-server vdr: [11317] found 0 locales in /usr/share/locale
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'deu,ger'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'slv,slo'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'ita'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'dut,nla,nld'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'por'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'fra,fre'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'nor'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'fin,smi'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'pol'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'esl,spa'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'ell,gre'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'sve,swe'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'rom,rum'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'hun'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'cat,cln'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'rus'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'hrv'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'est'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'dan'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'cze,ces'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'tur'
Feb 4 10:59:34 home-server vdr: [11317] no locale for language code 'ukr'

If i remove LANGUAGE from environment and leave only LANG, vdr works correct:
Feb 4 15:23:48 home-server vdr: [19278] VDR version 1.6.0-1 started
Feb 4 15:23:48 home-server vdr: [19278] switched to user 'vdr'
Feb 4 15:23:48 home-server vdr: [19278] codeset is 'UTF-8' - known
Feb 4 15:23:49 home-server vdr: [19278] found 23 locales in /usr/share/locale

Ubuntu 8.10
vdr 1.6.0-5ubuntu2

Related branches

Revision history for this message
Reinhard Tartler (siretart) wrote :

I can confirm the problem, but the workaround doesn't work for me.

I've commented out LANGUAGE from /etc/environment but locale stays broken.

Revision history for this message
Reinhard Tartler (siretart) wrote :

ah,it seems that it worked for the original reporter because he has perhaps an /etc/default/locale file.

What did work for me is the following command:

echo VDR_LANG="$LANG" | sudo tee -a /etc/default/vdr

This bug has been fixed in debian. The patch can be seen here: http://patches.ubuntu.com/by-release/debian/v/vdr/vdr_1.6.0-8.patch

relevant part:

+++ 1.6.0-8/debian/config-loader.sh 2008-11-29 22:26:00.000000000 +0000
@@ -65,7 +65,10 @@ ENV_FILE="none"
 [ -r /etc/environment ] && ENV_FILE="/etc/environment"
 [ -r /etc/default/locale ] && ENV_FILE="/etc/default/locale"
 [ $ENV_FILE = none ] || \
- VDR_LANG=$(egrep "^[^#]*${var}=" $ENV_FILE | tail -n1 | cut -d= -f2)
+ for var in LANG LC_ALL; do
+ eval VDR_LANG=$(egrep "^[^#]*${var}=" $ENV_FILE | tail -n1 | cut -d= -f2)
+ [ -z "$VDR_LANG" ] || break
+ done
 [ -z "$VDR_LANG" ] && VDR_LANG="C"

 # Enable VFAT file system support by default

Changed in vdr:
status: New → Triaged
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

I'll merge the new package for jaunty.

Changed in vdr:
assignee: nobody → tjaalton
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vdr - 1.6.0-9ubuntu1

---------------
vdr (1.6.0-9ubuntu1) jaunty; urgency=low

  * Merge from debian unstable (LP: #325277, #360552), remaining changes:
    - Enabled patches:
      - opt-20_liemikuutio
      - opt-24_jumpplay
      - opt-27_ttxtsubs
      - opt-42-x_MainMenuHooks
      - opt-51_cuttime
    - Run debian/rules accept-patches to update the list of accepted
      patches.
    - Remove po/vdr.pot after build.

vdr (1.6.0-9) unstable; urgency=low

  [ Tobias Grimm ]
  * Removed debconf note "VDR needs DVB kernel modules" - DVB modules should
    be part of the standard kernel (at least on i386 and amd64).
  * Fixed debconf to not ask to create /var/lib/video.00 if it already exists
  * Added 19_dvb-api-v5.dpatch for new DVB API version 5 in kernel 2.6.28
    (Closes: #522011)
  * Updated debian/copryright
  * Added ${misc:Depends} to vdr-plugin-*
  * Changed section of all packages to "video" except vdr-dbg which became
    "debug"
  * Bumped standards version to 3.8.1

  [ Thomas Günther ]
  * Added removal of vdr-dbg.1 to clean target in debian/rules
  * Fixed substitution of 00list in debian/rules
  * Added French language texts to 10_dd-record-option.dpatch (Thx to Michaël
    Nival)
  * Upgraded opt-24_jumpplay.dpatch to version 1.0
  * Added French language texts to opt-38_disableDoubleEpgEntrys.dpatch (Thx to
    Michaël Nival)

vdr (1.6.0-8) unstable; urgency=low

  * Added 18_vdr-maintenance-1.6.0-2.dpatch (Closes: #485593)
  * Added opt-21_internal-cam-devices.dpatch
  * Added opt-53_dvbsetup.dpatch
  * Added opt-54_deltimeshiftrec.dpatch
  * Replaced libcap-dev build dependency by libcap2-dev | libcap-dev
    (Closes: #492681)
  * Fixed detection of default LANG setting to be used for VDR
  * Updated README.Debian (Closes: #499047)
  * Fixed reference to /usr/share/doc/vdr/README.Debian.gz in /etc/default/vdr
  * Added missing dpatch descriptions
  * Removed Lintian ovverride "shell-script-fails-syntax-check" for
     ./usr/share/vdr-dev/plugin-template/rules

vdr (1.6.0-7) unstable; urgency=medium

  [ Thomas Schmidt ]
  * Fixed bashism in debian/rules (Closes: #491586)

vdr (1.6.0-6) unstable; urgency=medium

  * Removed stdout output from vdrleaktest to /tmp/memleaktest.log,
    create tempfile in debugvdr using mktemp now, to prevent
    possible symlink attacks (Closes: #496421)

 -- Timo Aaltonen <email address hidden> Mon, 13 Apr 2009 19:20:49 +0300

Changed in vdr (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.