diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2024-01-29 17:10:11 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-02-10 08:03:43 +0100 |
commit | 53898b8c37850bee241c74e2f617fb9cd49b3c69 (patch) | |
tree | 92ce0e09810806554a175057d0df549fd66c8748 /searx | |
parent | 7e1b5f6cc83491d98763f010ab9052529576257e (diff) | |
download | searxng-53898b8c37850bee241c74e2f617fb9cd49b3c69.tar.gz searxng-53898b8c37850bee241c74e2f617fb9cd49b3c69.zip |
[mod] footer: i18n for the link names in the footer
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx')
-rw-r--r-- | searx/searxng.msg | 6 | ||||
-rw-r--r-- | searx/settings.yml | 8 | ||||
-rw-r--r-- | searx/settings_defaults.py | 2 | ||||
-rw-r--r-- | searx/templates/simple/base.html | 4 |
4 files changed, 14 insertions, 6 deletions
diff --git a/searx/searxng.msg b/searx/searxng.msg index 17e49367c..b3d33e1f2 100644 --- a/searx/searxng.msg +++ b/searx/searxng.msg @@ -11,6 +11,7 @@ __all__ = [ 'CATEGORY_NAMES', 'CATEGORY_GROUPS', 'STYLE_NAMES', + 'BRAND_CUSTOM_LINKS', ] CONSTANT_NAMES = { @@ -51,3 +52,8 @@ STYLE_NAMES = { 'LIGHT': 'light', 'DARK': 'dark', } + +BRAND_CUSTOM_LINKS = { + 'UPTIME': 'Uptime', + 'ABOUT': 'About', +} diff --git a/searx/settings.yml b/searx/settings.yml index ec6c5bdc8..bebb7b47e 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -19,10 +19,12 @@ brand: public_instances: https://searx.space wiki_url: https://github.com/searxng/searxng/wiki issue_url: https://github.com/searxng/searxng/issues - # Custom entries in the footer: [title]: [link] # custom: - # About instance: "https://searxng.org" - # Instance admin: "https://searxng.org" + # maintainer: "Jon Doe" + # # Custom entries in the footer: [title]: [link] + # links: + # Uptime: https://uptime.searxng.org/history/darmarit-org + # About: "https://searxng.org" search: # Filter results. 0: None, 1: Moderate, 2: Strict diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index f7ff9170c..81e30bb4a 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -151,7 +151,7 @@ SCHEMA = { 'docs_url': SettingsValue(str, 'https://docs.searxng.org'), 'public_instances': SettingsValue((False, str), 'https://searx.space'), 'wiki_url': SettingsValue(str, 'https://github.com/searxng/searxng/wiki'), - 'custom': SettingsValue(dict, {}), + 'custom': SettingsValue(dict, {'links': {}}), }, 'search': { 'safe_search': SettingsValue((0, 1, 2), 0), diff --git a/searx/templates/simple/base.html b/searx/templates/simple/base.html index d22d96685..c72962492 100644 --- a/searx/templates/simple/base.html +++ b/searx/templates/simple/base.html @@ -77,8 +77,8 @@ {% if get_setting('general.contact_url') %} | <a href="{{ get_setting('general.contact_url') }}">{{ _('Contact instance maintainer') }}</a> {% endif %} - {% for title, link in get_setting('brand.custom').items() %} - | <a href="{{ link }}">{{ title }}</a> + {% for title, link in get_setting('brand.custom.links').items() %} + | <a href="{{ link }}">{{ _(title) }}</a> {% endfor %} </p> </footer> |