mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:...
This commit is contained in:
parent
010e1b72ce
commit
4df5dfad7c
@ -1588,7 +1588,7 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI):
|
|||||||
d = error_dialog(self, _('Conversion Error'),
|
d = error_dialog(self, _('Conversion Error'),
|
||||||
_('<p>Could not convert: %s<p>It is a '
|
_('<p>Could not convert: %s<p>It is a '
|
||||||
'<a href="%s">DRM</a>ed book. You must first remove the '
|
'<a href="%s">DRM</a>ed book. You must first remove the '
|
||||||
'DRM using 3rd party tools.')%\
|
'DRM using third party tools.')%\
|
||||||
(job.description.split(':')[-1],
|
(job.description.split(':')[-1],
|
||||||
'http://wiki.mobileread.com/wiki/DRM'))
|
'http://wiki.mobileread.com/wiki/DRM'))
|
||||||
d.setModal(False)
|
d.setModal(False)
|
||||||
|
29
upload.py
29
upload.py
@ -296,9 +296,9 @@ class get_translations(translations):
|
|||||||
yield line
|
yield line
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if len(list(self.modified_translations)) == 0:
|
if len(list(self.modified_translations())) == 0:
|
||||||
subprocess.check_call(['bzr', 'merge', self.BRANCH])
|
subprocess.check_call(['bzr', 'merge', self.BRANCH])
|
||||||
if len(list(self.modified_translations)) == 0:
|
if len(list(self.modified_translations())) == 0:
|
||||||
print 'No updated translations available'
|
print 'No updated translations available'
|
||||||
else:
|
else:
|
||||||
subprocess.check_call(['bzr', 'commit', '-m',
|
subprocess.check_call(['bzr', 'commit', '-m',
|
||||||
@ -315,17 +315,32 @@ class get_translations(translations):
|
|||||||
'-t', 'accelerators', '-t', 'escapes', '-t', 'variables',
|
'-t', 'accelerators', '-t', 'escapes', '-t', 'variables',
|
||||||
#'-t', 'xmltags',
|
#'-t', 'xmltags',
|
||||||
#'-t', 'brackets',
|
#'-t', 'brackets',
|
||||||
'-t', 'emails',
|
#'-t', 'emails',
|
||||||
#'-t', 'doublequoting',
|
#'-t', 'doublequoting',
|
||||||
#'-t', 'filepaths',
|
#'-t', 'filepaths',
|
||||||
'-t', 'numbers',
|
'-t', 'numbers',
|
||||||
'-t', 'options',
|
'-t', 'options',
|
||||||
'-t', 'urls',
|
#'-t', 'urls',
|
||||||
'-t', 'printf')
|
'-t', 'printf')
|
||||||
subprocess.check_call(pofilter)
|
subprocess.check_call(pofilter)
|
||||||
#for err in os.listdir(errors):
|
errfiles = glob.glob(errors+os.sep+'*.po')
|
||||||
# subprocess.check_call(['gvim', os.path.join(errors, err)])
|
subprocess.check_call(['gvim', '-p', '--']+errfiles)
|
||||||
#subprocess.check_call(['pomerge', '-t', cls.PATH,
|
for f in errfiles:
|
||||||
|
with open(f, 'r+b') as f:
|
||||||
|
raw = f.read()
|
||||||
|
raw = re.sub(r'# \(pofilter\).*', '', raw)
|
||||||
|
f.seek(0)
|
||||||
|
f.truncate()
|
||||||
|
f.write(raw)
|
||||||
|
|
||||||
|
subprocess.check_call(['pomerge', '-t', cls.PATH, '-i', errors, '-o',
|
||||||
|
cls.PATH])
|
||||||
|
if len(list(cls.modified_translations())) > 0:
|
||||||
|
subprocess.call(['bzr', 'diff', cls.PATH])
|
||||||
|
yes = raw_input('Merge corrections? [y/n]: ').strip()
|
||||||
|
if yes in ['', 'y']:
|
||||||
|
subprocess.check_call(['bzr', 'commit', '-m',
|
||||||
|
'IGN:Translation corrections', cls.PATH])
|
||||||
|
|
||||||
class gui(OptionlessCommand):
|
class gui(OptionlessCommand):
|
||||||
description='''Compile all GUI forms and images'''
|
description='''Compile all GUI forms and images'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user