chiark / gitweb /
update: make all strings translatable
authorHans-Christoph Steiner <hans@eds.org>
Thu, 19 Oct 2017 19:03:39 +0000 (21:03 +0200)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 25 Oct 2017 21:01:25 +0000 (23:01 +0200)
fdroidserver/update.py

index 83018a753dfde47b0c98b7ca10f2da6f61fbf5e7..50c4d462a46ab3bf061bd1efb313e24b8db09111 100644 (file)
@@ -846,24 +846,24 @@ def insert_localized_app_metadata(apps):
             base, extension = common.get_extension(filename)
 
             if packageName not in apps:
-                logging.warning('Found "%s" graphic without metadata for app "%s"!'
-                                % (filename, packageName))
+                logging.warning(_('Found "{path}" graphic without metadata for app "{name}"!')
+                                .format(path=filename, name=packageName))
                 continue
             graphics = _get_localized_dict(apps[packageName], locale)
 
             if extension not in ALLOWED_EXTENSIONS:
-                logging.warning('Only PNG and JPEG are supported for graphics, found: ' + f)
+                logging.warning(_('Only PNG and JPEG are supported for graphics, found: {path}').format(path=f))
             elif base in GRAPHIC_NAMES:
                 # there can only be zero or one of these per locale
                 graphics[base] = filename
             elif screenshotdir in SCREENSHOT_DIRS:
                 # there can any number of these per locale
-                logging.debug('adding to ' + screenshotdir + ': ' + f)
+                logging.debug(_('adding to {name}: {path}').format(name=screenshotdir, path=f))
                 if screenshotdir not in graphics:
                     graphics[screenshotdir] = []
                 graphics[screenshotdir].append(filename)
             else:
-                logging.warning('Unsupported graphics file found: ' + f)
+                logging.warning(_('Unsupported graphics file found: {path}').format(path=f))
 
 
 def scan_repo_files(apkcache, repodir, knownapks, use_date_from_file=False):