← Back to team overview

clicompanion-devs team mailing list archive

[Bug 908240] Re: Locale binary not found

 

Sorry, it looks for the locales folder, not the binary,.

The problem is that it is installed in /usr/local/share/clicompanion
instead of /usr/share/clicompanion, so it does not find the sources
folder nor the system locales folder.

I propose two things:
 - Looking for the correct installed directory
 - Showing a nicer and clearer message when not finding the locales folder

David

-- 
You received this bug notification because you are a member of CLI
Companion Development Team, which is subscribed to CLI Companion.
https://bugs.launchpad.net/bugs/908240

Title:
  Locale binary not found

Status in CLI Companion:
  New

Bug description:
  When executing clicompanion it tries to locate the locale bin, but it
  fails to do so because it uses the source folder or the same dir as
  the clicompanion binary is placed, instead of using the PATH
  environment variable.

   11 if (os.path.exists ('/usr/share/clicompanion/')):
   12     BASEDIR = '/usr/share/clicompanion/'
   13     print "using locale in system"
   14 else:
   15     BASEDIR = os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0])))
   16     print "using locale in source code folder"

  
  (The messages are swapped also, see bug #908237

  I set it high because it will not start
  $ clicompanion 
  using locale in source code folder
  Traceback (most recent call last):
    File "/usr/local/bin/clicompanion", line 45, in <module>
      idioma = get_language()
    File "/usr/local/bin/clicompanion", line 37, in get_language
      traducidos = os.listdir(locale_dir)
  OSError: [Errno 2] No existe el archivo o el directorio: '/usr/local/bin/locale'

  $ which locale
  /usr/bin/locale

To manage notifications about this bug go to:
https://bugs.launchpad.net/clicompanion/+bug/908240/+subscriptions


References