gtg-0.3.1-locales.patch 584 B

123456789101112131415161718192021
  1. Do not install unwanted locales.
  2. --- a/setup.py 2014-11-01 11:21:49.679613605 +0100
  3. +++ b/setup.py 2014-11-01 11:26:36.305719135 +0100
  4. @@ -101,9 +101,15 @@
  5. PO_DIR = 'po'
  6. MO_DIR = os.path.join('build', 'po')
  7. +LINGUAS = os.environ.get('LINGUAS', '*').split(' ')
  8. for po in glob.glob(os.path.join(PO_DIR, '*.po')):
  9. lang = os.path.basename(po[:-3])
  10. +
  11. + # Skip unwanted locales
  12. + if lang not in LINGUAS and '*' not in LINGUAS:
  13. + continue
  14. +
  15. mo = os.path.join(MO_DIR, lang, 'gtg.mo')
  16. target_dir = os.path.dirname(mo)
  17. if not os.path.isdir(target_dir):