GTG

Fix locale path detection on non-linuces

Bug #495662 reported by mrk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Status tracked in Trunk
Trunk
Fix Released
Medium
Luca Falavigna

Bug Description

Good day!

You make good work with DIST_ROOTDIR and DIST_ROOTDIR_LOCAL in GTG/__init__.py, but there is a problem on FreeBSD with LOCALE_PATH ). We install locales in /usr/local/share/locale, so the current code requires some local hacks to work properly. I've attached the patch the fix the things. Please, consider to commit to 0.2. Thanks.

Revision history for this message
mrk (cvs-src) wrote :
Changed in gtg:
milestone: none → 0.2
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

I really hate the "pass" line but I think we should try to make packagers job as easy as possible.

Maybe it's less ugly to put it that kind of way :

if not os.path.isdir(LOCALE_PATH):
   f os.path.isdir('/usr/local/share/locale'):
       LOCALE_PATH = '/usr/local/share/locale'
   else:
      LOCALE_PATH = '/usr/share/locale'

Luca F. > I let you decide if this patch is safe and could be included in 0.2. If you consider it's good, you have my vote.

Changed in gtg:
assignee: nobody → Luca Falavigna (dktrkranz)
Revision history for this message
Luca Falavigna (dktrkranz) wrote :

I'd also check if underlying OS is not Linux, to prevent erroneous behaviours if system administrator installed some locales locally. Committed a slightly modified patch as r474.

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.