mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
Merge branch 'plural' into 'master'
Correct plurals See merge request fdroid/fdroidserver!334
This commit is contained in:
commit
c7d45b9515
2 changed files with 13 additions and 6 deletions
|
|
@ -31,6 +31,7 @@ import tempfile
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import logging
|
import logging
|
||||||
|
from gettext import ngettext
|
||||||
|
|
||||||
from . import _
|
from . import _
|
||||||
from . import common
|
from . import common
|
||||||
|
|
@ -523,9 +524,12 @@ def build_local(app, build, vcs, build_dir, output_dir, log_dir, srclib_dir, ext
|
||||||
count = scanner.scan_source(build_dir, build)
|
count = scanner.scan_source(build_dir, build)
|
||||||
if count > 0:
|
if count > 0:
|
||||||
if force:
|
if force:
|
||||||
logging.warn('Scanner found %d problems' % count)
|
logging.warning(ngettext('Scanner found {} problem',
|
||||||
|
'Scanner found {} problems', count).format(count))
|
||||||
else:
|
else:
|
||||||
raise BuildException("Can't build due to %d errors while scanning" % count)
|
raise BuildException(ngettext(
|
||||||
|
"Can't build due to {} error while scanning",
|
||||||
|
"Can't build due to {} errors while scanning", count).format(count))
|
||||||
|
|
||||||
if not options.notarball:
|
if not options.notarball:
|
||||||
# Build the source tarball right before we build the release...
|
# Build the source tarball right before we build the release...
|
||||||
|
|
@ -1319,9 +1323,11 @@ def main():
|
||||||
|
|
||||||
logging.info(_("Finished"))
|
logging.info(_("Finished"))
|
||||||
if len(build_succeeded) > 0:
|
if len(build_succeeded) > 0:
|
||||||
logging.info(str(len(build_succeeded)) + ' builds succeeded')
|
logging.info(ngettext("{} build succeeded",
|
||||||
|
"{} builds succeeded", len(build_succeeded)).format(len(build_succeeded)))
|
||||||
if len(failed_apps) > 0:
|
if len(failed_apps) > 0:
|
||||||
logging.info(str(len(failed_apps)) + ' builds failed')
|
logging.info(ngettext("{} build failed",
|
||||||
|
"{} builds failed", len(failed_apps)).format(len(failed_apps)))
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,7 @@ import glob
|
||||||
import hashlib
|
import hashlib
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
import logging
|
import logging
|
||||||
|
from gettext import ngettext
|
||||||
|
|
||||||
from . import _
|
from . import _
|
||||||
from . import common
|
from . import common
|
||||||
|
|
@ -99,8 +100,8 @@ def main():
|
||||||
logging.error(_("There is a keyalias collision - publishing halted"))
|
logging.error(_("There is a keyalias collision - publishing halted"))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
allaliases.append(keyalias)
|
allaliases.append(keyalias)
|
||||||
logging.info("{0} apps, {0} key aliases".format(len(allapps),
|
logging.info(ngettext('{0} app, {1} key aliases',
|
||||||
len(allaliases)))
|
'{0} apps, {1} key aliases', len(allapps)).format(len(allapps), len(allaliases)))
|
||||||
|
|
||||||
# Process any APKs or ZIPs that are waiting to be signed...
|
# Process any APKs or ZIPs that are waiting to be signed...
|
||||||
for apkfile in sorted(glob.glob(os.path.join(unsigned_dir, '*.apk'))
|
for apkfile in sorted(glob.glob(os.path.join(unsigned_dir, '*.apk'))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue