File: localize.py

package info (click to toggle)
gvb 1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, jessie, jessie-kfreebsd, sid, stretch
  • size: 852 kB
  • ctags: 124
  • sloc: python: 1,256; makefile: 3
file content (25 lines) | stat: -rwxr-xr-x 815 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/python

import subprocess, os

#PREPARE THE TEMPLATE:
subprocess.call(['xgettext', '-o', 'po/good-vibrations.pot', 'gvb.py', 'gvbmod/dispositions.py', 'stuff/gvb.glade'])

#INITIALIZE:
#msginit --input=messages-all.pot
#mv it.po po/it.po
#mkdir -p trunk/locale/it/LC_MESSAGES/

#UPDATE:

#for strings_file in os.listdir('po'):
#    if not strings_file.endswith('.po'):
#        continue
#    lang = strings_file[:-3]
#    subprocess.call(['msgmerge', '-U', 'po/%s' % strings_file, 'po/good-vibrations.pot'])
#    if not os.path.exists('locale/%s/LC_MESSAGES' % lang):
#        os.mkdir('locale/%s' % lang)
#        os.mkdir('locale/%s/LC_MESSAGES' % lang)
#    subprocess.call(['msgfmt', 'po/%s' % strings_file, '-o', 'locale/%s/LC_MESSAGES/gvb.mo' % lang])

# (commented because now Launchpad does it)