From 5e1377c77a11c3d3089e3b3378fcca98d98c37a8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Thu, 1 Oct 2020 11:28:09 +0200 Subject: [PATCH] standardize on "Application ID" in UI text --- fdroidserver/build.py | 2 +- fdroidserver/checkupdates.py | 2 +- fdroidserver/common.py | 2 +- fdroidserver/install.py | 2 +- fdroidserver/lint.py | 4 +-- fdroidserver/metadata.py | 6 +++-- fdroidserver/publish.py | 2 +- fdroidserver/rewritemeta.py | 2 +- fdroidserver/scanner.py | 2 +- fdroidserver/update.py | 6 ++--- fdroidserver/verify.py | 2 +- locale/fdroidserver.pot | 51 ++++++++++++++++++++++++++---------- 12 files changed, 54 insertions(+), 29 deletions(-) diff --git a/fdroidserver/build.py b/fdroidserver/build.py index b3d4cd54..96337813 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -873,7 +873,7 @@ def parse_commandline(): parser = argparse.ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]") common.setup_global_opts(parser) - parser.add_argument("appid", nargs='*', help=_("applicationId with optional versionCode in the form APPID[:VERCODE]")) + parser.add_argument("appid", nargs='*', help=_("application ID with optional versionCode in the form APPID[:VERCODE]")) parser.add_argument("-l", "--latest", action="store_true", default=False, help=_("Build only the latest version of each package")) parser.add_argument("-s", "--stop", action="store_true", default=False, diff --git a/fdroidserver/checkupdates.py b/fdroidserver/checkupdates.py index 52f1ceb4..3adc29af 100644 --- a/fdroidserver/checkupdates.py +++ b/fdroidserver/checkupdates.py @@ -599,7 +599,7 @@ def main(): # Parse command line... parser = ArgumentParser(usage="%(prog)s [options] [APPID [APPID ...]]") common.setup_global_opts(parser) - parser.add_argument("appid", nargs='*', help=_("applicationId to check for updates")) + parser.add_argument("appid", nargs='*', help=_("application ID of file to operate on")) parser.add_argument("--auto", action="store_true", default=False, help=_("Process auto-updates")) parser.add_argument("--autoonly", action="store_true", default=False, diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 610e0f74..82607ead 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1656,7 +1656,7 @@ def parse_androidmanifests(paths, app): max_version = "Unknown" if max_package: - msg = _("Invalid package name {0}").format(max_package) + msg = _("Invalid application ID {appid}").format(appid=max_package) if not is_valid_package_name(max_package): raise FDroidException(msg) elif not is_strict_application_id(max_package): diff --git a/fdroidserver/install.py b/fdroidserver/install.py index c4e4b7dd..0e50c27b 100644 --- a/fdroidserver/install.py +++ b/fdroidserver/install.py @@ -50,7 +50,7 @@ def main(): # Parse command line... parser = ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]") common.setup_global_opts(parser) - parser.add_argument("appid", nargs='*', help=_("applicationId with optional versionCode in the form APPID[:VERCODE]")) + parser.add_argument("appid", nargs='*', help=_("application ID with optional versionCode in the form APPID[:VERCODE]")) parser.add_argument("-a", "--all", action="store_true", default=False, help=_("Install all signed applications available")) options = parser.parse_args() diff --git a/fdroidserver/lint.py b/fdroidserver/lint.py index f94d0e28..41d38551 100644 --- a/fdroidserver/lint.py +++ b/fdroidserver/lint.py @@ -278,7 +278,7 @@ def check_old_links(app): def check_useless_fields(app): if app.UpdateCheckName == app.id: - yield _("Update Check Name is set to the known app id - it can be removed") + yield _("UpdateCheckName is set to the known application ID, it can be removed") filling_ucms = re.compile(r'^(Tags.*|RepoManifest.*)') @@ -575,7 +575,7 @@ def main(): parser.add_argument('--force-yamllint', action="store_true", default=False, help=_("When linting the entire repository yamllint is disabled by default. " "This option forces yamllint regardless.")) - parser.add_argument("appid", nargs='*', help=_("applicationId in the form APPID")) + parser.add_argument("appid", nargs='*', help=_("application ID of file to operate on")) metadata.add_metadata_arguments(parser) options = parser.parse_args() metadata.warnings_action = options.W diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index d93d8b91..79195289 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -1189,11 +1189,13 @@ class DescriptionResolver: if appid in self.apps: if self.apps[appid].Name: return "fdroid.app:" + appid, self.apps[appid].Name - raise MetaDataException("Cannot resolve app id " + appid) + raise MetaDataException(_('Cannot resolve application ID {appid}') + .format(appid=appid)) class DummyDescriptionResolver(DescriptionResolver): def resolve_description_link(self, appid): if appid in self.apps: return "fdroid.app:" + appid, "Dummy name - don't know yet" - _warn_or_exception(_("Cannot resolve app id {appid}").format(appid=appid)) + _warn_or_exception(_('Cannot resolve application ID {appid}') + .format(appid=appid)) diff --git a/fdroidserver/publish.py b/fdroidserver/publish.py index 50492fe2..41d70300 100644 --- a/fdroidserver/publish.py +++ b/fdroidserver/publish.py @@ -225,7 +225,7 @@ def main(): "[APPID[:VERCODE] [APPID[:VERCODE] ...]]") common.setup_global_opts(parser) parser.add_argument("appid", nargs='*', - help=_("applicationId with optional versionCode in the form APPID[:VERCODE]")) + help=_("application ID with optional versionCode in the form APPID[:VERCODE]")) metadata.add_metadata_arguments(parser) options = parser.parse_args() metadata.warnings_action = options.W diff --git a/fdroidserver/rewritemeta.py b/fdroidserver/rewritemeta.py index 5b1c1927..3b89e6bf 100644 --- a/fdroidserver/rewritemeta.py +++ b/fdroidserver/rewritemeta.py @@ -54,7 +54,7 @@ def main(): common.setup_global_opts(parser) parser.add_argument("-l", "--list", action="store_true", default=False, help=_("List files that would be reformatted")) - parser.add_argument("appid", nargs='*', help=_("applicationId in the form APPID")) + parser.add_argument("appid", nargs='*', help=_("application ID of file to operate on")) metadata.add_metadata_arguments(parser) options = parser.parse_args() metadata.warnings_action = options.W diff --git a/fdroidserver/scanner.py b/fdroidserver/scanner.py index 8b1a31cf..2757526c 100644 --- a/fdroidserver/scanner.py +++ b/fdroidserver/scanner.py @@ -373,7 +373,7 @@ def main(): # Parse command line... parser = ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]") common.setup_global_opts(parser) - parser.add_argument("appid", nargs='*', help=_("applicationId with optional versionCode in the form APPID[:VERCODE]")) + parser.add_argument("appid", nargs='*', help=_("application ID with optional versionCode in the form APPID[:VERCODE]")) parser.add_argument("-f", "--force", action="store_true", default=False, help=_("Force scan of disabled apps and builds.")) parser.add_argument("--json", action="store_true", default=False, diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 5936e502..0849442b 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1356,7 +1356,7 @@ def scan_apk(apk_file): raise BuildException(_("{appid} from {path} is not a valid Java Package Name!") .format(appid=apk['packageName'], path=apk_file)) elif not common.is_strict_application_id(apk['packageName']): - logging.warning(_("{appid} from {path} is not a valid Android Package Name!") + logging.warning(_("{appid} from {path} is not a valid Android application ID!") .format(appid=apk['packageName'], path=apk_file)) # Get the signature, or rather the signing key fingerprints @@ -2126,7 +2126,7 @@ def create_metadata_from_template(apk): metatxt, flags=re.IGNORECASE | re.MULTILINE) else: - logging.warning(_('{appid} does not have a name! Using package name instead.') + logging.warning(_('{appid} does not have a name! Using application ID instead.') .format(appid=apk['packageName'])) metatxt = re.sub(r'^(((Auto)?Name|Summary):).*$', r'\1 ' + apk['packageName'], @@ -2152,7 +2152,7 @@ def create_metadata_from_template(apk): if 'name' in apk and apk['name'] != '': app['Name'] = apk['name'] else: - logging.warning(_('{appid} does not have a name! Using package name instead.') + logging.warning(_('{appid} does not have a name! Using application ID instead.') .format(appid=apk['packageName'])) app['Name'] = apk['packageName'] with open(os.path.join('metadata', apk['packageName'] + '.yml'), 'w') as f: diff --git a/fdroidserver/verify.py b/fdroidserver/verify.py index bd1433d2..664d06d4 100644 --- a/fdroidserver/verify.py +++ b/fdroidserver/verify.py @@ -121,7 +121,7 @@ def main(): # Parse command line... parser = ArgumentParser(usage="%(prog)s [options] [APPID[:VERCODE] [APPID[:VERCODE] ...]]") common.setup_global_opts(parser) - parser.add_argument("appid", nargs='*', help=_("applicationId with optional versionCode in the form APPID[:VERCODE]")) + parser.add_argument("appid", nargs='*', help=_("application ID with optional versionCode in the form APPID[:VERCODE]")) parser.add_argument("--reuse-remote-apk", action="store_true", default=False, help=_("Verify against locally cached copy rather than redownloading.")) parser.add_argument("--output-json", action="store_true", default=False, diff --git a/locale/fdroidserver.pot b/locale/fdroidserver.pot index 7c621b18..dbe2eebd 100644 --- a/locale/fdroidserver.pot +++ b/locale/fdroidserver.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: fdroidserver 1.1-680-ge1d3de71\n" +"Project-Id-Version: fdroidserver 1.1-681-gc19e8952\n" "Report-Msgid-Bugs-To: https://gitlab.com/fdroid/fdroidserver/issues\n" -"POT-Creation-Date: 2020-10-01 12:34+0200\n" +"POT-Creation-Date: 2020-10-01 12:22+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -371,24 +371,15 @@ msgid_plural "Can't build due to {} errors while scanning" msgstr[0] "" msgstr[1] "" -#: ../fdroidserver/metadata.py -#, python-brace-format -msgid "Cannot find a packageName for {path}!" -msgstr "" - -#: ../fdroidserver/metadata.py -#, python-brace-format -msgid "Cannot find an appid for {path}!" -msgstr "" - #: ../fdroidserver/vmtools.py #, python-brace-format msgid "Cannot read \"{path}\"!" msgstr "" +#. Translators: https://developer.android.com/studio/build/application-id #: ../fdroidserver/metadata.py #, python-brace-format -msgid "Cannot resolve app id {appid}" +msgid "Cannot resolve application ID {appid}" msgstr "" #: ../fdroidserver/rewritemeta.py @@ -483,6 +474,7 @@ msgstr "" msgid "Could not parse size \"{size}\", wrong type \"{type}\"" msgstr "" +#. Translators: https://developer.android.com/studio/build/application-id #: ../fdroidserver/import.py msgid "Couldn't find Application ID" msgstr "" @@ -998,6 +990,11 @@ msgstr "" msgid "Invalid VercodeOperation: {field}" msgstr "" +#: ../fdroidserver/common.py +#, python-brace-format +msgid "Invalid application ID {appid}" +msgstr "" + #: ../fdroidserver/metadata.py #, python-format msgid "Invalid boolean '%s'" @@ -1864,8 +1861,9 @@ msgstr "" msgid "Unused scanignore path: %s" msgstr "" +#. Translators: https://developer.android.com/studio/build/application-id #: ../fdroidserver/lint.py -msgid "Update Check Name is set to the known app id - it can be removed" +msgid "Update Check Name is set to the known application ID - it can be removed" msgstr "" #: ../fdroid ../fdroidserver/__main__.py @@ -1899,6 +1897,10 @@ msgstr "" msgid "UpdateCheckData not a valid URL: {url}" msgstr "" +#: ../fdroidserver/lint.py +msgid "UpdateCheckName is set to the known application ID, it can be removed" +msgstr "" + #: ../fdroidserver/server.py #, python-brace-format msgid "Uploading {apkfilename} to androidobservatory.org" @@ -2045,6 +2047,17 @@ msgstr "" msgid "apksigner not found, it's required for signing!" msgstr "" +#: ../fdroidserver/lint.py ../fdroidserver/rewritemeta.py +#: ../fdroidserver/checkupdates.py +msgid "application ID of file to operate on" +msgstr "" + +#: ../fdroidserver/verify.py ../fdroidserver/publish.py +#: ../fdroidserver/build.py ../fdroidserver/scanner.py +#: ../fdroidserver/install.py +msgid "application ID with optional versionCode in the form APPID[:VERCODE]" +msgstr "" + #: ../fdroidserver/lint.py ../fdroidserver/rewritemeta.py msgid "applicationId in the form APPID" msgstr "" @@ -2538,6 +2551,11 @@ msgstr "" msgid "{apkfilename}'s AndroidManifest.xml has a bad date: " msgstr "" +#: ../fdroidserver/update.py +#, python-brace-format +msgid "{appid} does not have a name! Using application ID instead." +msgstr "" + #: ../fdroidserver/update.py #, python-brace-format msgid "{appid} does not have a name! Using package name instead." @@ -2548,6 +2566,11 @@ msgstr "" msgid "{appid} from {path} is not a valid Android Package Name!" msgstr "" +#: ../fdroidserver/update.py +#, python-brace-format +msgid "{appid} from {path} is not a valid Android application ID!" +msgstr "" + #: ../fdroidserver/metadata.py ../fdroidserver/update.py #, python-brace-format msgid "{appid} from {path} is not a valid Java Package Name!"