summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-09-26 19:38:49 +0200
committerWojtek Kosior <koszko@koszko.org>2022-09-28 14:03:18 +0200
commited85c1ce79b2a562f27649e3a2abd518e507ad62 (patch)
tree6877e460af51d8f12d9645bcb1988fc3a914300b
parentc85b25dea8e526eee3c2baa4fec8d1aab6fe976e (diff)
downloadhaketilo-hydrilla-ed85c1ce79b2a562f27649e3a2abd518e507ad62.tar.gz
haketilo-hydrilla-ed85c1ce79b2a562f27649e3a2abd518e507ad62.zip
[proxy] make web UI messages regarding item's status more precise
-rw-r--r--src/hydrilla/locales/en_US/LC_MESSAGES/messages.po225
-rw-r--r--src/hydrilla/proxy/web_ui/items.py5
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja13
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja6
-rw-r--r--src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja4
5 files changed, 142 insertions, 111 deletions
diff --git a/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po b/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po
index 29fabc6..4e2af8e 100644
--- a/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po
+++ b/src/hydrilla/locales/en_US/LC_MESSAGES/messages.po
@@ -7,81 +7,81 @@ msgid ""
msgstr ""
"Project-Id-Version: hydrilla 2.0\n"
"Report-Msgid-Bugs-To: koszko@koszko.org\n"
-"POT-Creation-Date: 2022-09-12 13:44+0200\n"
+"POT-Creation-Date: 2022-09-26 19:35+0200\n"
"PO-Revision-Date: 2022-02-12 00:00+0000\n"
"Last-Translator: Wojtek Kosior <koszko@koszko.org>\n"
"Language: en_US\n"
"Language-Team: en_US <koszko@koszko.org>\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 2.10.3\n"
+"Generated-By: Babel 2.9.0\n"
-#: src/hydrilla/builder/build.py:82 src/hydrilla/builder/local_apt.py:116
-#: src/hydrilla/builder/local_apt.py:410
+#: src/hydrilla/builder/build.py:83 src/hydrilla/builder/local_apt.py:117
+#: src/hydrilla/builder/local_apt.py:411
msgid "couldnt_execute_{}_is_it_installed"
msgstr "Could not execute '{}'. Is the tool installed and reachable via PATH?"
-#: src/hydrilla/builder/build.py:86 src/hydrilla/builder/local_apt.py:120
-#: src/hydrilla/builder/local_apt.py:414
+#: src/hydrilla/builder/build.py:87 src/hydrilla/builder/local_apt.py:121
+#: src/hydrilla/builder/local_apt.py:415
msgid "command_{}_failed"
msgstr "The following command finished execution with a non-zero exit status: {}"
-#: src/hydrilla/builder/build.py:193
+#: src/hydrilla/builder/build.py:194
msgid "path_contains_double_dot_{}"
msgstr ""
"Attempt to load '{}' which includes a forbidden parent reference ('..') "
"in the path."
-#: src/hydrilla/builder/build.py:200
+#: src/hydrilla/builder/build.py:201
msgid "loading_{}_outside_package_dir"
msgstr "Attempt to load '{}' which lies outside package source directory."
-#: src/hydrilla/builder/build.py:204
+#: src/hydrilla/builder/build.py:205
msgid "loading_reserved_index_json"
msgstr "Attempt to load 'index.json' which is a reserved filename."
-#: src/hydrilla/builder/build.py:211
+#: src/hydrilla/builder/build.py:212
msgid "referenced_file_{}_missing"
msgstr "Referenced file '{}' is missing."
-#: src/hydrilla/builder/build.py:387
+#: src/hydrilla/builder/build.py:388
msgid "report_spdx_not_in_copyright_list"
msgstr ""
"Told to generate 'report.spdx' but 'report.spdx' is not listed among "
"copyright files. Refusing to proceed."
-#: src/hydrilla/builder/build.py:464
+#: src/hydrilla/builder/build.py:465
msgid "build_package_from_srcdir_to_dstdir"
msgstr ""
"Build Hydrilla package from `scrdir` and write the resulting files under "
"`dstdir`."
-#: src/hydrilla/builder/build.py:466
+#: src/hydrilla/builder/build.py:467
msgid "source_directory_to_build_from"
msgstr "Source directory to build from."
-#: src/hydrilla/builder/build.py:468
+#: src/hydrilla/builder/build.py:469
msgid "path_instead_of_index_json"
msgstr ""
"Path to file to be processed instead of index.json (if not absolute, "
"resolved relative to srcdir)."
-#: src/hydrilla/builder/build.py:470
+#: src/hydrilla/builder/build.py:471
msgid "path_instead_for_piggyback_files"
msgstr ""
"Path to a non-standard directory with foreign packages' archive files to "
"use."
-#: src/hydrilla/builder/build.py:472
+#: src/hydrilla/builder/build.py:473
msgid "built_package_files_destination"
msgstr "Destination directory to write built package files to."
-#: src/hydrilla/builder/build.py:474
-#: src/hydrilla/mitmproxy_launcher/launch.py:58
-#: src/hydrilla/server/serve.py:202 src/hydrilla/server/serve.py:220
-#: src/hydrilla/server/serve.py:260
+#: src/hydrilla/builder/build.py:475
+#: src/hydrilla/mitmproxy_launcher/launch.py:59
+#: src/hydrilla/server/serve.py:203 src/hydrilla/server/serve.py:221
+#: src/hydrilla/server/serve.py:261
#, python-format
msgid "%(prog)s_%(version)s_license"
msgstr ""
@@ -92,79 +92,79 @@ msgstr ""
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law."
-#: src/hydrilla/builder/build.py:475 src/hydrilla/server/serve.py:221
-#: src/hydrilla/server/serve.py:261
+#: src/hydrilla/builder/build.py:476 src/hydrilla/server/serve.py:222
+#: src/hydrilla/server/serve.py:262
msgid "version_printing"
msgstr "Print version information and exit."
-#: src/hydrilla/builder/common_errors.py:60
+#: src/hydrilla/builder/common_errors.py:61
msgid "STDOUT_OUTPUT_heading"
msgstr "## Command's standard output ##"
-#: src/hydrilla/builder/common_errors.py:63
+#: src/hydrilla/builder/common_errors.py:64
msgid "STDERR_OUTPUT_heading"
msgstr "## Command's standard error output ##"
-#: src/hydrilla/builder/local_apt.py:146
+#: src/hydrilla/builder/local_apt.py:147
msgid "distro_{}_unknown"
msgstr "Attempt to use an unknown software distribution '{}'."
-#: src/hydrilla/builder/local_apt.py:190
+#: src/hydrilla/builder/local_apt.py:191
msgid "couldnt_import_{}_is_it_installed"
msgstr ""
"Could not import '{}'. Is the module installed and visible to this Python"
" instance?"
-#: src/hydrilla/builder/local_apt.py:198
+#: src/hydrilla/builder/local_apt.py:199
msgid "gpg_couldnt_recv_key_{}"
msgstr "Could not import PGP key '{}'."
-#: src/hydrilla/builder/local_apt.py:313
+#: src/hydrilla/builder/local_apt.py:314
msgid "apt_install_output_not_understood"
msgstr "The output of an 'apt-get install' command was not understood."
-#: src/hydrilla/builder/local_apt.py:339
+#: src/hydrilla/builder/local_apt.py:340
msgid "apt_download_gave_bad_filename_{}"
msgstr "The 'apt-get download' command produced a file with unexpected name '{}'."
-#: src/hydrilla/builder/piggybacking.py:104
+#: src/hydrilla/builder/piggybacking.py:105
msgid "loading_{}_outside_piggybacked_dir"
msgstr ""
"Attempt to load '{}' which lies outside piggybacked packages files root "
"directory."
-#: src/hydrilla/item_infos.py:90
+#: src/hydrilla/item_infos.py:91
msgid "err.item_info.filename_invalid_{}"
msgstr "Item definition conatains an illegal path: {}"
-#: src/hydrilla/item_infos.py:481
+#: src/hydrilla/item_infos.py:482
#, python-brace-format
msgid "uuid_mismatch_{identifier}"
msgstr "Two different uuids were specified for item '{identifier}'."
-#: src/hydrilla/json_instances.py:86
+#: src/hydrilla/json_instances.py:87
msgid "bad_json_comment_line_{line_num}_char_{char_num}"
msgstr ""
"JSON document contains an invalid comment at line {line_num}, char "
"{char_num}."
-#: src/hydrilla/json_instances.py:137
+#: src/hydrilla/json_instances.py:138
msgid "unknown_schema_{}"
msgstr "JSON document declares its schema as '{}' which is not a known schema."
-#: src/hydrilla/json_instances.py:188
+#: src/hydrilla/json_instances.py:189
msgid "err.util.text_in_{}_not_valid_json"
msgstr "Not a valid JSON file: {}"
-#: src/hydrilla/json_instances.py:191
+#: src/hydrilla/json_instances.py:192
msgid "err.util.text_not_valid_json"
msgstr "Not a valid JSON file."
-#: src/hydrilla/json_instances.py:206
+#: src/hydrilla/json_instances.py:207
msgid "no_schema_number_in_instance"
msgstr "JSON schema number is missing from a document."
-#: src/hydrilla/mitmproxy_launcher/launch.py:51
+#: src/hydrilla/mitmproxy_launcher/launch.py:52
msgid "cli_help.haketilo"
msgstr ""
"Run Haketilo proxy.\n"
@@ -172,46 +172,46 @@ msgstr ""
"This command starts Haketilo as a local HTTP proxy which a web browser "
"can then use."
-#: src/hydrilla/mitmproxy_launcher/launch.py:53
+#: src/hydrilla/mitmproxy_launcher/launch.py:54
msgid "cli_opt.haketilo.port"
msgstr "TCP port number the proxy should listen on (1-65535)."
-#: src/hydrilla/mitmproxy_launcher/launch.py:56
+#: src/hydrilla/mitmproxy_launcher/launch.py:57
msgid "cli_opt.haketilo.dir"
msgstr "Data directory for Haketilo to use."
-#: src/hydrilla/mitmproxy_launcher/launch.py:59
+#: src/hydrilla/mitmproxy_launcher/launch.py:60
msgid "cli_opt.haketilo.version"
msgstr "Print version information and exit"
-#: src/hydrilla/proxy/addon.py:110
+#: src/hydrilla/proxy/addon.py:111
msgid "haketilo_dir_already_configured"
msgstr ""
"Attempt was made to configure Haketilo Mitmproxy addon with data "
"directory path but it has already been configured."
-#: src/hydrilla/proxy/addon.py:165
+#: src/hydrilla/proxy/addon.py:166
msgid "err.proxy.unknown_error_{}_try_again"
msgstr ""
"Haketilo experienced an error. Try again.\n"
"\n"
"{}"
-#: src/hydrilla/proxy/policies/payload_resource.py:88
+#: src/hydrilla/proxy/policies/payload_resource.py:89
msgid "api.file_not_found"
msgstr "Requested file could not be found."
-#: src/hydrilla/proxy/policies/payload_resource.py:124
+#: src/hydrilla/proxy/policies/payload_resource.py:125
msgid "api.resource_not_enabled_for_access"
msgstr "Requested resource is not enabled for access."
-#: src/hydrilla/proxy/state_impl/concrete_state.py:121
+#: src/hydrilla/proxy/state_impl/concrete_state.py:122
msgid "err.proxy.unknown_db_schema"
msgstr ""
"Haketilo's data files have been altered, possibly by a newer version of "
"Haketilo."
-#: src/hydrilla/proxy/state_impl/concrete_state.py:125
+#: src/hydrilla/proxy/state_impl/concrete_state.py:126
msgid "err.proxy.no_sqlite_foreign_keys"
msgstr ""
"This installation of Haketilo uses an SQLite version which does not "
@@ -295,19 +295,19 @@ msgstr "Couldn't communicate with repository."
msgid "web_ui.items.single_version.version_{}"
msgstr "Version '{}'."
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:71
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:76
msgid "web_ui.items.single_version.retry_install_button"
msgstr "Retry installation"
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:75
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:80
msgid "web_ui.items.single_version.leave_uninstalled_button"
msgstr "Leave uninstalled"
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:79
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:84
msgid "web_ui.items.single_version.install_button"
msgstr "Install"
-#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:80
+#: src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja:85
msgid "web_ui.items.single_version.uninstall_button"
msgstr "Uninstall"
@@ -346,24 +346,29 @@ msgstr "Library '{}'"
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:42
msgid "web_ui.items.single_version.library.item_required"
msgstr ""
-"This library version is required by an enabled mapping. It cannot be "
+"This library version is required by an enabled package. It cannot be "
"uninstalled."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:46
msgid "web_ui.items.single_version.library.item_auto_activated"
msgstr ""
-"This library version is used by a package which can be activated "
+"This library version is used by some package. The package has not been "
+"explicitly configured by the user but is going to be activated "
"automatically."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:50
msgid "web_ui.items.single_version.library.item_not_activated"
-msgstr "This library version is not used by any active package."
+msgstr "This library version is not used by any package enabled by the user."
#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:54
+msgid "web_ui.items.single_version.library.item_will_be_asked_about"
+msgstr "This library version is not used by any package enabled by the user."
+
+#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:58
msgid "web_ui.items.single_version.library.install_failed"
msgstr "Couldn't install this library version."
-#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:58
+#: src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja:62
msgid "web_ui.items.single_version.library.version_list_heading"
msgstr "Other available versions of the library"
@@ -421,95 +426,103 @@ msgstr "This package version is required. It cannot be uninstalled."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:46
msgid "web_ui.items.single_version.package.item_auto_activated"
-msgstr "This package version can be activated automatically."
+msgstr ""
+"This package version has not been explicitly enabled but it is going to "
+"be used automatically."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:50
msgid "web_ui.items.single_version.package.item_not_activated"
-msgstr "This package version is not active."
+msgstr "This package version is not enabled."
#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:54
+msgid "web_ui.items.single_version.package.item_will_be_asked_about"
+msgstr ""
+"This package version is not currently enabled. You will be asked whether "
+"to enable it when you visit a website where it can be used."
+
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:58
msgid "web_ui.items.single_version.package.install_failed"
msgstr "Couldn't install this package version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:58
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:62
msgid "web_ui.items.single_version.package.version_list_heading"
msgstr "Other available versions of the package"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:72
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:76
msgid "web_ui.items.single_version.unenable_button"
msgstr "Forget"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:73
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:77
msgid "web_ui.items.single_version.disable_button"
msgstr "Disable"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:74
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:78
msgid "web_ui.items.single_version.enable_button"
msgstr "Enable"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:79
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:83
msgid "web_ui.items.single_version.item_not_marked"
msgstr "The package isn't enabled."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:82
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:86
msgid "web_ui.items.single_version.item_disabled"
msgstr "All versions of the package have been explicitly disabled by the user."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:86
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:90
msgid "web_ui.items.single_version.item_enabled"
msgstr "The package has been enabled by the user."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:105
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:109
msgid "web_ui.items.single_version.unpin_button"
msgstr "Unpin"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:110
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:114
msgid "web_ui.items.single_version.not_pinned"
msgstr "The package is not pinned to any version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:115
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:119
msgid "web_ui.items.single_version.pinned_repo_local"
msgstr "The package is pinned to only use locally installed versions."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:118
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:122
msgid "web_ui.items.single_version.pinned_repo_{}"
msgstr "The package is pinned to only use versions from repository '{}'."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:129
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:133
msgid "web_ui.items.single_version.pin_local_repo_button"
msgstr "Pin to local packages"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:134
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:147
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:138
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:151
msgid "web_ui.items.single_version.pin_repo_button"
msgstr "Pin to repository"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:141
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:145
msgid "web_ui.items.single_version.repin_repo_button"
msgstr "Pin to this repository"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:155
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:166
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:159
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:170
msgid "web_ui.items.single_version.pin_ver_button"
msgstr "Pin to this version"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:158
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:162
msgid "web_ui.items.single_version.pinned_ver"
msgstr "The package is pinned to this version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:161
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:165
msgid "web_ui.items.single_version.repin_ver_button"
msgstr "Pin to this version"
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:163
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:167
msgid "web_ui.items.single_version.pinned_other_ver"
msgstr "The package is pinned to a different version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:171
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:175
msgid "web_ui.items.single_version.active_ver_is_this_one"
msgstr "This is the currently active version."
-#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:175
+#: src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja:179
msgid "web_ui.items.single_version.active_ver_is_{}"
msgstr "Currently active version is '{}'."
@@ -857,53 +870,53 @@ msgstr "Block JavaScript"
msgid "web_ui.rules.single.remove_button"
msgstr "Remove rule"
-#: src/hydrilla/server/malcontent.py:79
+#: src/hydrilla/server/malcontent.py:80
msgid "err.server.malcontent_path_not_dir_{}"
msgstr "Provided 'malcontent_dir' path does not name a directory: {}"
-#: src/hydrilla/server/malcontent.py:98
+#: src/hydrilla/server/malcontent.py:99
msgid "err.server.couldnt_load_item_from_{}"
msgstr "Couldn't load item from {}."
-#: src/hydrilla/server/malcontent.py:111
+#: src/hydrilla/server/malcontent.py:112
msgid "err.server.no_file_{required_by}_{ver}_{file}_{sha256}"
msgstr ""
"'{required_by}', version '{ver}' uses a file named {file} with SHA256 "
"hash of {sha256}, but the file is missing."
-#: src/hydrilla/server/malcontent.py:135
+#: src/hydrilla/server/malcontent.py:136
msgid "err.server.item_{item}_in_file_{file}"
msgstr "Item {item} incorrectly present under {file}."
-#: src/hydrilla/server/malcontent.py:141
+#: src/hydrilla/server/malcontent.py:142
msgid "item_version_{ver}_in_file_{file}"
msgstr "Item version {ver} incorrectly present under {file}."
-#: src/hydrilla/server/malcontent.py:168
+#: src/hydrilla/server/malcontent.py:169
msgid "err.server.no_dep_{resource}_{ver}_{dep}"
msgstr "Unknown dependency '{dep}' of resource '{resource}', version '{ver}'."
-#: src/hydrilla/server/malcontent.py:183
+#: src/hydrilla/server/malcontent.py:184
msgid "err.server.no_payload_{mapping}_{ver}_{payload}"
msgstr "Unknown payload '{payload}' of mapping '{mapping}', version '{ver}'."
-#: src/hydrilla/server/malcontent.py:198
+#: src/hydrilla/server/malcontent.py:199
msgid "err.server.no_mapping_{required_by}_{ver}_{required}"
msgstr "Unknown mapping '{required}' required by '{required_by}', version '{ver}'."
-#: src/hydrilla/server/malcontent.py:226
+#: src/hydrilla/server/malcontent.py:227
msgid "server.err.couldnt_register_{mapping}_{ver}_{pattern}"
msgstr ""
"Couldn't register mapping '{mapping}', version '{ver}' (pattern "
"'{pattern}')."
-#: src/hydrilla/server/serve.py:83
+#: src/hydrilla/server/serve.py:84
msgid "err.server.opt_hydrilla_parent_not_implemented"
msgstr ""
"Hydrilla was told to connect to a parent Hydrilla server but this feature"
" is not yet implemented."
-#: src/hydrilla/server/serve.py:208
+#: src/hydrilla/server/serve.py:209
msgid "serve_hydrilla_packages_explain_wsgi_considerations"
msgstr ""
"Serve Hydrilla packages.\n"
@@ -912,36 +925,36 @@ msgstr ""
"Hydrilla instance. For better performance, consider deployment using "
"WSGI."
-#: src/hydrilla/server/serve.py:211
+#: src/hydrilla/server/serve.py:212
msgid "directory_to_serve_from_overrides_config"
msgstr ""
"Directory to serve files from. Overrides value from the config file (if "
"any)."
-#: src/hydrilla/server/serve.py:213
+#: src/hydrilla/server/serve.py:214
msgid "project_url_to_display_overrides_config"
msgstr ""
"Project url to display on generated HTML pages. Overrides value from the "
"config file (if any)."
-#: src/hydrilla/server/serve.py:215
+#: src/hydrilla/server/serve.py:216
msgid "tcp_port_to_listen_on_overrides_config"
msgstr ""
"TCP port number to listen on (0-65535). Overrides value from the config "
"file (if any)."
-#: src/hydrilla/server/serve.py:218
+#: src/hydrilla/server/serve.py:219
msgid "path_to_config_file_explain_default"
msgstr ""
"Path to Hydrilla server configuration file (optional, by default Hydrilla"
" loads its own config file, which in turn tries to load "
"/etc/hydrilla/config.json)."
-#: src/hydrilla/server/serve.py:250
+#: src/hydrilla/server/serve.py:251
msgid "config_option_{}_not_supplied"
msgstr "Missing configuration option '{}'."
-#: src/hydrilla/server/serve.py:254
+#: src/hydrilla/server/serve.py:255
msgid "serve_hydrilla_packages_wsgi_help"
msgstr ""
"Serve Hydrilla packages.\n"
@@ -950,39 +963,39 @@ msgstr ""
"HTTP server like Apache2 or Nginx. You can configure Hydrilla through the"
" /etc/hydrilla/config.json file."
-#: src/hydrilla/url_patterns.py:135
+#: src/hydrilla/url_patterns.py:136
msgid "err.url_pattern_{}.bad"
msgstr "Not a valid Haketilo URL pattern: {}"
-#: src/hydrilla/url_patterns.py:138
+#: src/hydrilla/url_patterns.py:139
msgid "err.url_{}.bad"
msgstr "Not a valid URL: {}"
-#: src/hydrilla/url_patterns.py:145
+#: src/hydrilla/url_patterns.py:146
msgid "err.url_pattern_{}.bad_scheme"
msgstr "URL pattern has an unknown scheme: {}"
-#: src/hydrilla/url_patterns.py:148
+#: src/hydrilla/url_patterns.py:149
msgid "err.url_{}.bad_scheme"
msgstr "URL has an unknown scheme: {}"
-#: src/hydrilla/url_patterns.py:153
+#: src/hydrilla/url_patterns.py:154
msgid "err.url_pattern_{}.special_scheme_port"
msgstr "URL pattern has an explicit port while it shouldn't: {}"
-#: src/hydrilla/url_patterns.py:165
+#: src/hydrilla/url_patterns.py:166
msgid "err.url_pattern_{}.bad_port"
msgstr "URL pattern has a port outside of allowed range (1-65535): {}"
-#: src/hydrilla/url_patterns.py:168
+#: src/hydrilla/url_patterns.py:169
msgid "err.url_{}.bad_port"
msgstr "URL has a port outside of allowed range (1-65535): {}"
-#: src/hydrilla/url_patterns.py:189
+#: src/hydrilla/url_patterns.py:190
msgid "err.url_pattern_{}.has_query"
msgstr "URL pattern has a query string while it shouldn't: {}"
-#: src/hydrilla/url_patterns.py:193
+#: src/hydrilla/url_patterns.py:194
msgid "err.url_pattern_{}.has_frag"
msgstr "URL pattern has a fragment string while it shouldn't: {}"
diff --git a/src/hydrilla/proxy/web_ui/items.py b/src/hydrilla/proxy/web_ui/items.py
index 13d0cde..ec394ee 100644
--- a/src/hydrilla/proxy/web_ui/items.py
+++ b/src/hydrilla/proxy/web_ui/items.py
@@ -158,8 +158,10 @@ def show_item_version(
item_type: item_infos.ItemType,
errors: t.Mapping[str, bool] = {}
) -> werkzeug.Response:
+ state = _app.get_haketilo_state()
+
try:
- store = item_version_store(_app.get_haketilo_state(), item_type)
+ store = item_version_store(state, item_type)
version_ref = store.get(item_version_id)
display_info = version_ref.get_item_display_info()
@@ -175,6 +177,7 @@ def show_item_version(
f'items/{item_type.alt_name}_viewversion.html.jinja',
display_info = display_info,
version_display_info = this_info,
+ settings = state.get_settings(),
**errors
)
return flask.make_response(html, 200)
diff --git a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
index 569d46e..952c6b7 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/item_viewversion.html.jinja
@@ -55,11 +55,16 @@ code in a proprietary work, I am not going to enforce this in court.
<p>
{% if version_display_info.active == ActiveStatus.REQUIRED %}
{% block item_required_msg required %}{% endblock %}
- {% elif version_display_info.active == ActiveStatus.AUTO %}
- {% block item_auto_activated_msg required %}{% endblock %}
- {% else %}
- {# version_display_info.active == ActiveStatus.NOT_ACTIVE #}
+ {%
+ elif version_display_info.active == ActiveStatus.NOT_ACTIVE or
+ settings.mapping_use_mode == MappingUseMode.WHEN_ENABLED
+ %}
{% block item_not_activated_msg required %}{% endblock %}
+ {% elif settings.mapping_use_mode == MappingUseMode.QUESTION %}
+ {% block item_will_be_asked_about_msg required %}{% endblock %}
+ {% else %}
+ {# settings.mapping_use_mode == MappingUseMode.AUTO #}
+ {% block item_auto_activated_msg required %}{% endblock %}
{% endif %}
</p>
diff --git a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja
index a1066b3..f1d1b74 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/library_viewversion.html.jinja
@@ -50,6 +50,10 @@ code in a proprietary work, I am not going to enforce this in court.
{{ _('web_ui.items.single_version.library.item_not_activated') }}
{% endblock %}
+{% block item_will_be_asked_about_msg %}
+ {{ _('web_ui.items.single_version.library.item_will_be_asked_about') }}
+{% endblock %}
+
{% block item_install_failed_msg %}
{{ _('web_ui.items.single_version.library.install_failed') }}
{% endblock %}
@@ -62,4 +66,6 @@ code in a proprietary work, I am not going to enforce this in court.
<p>
TODO: add more info...
</p>
+
+ <div class="horizontal-separator"></div>
{% endblock %}
diff --git a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
index 112ebc3..04caf8c 100644
--- a/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
+++ b/src/hydrilla/proxy/web_ui/templates/items/package_viewversion.html.jinja
@@ -50,6 +50,10 @@ code in a proprietary work, I am not going to enforce this in court.
{{ _('web_ui.items.single_version.package.item_not_activated') }}
{% endblock %}
+{% block item_will_be_asked_about_msg %}
+ {{ _('web_ui.items.single_version.package.item_will_be_asked_about') }}
+{% endblock %}
+
{% block item_install_failed_msg %}
{{ _('web_ui.items.single_version.package.install_failed') }}
{% endblock %}