mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Transifex CLI renamed on Arch, sigh
This commit is contained in:
parent
18205625ad
commit
9aa21105d4
@ -20,7 +20,7 @@ import tempfile
|
|||||||
import textwrap
|
import textwrap
|
||||||
import time
|
import time
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from functools import partial
|
from functools import lru_cache, partial
|
||||||
from locale import normalize as normalize_locale
|
from locale import normalize as normalize_locale
|
||||||
|
|
||||||
from polyglot.builtins import codepoint_to_chr, iteritems
|
from polyglot.builtins import codepoint_to_chr, iteritems
|
||||||
@ -54,6 +54,11 @@ def qt_sources():
|
|||||||
]))
|
]))
|
||||||
|
|
||||||
|
|
||||||
|
@lru_cache(maxsize=2)
|
||||||
|
def tx_exe():
|
||||||
|
return os.environ.get('TX', shutil.which('tx-cli') or shutil.which('tx') or 'tx')
|
||||||
|
|
||||||
|
|
||||||
class POT(Command): # {{{
|
class POT(Command): # {{{
|
||||||
|
|
||||||
description = 'Update the .pot translation template and upload it'
|
description = 'Update the .pot translation template and upload it'
|
||||||
@ -64,7 +69,7 @@ class POT(Command): # {{{
|
|||||||
kw['cwd'] = kw.get('cwd', self.TRANSLATIONS)
|
kw['cwd'] = kw.get('cwd', self.TRANSLATIONS)
|
||||||
if hasattr(cmd, 'format'):
|
if hasattr(cmd, 'format'):
|
||||||
cmd = shlex.split(cmd)
|
cmd = shlex.split(cmd)
|
||||||
cmd = [os.environ.get('TX', 'tx')] + cmd
|
cmd = [tx_exe()] + cmd
|
||||||
self.info(' '.join(cmd))
|
self.info(' '.join(cmd))
|
||||||
return subprocess.check_call(cmd, **kw)
|
return subprocess.check_call(cmd, **kw)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user