From 7f91de7399730c483f11d7f0e42e267f6b328001 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Fri, 19 Nov 2021 20:30:13 -0700 Subject: [PATCH 01/12] Allow executing run script w/o prior setup This change allows a bit quicker and simpler setup on new servers. Rather than setting up dependencies, virtual environment, etc, a systemd daemon, for example, can just ExecStart the script from any location without having to perform any preliminary setup. The only prerequisite step now is having Python3+ installed. --- run | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/run b/run index 9593201..371e65f 100755 --- a/run +++ b/run @@ -7,6 +7,19 @@ set -euo pipefail SCRIPT_DIR="$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" +if [[ ! -x "$(command -v python3)" ]]; then + echo "Python3 required -- please install first" + exit 1 +fi + +if [[ ! -d "$SCRIPT_DIR/venv" ]]; then + python3 -m venv venv + "$SCRIPT_DIR"/venv/bin/pip install --upgrade pip + "$SCRIPT_DIR"/venv/bin/pip install -r requirements.txt +fi + +cd "$SCRIPT_DIR" + # Set directory to serve static content from SUBDIR="${1:-app}" export APP_ROOT="$SCRIPT_DIR/$SUBDIR" @@ -24,7 +37,7 @@ if [[ "$SUBDIR" == "test" ]]; then pytest -sv else mkdir -p "$STATIC_FOLDER" - python3 -um app \ + "$SCRIPT_DIR"/venv/bin/python -um app \ --host "${ADDRESS:-0.0.0.0}" \ --port "${PORT:-"${EXPOSE_PORT:-5000}"}" fi From a768c1b5aa65b502e25df7457c6d96ff20250847 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 20 Nov 2021 16:03:10 -0700 Subject: [PATCH 02/12] Revert "Allow executing run script w/o prior setup" This reverts commit 7f91de7399730c483f11d7f0e42e267f6b328001. Fixes #540 --- run | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/run b/run index 371e65f..9593201 100755 --- a/run +++ b/run @@ -7,19 +7,6 @@ set -euo pipefail SCRIPT_DIR="$(builtin cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" -if [[ ! -x "$(command -v python3)" ]]; then - echo "Python3 required -- please install first" - exit 1 -fi - -if [[ ! -d "$SCRIPT_DIR/venv" ]]; then - python3 -m venv venv - "$SCRIPT_DIR"/venv/bin/pip install --upgrade pip - "$SCRIPT_DIR"/venv/bin/pip install -r requirements.txt -fi - -cd "$SCRIPT_DIR" - # Set directory to serve static content from SUBDIR="${1:-app}" export APP_ROOT="$SCRIPT_DIR/$SUBDIR" @@ -37,7 +24,7 @@ if [[ "$SUBDIR" == "test" ]]; then pytest -sv else mkdir -p "$STATIC_FOLDER" - "$SCRIPT_DIR"/venv/bin/python -um app \ + python3 -um app \ --host "${ADDRESS:-0.0.0.0}" \ --port "${PORT:-"${EXPOSE_PORT:-5000}"}" fi From de28e06d8fd165b2b55be6e5a8458259833148e7 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 20 Nov 2021 16:34:37 -0700 Subject: [PATCH 03/12] Improve cookie security when `HTTPS_ONLY` is set Adds the "Secure" flag and "__Secure-" prefix if the `HTTPS_ONLY` environment variable is enabled. Fixes #539 --- app/__init__.py | 7 ++++++- app/routes.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index c3fe504..077b97f 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -15,7 +15,7 @@ app = Flask(__name__, static_folder=os.path.dirname( os.path.abspath(__file__)) + '/static') # Load .env file if enabled -if os.getenv("WHOOGLE_DOTENV", ''): +if os.getenv('WHOOGLE_DOTENV', ''): dotenv_path = '../whoogle.env' load_dotenv(os.path.join(os.path.dirname(os.path.abspath(__file__)), dotenv_path)) @@ -24,6 +24,11 @@ app.default_key = generate_user_key() app.config['SECRET_KEY'] = os.urandom(32) app.config['SESSION_TYPE'] = 'filesystem' app.config['SESSION_COOKIE_SAMESITE'] = 'strict' + +if os.getenv('HTTPS_ONLY'): + app.config['SESSION_COOKIE_NAME'] = '__Secure-session' + app.config['SESSION_COOKIE_SECURE'] = True + app.config['VERSION_NUMBER'] = '0.6.0' app.config['APP_ROOT'] = os.getenv( 'APP_ROOT', diff --git a/app/routes.py b/app/routes.py index 2e066fc..b630be5 100644 --- a/app/routes.py +++ b/app/routes.py @@ -518,7 +518,8 @@ def run_app() -> None: os.environ['WHOOGLE_PROXY_TYPE'] = args.proxytype os.environ['WHOOGLE_PROXY_LOC'] = args.proxyloc - os.environ['HTTPS_ONLY'] = '1' if args.https_only else '' + if args.https_only: + os.environ['HTTPS_ONLY'] = '1' if args.debug: app.run(host=args.host, port=args.port, debug=args.debug) From 0c5578937eec7f23a8921439e0e7cde1ef669271 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 20 Nov 2021 16:43:57 -0700 Subject: [PATCH 04/12] Remove 308 redirect for http->https HTTPS upgrades should be handled outside of Whoogle, since Flask often doesn't detect the right protocol when being used behind a reverse proxy such as Nginx. --- app/routes.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/app/routes.py b/app/routes.py index b630be5..e85bb50 100644 --- a/app/routes.py +++ b/app/routes.py @@ -133,12 +133,6 @@ def before_request_func(): session.pop('_permanent', None) g.user_config = Config(**default_config) - # Handle https upgrade - if needs_https(request.url): - return redirect( - request.url.replace('http://', 'https://', 1), - code=308) - if not g.user_config.url: g.user_config.url = request.url_root.replace( 'http://', From 6f5f3d8ca7df3d355eaff9add1b829d9b5650f2a Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sun, 21 Nov 2021 23:21:04 -0700 Subject: [PATCH 05/12] Fix incorrect redirect protocol used by Flask Flask's `request.url` uses `http` as the protocol, which breaks instances that enforce `https`, since the session redirect relies on `request.url` for the follow-through URL. This introduces a new method for determining the correct URL to use for these redirects by automatically replacing the protocol with `https` if the `HTTPS_ONLY` env var is set for that instance. Fixes #538 Fixes #545 --- app/routes.py | 10 ++++------ app/utils/misc.py | 7 +++++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/app/routes.py b/app/routes.py index e85bb50..406d33e 100644 --- a/app/routes.py +++ b/app/routes.py @@ -14,7 +14,7 @@ from app.models.config import Config from app.models.endpoint import Endpoint from app.request import Request, TorError from app.utils.bangs import resolve_bang -from app.utils.misc import read_config_bool, get_client_ip +from app.utils.misc import read_config_bool, get_client_ip, get_request_url from app.utils.results import add_ip_card from app.utils.results import bold_search_terms from app.utils.search import * @@ -120,7 +120,7 @@ def before_request_func(): return redirect(url_for( 'session_check', session_id=session['uuid'], - follow=request.url), code=307) + follow=get_request_url(request.url)), code=307) else: g.user_config = Config(**session['config']) elif 'cookies_disabled' not in request.args: @@ -134,13 +134,11 @@ def before_request_func(): g.user_config = Config(**default_config) if not g.user_config.url: - g.user_config.url = request.url_root.replace( - 'http://', - 'https://') if os.getenv('HTTPS_ONLY', False) else request.url_root + g.user_config.url = get_request_url(request.url_root) g.user_request = Request( request.headers.get('User-Agent'), - request.url_root, + get_request_url(request.url_root), config=g.user_config) g.app_location = g.user_config.url diff --git a/app/utils/misc.py b/app/utils/misc.py index 6ce029a..7f1f67b 100644 --- a/app/utils/misc.py +++ b/app/utils/misc.py @@ -23,3 +23,10 @@ def get_client_ip(r: Request) -> str: return r.environ['REMOTE_ADDR'] else: return r.environ['HTTP_X_FORWARDED_FOR'] + + +def get_request_url(url: str) -> str: + if os.getenv('HTTPS_ONLY', False): + return url.replace('http://', 'https://', 1) + + return url From 5a27d748d16e2f92abdfa898093f2e282eb7215c Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 22 Nov 2021 00:26:25 -0700 Subject: [PATCH 06/12] Create separate test workflow for docker This expands on the current testing suite a bit by introducing a new workflow for testing functionality within the docker container. It runs the same test suite as the regular "test" workflow, but also performs a health check after running the app for 10 seconds to ensure functionality. The buildx workflow now waits for the docker test script to finish successfully, rather than the regular test workflow. This will hopefully avoid situations where new images are pushed with issues that aren't detected in regular testing of the app. --- .github/workflows/buildx.yml | 2 +- .github/workflows/docker_tests.yml | 19 +++++++++++++++++++ app/routes.py | 17 ++++++++--------- 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/docker_tests.yml diff --git a/.github/workflows/buildx.yml b/.github/workflows/buildx.yml index 35861ee..8d201ce 100644 --- a/.github/workflows/buildx.yml +++ b/.github/workflows/buildx.yml @@ -2,7 +2,7 @@ name: buildx on: workflow_run: - workflows: ["tests"] + workflows: ["docker_tests"] branches: [main] types: - completed diff --git a/.github/workflows/docker_tests.yml b/.github/workflows/docker_tests.yml new file mode 100644 index 0000000..3624bbb --- /dev/null +++ b/.github/workflows/docker_tests.yml @@ -0,0 +1,19 @@ +name: docker_tests + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v2 + - name: build and test + run: | + docker build --tag whoogle-search:test . + TEST_CONTAINER=$(docker run --entrypoint=/bin/bash --detach whoogle-search:test) + docker cp test "$TEST_CONTAINER":/whoogle/test + docker exec "$TEST_CONTAINER" ./run test + docker exec --detach "$TEST_CONTAINER" ./run + sleep 10 + docker exec "$TEST_CONTAINER" curl -f http://localhost:5000/healthz || exit 1 diff --git a/app/routes.py b/app/routes.py index 406d33e..1790c0d 100644 --- a/app/routes.py +++ b/app/routes.py @@ -28,7 +28,6 @@ from requests.models import PreparedRequest # Load DDG bang json files only on init bang_json = json.load(open(app.config['BANG_FILE'])) - # Check the newest version of WHOOGLE update = bsoup(get(app.config['RELEASES_URL']).text, 'html.parser') newest_version = update.select_one('[class="Link--primary"]').string[1:] @@ -36,7 +35,7 @@ current_version = int(''.join(filter(str.isdigit, app.config['VERSION_NUMBER']))) newest_version = int(''.join(filter(str.isdigit, newest_version))) newest_version = '' if current_version >= newest_version \ - else newest_version + else newest_version def auth_required(f): @@ -113,10 +112,10 @@ def before_request_func(): session['uuid'] = str(uuid.uuid4()) session['key'] = generate_user_key() - # Skip checking for session on /autocomplete searches, - # since they can be done from the browser search bar (aka - # no ability to initialize a session) - if not Endpoint.autocomplete.in_path(request.path): + # Skip checking for session on any searches that don't + # require a valid session + if (not Endpoint.autocomplete.in_path(request.path) and + not Endpoint.healthz.in_path(request.path)): return redirect(url_for( 'session_check', session_id=session['uuid'], @@ -199,9 +198,9 @@ def index(): 'logo.html', dark=g.user_config.dark), config_disabled=( - app.config['CONFIG_DISABLE'] or - not valid_user_session(session) or - 'cookies_disabled' in request.args), + app.config['CONFIG_DISABLE'] or + not valid_user_session(session) or + 'cookies_disabled' in request.args), config=g.user_config, tor_available=int(os.environ.get('TOR_AVAILABLE')), version_number=app.config['VERSION_NUMBER']) From baffb5fc811ee96d4ded2a3c6bf4e3c920984d33 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 22 Nov 2021 00:34:48 -0700 Subject: [PATCH 07/12] Simplify docker tests Only the healthcheck is really necessary for the workflow's purpose. Running the full test suite is redundant. --- .github/workflows/docker_tests.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker_tests.yml b/.github/workflows/docker_tests.yml index 3624bbb..89fe3bd 100644 --- a/.github/workflows/docker_tests.yml +++ b/.github/workflows/docker_tests.yml @@ -11,9 +11,6 @@ jobs: - name: build and test run: | docker build --tag whoogle-search:test . - TEST_CONTAINER=$(docker run --entrypoint=/bin/bash --detach whoogle-search:test) - docker cp test "$TEST_CONTAINER":/whoogle/test - docker exec "$TEST_CONTAINER" ./run test - docker exec --detach "$TEST_CONTAINER" ./run - sleep 10 - docker exec "$TEST_CONTAINER" curl -f http://localhost:5000/healthz || exit 1 + docker run --publish 5000:5000 --detach --name whoogle-search whoogle-search:test + sleep 15 + docker exec whoogle-search curl -f http://localhost:5000/healthz || exit 1 From 79a4a17311428a0f1ab9195a0001bde639ce9f49 Mon Sep 17 00:00:00 2001 From: Ilya Prokopenko Date: Wed, 24 Nov 2021 00:36:52 +0700 Subject: [PATCH 08/12] Add Russian translation (#552) --- app/static/settings/translations.json | 37 +++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index 9c5d880..a8f5d24 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -221,6 +221,43 @@ "dark": "escuro", "system": "configuração de sistema" }, + "lang_ru": { + "search": "Поиск", + "config": "Настройка", + "config-country": "Фильтр результатов по стране", + "config-country-help": "Примечание: Если включено, то веб-сайт будет отображаться в результатах поиска только в том случае, если он *размещен* в выбранной стране.", + "config-lang": "Язык интерфейса", + "config-lang-search": "Язык поиска", + "config-near": "Около", + "config-near-help": "Название города", + "config-block": "Блокировать", + "config-block-help": "Список сайтов, разделенный запятыми", + "config-block-title": "Блокировать по названию", + "config-block-title-help": "Используйте regex", + "config-block-url": "Блокировать по URL-адресу", + "config-block-url-help": "Используйте regex", + "config-theme": "Оформление", + "config-nojs": "Показывать ссылки NoJS", + "config-dark": "Темный режим", + "config-safe": "Безопасный поиск", + "config-alts": "Заменить ссылки на социальные сети", + "config-alts-help": "Замена ссылкок Twitter, YouTube, Instagram и т.д. на альтернативы, уважающие конфиденциальность.", + "config-new-tab": "Открывать ссылки в новой вкладке", + "config-images": "Поиск полноразмерных изображений", + "config-images-help": "(Экспериментально) Добавляет опцию 'Просмотр изображения' к поиску изображений в ПК-режиме. Это приведет к тому, что миниатюры изображений будут иметь более низкое разрешение.", + "config-tor": "Использовать Tor", + "config-get-only": "Только GET-запросы", + "config-url": "Корневой URL-адрес", + "config-css": "Пользовательский CSS", + "load": "Загрузить", + "apply": "Применить", + "save-as": "Сохранить как...", + "github-link": "Посмотреть в GitHub", + "translate": "перевести", + "light": "светлое", + "dark": "темное", + "system": "системное" + }, "lang_zh-CN": { "search": "搜索", "config": "配置", From a8afd49f8417d858b4604b49ff3ed1066c76f058 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 23 Nov 2021 10:58:31 -0700 Subject: [PATCH 09/12] Move docker tests after api/unit testing It makes more sense to structure the order of tests to go from api and unit testing -> validate docker image works as expected -> build and deploy docker image. --- .github/workflows/docker_tests.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_tests.yml b/.github/workflows/docker_tests.yml index 89fe3bd..e3a3a2f 100644 --- a/.github/workflows/docker_tests.yml +++ b/.github/workflows/docker_tests.yml @@ -1,9 +1,14 @@ name: docker_tests -on: [push, pull_request] +on: + workflow_run: + workflows: ["tests"] + branches: [main] + types: + - completed jobs: - test: + on-success: runs-on: ubuntu-latest steps: - name: checkout code From 1d3e7c02550d39ffdde847e72d72c25b73c69f5d Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 23 Nov 2021 12:27:59 -0700 Subject: [PATCH 10/12] Pin config buttons to bottom of config menu Previously the load/save/apply buttons in the config menu were hidden below all available config options and required the user to scroll to the bottom to save changes. This made for bad ux, since for new users, it isn't immediately apparent that selecting a new dropdown value, for instance, doesn't instantly save the new setting. The new layout should make it more clear that hitting "Apply" is required to save config changes. --- app/static/css/main.css | 10 +- app/templates/index.html | 278 ++++++++++++++++++++------------------- 2 files changed, 149 insertions(+), 139 deletions(-) diff --git a/app/static/css/main.css b/app/static/css/main.css index c937ee2..9801657 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -61,6 +61,15 @@ body { -webkit-appearance: none; } +.config-options { + max-height: 370px; + overflow-y: scroll; +} + +.config-buttons { + max-height: 30px; +} + .config-div { padding: 5px; } @@ -102,7 +111,6 @@ button::-moz-focus-inner { } .open { - overflow-y: scroll; padding-bottom: 20px; } diff --git a/app/templates/index.html b/app/templates/index.html index b61753c..e52e59e 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -84,145 +84,147 @@
-
- - -
— {{ translation['config-country-help'] }}
+
+
+ + +
— {{ translation['config-country-help'] }}
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ + + + + +
+ + +
+
+ + +
— {{ translation['config-alts-help'] }}
+
+
+ + +
+
+ + +
— {{ translation['config-images-help'] }}
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + {{ translation['config-css'] }}: + + +
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
- - - - - -
- - -
-
- - -
— {{ translation['config-alts-help'] }}
-
-
- - -
-
- - -
— {{ translation['config-images-help'] }}
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - {{ translation['config-css'] }}: - - -
-
+
    From 3c065191308c3acebf3cc0086c485da75e3a36aa Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 23 Nov 2021 13:48:54 -0700 Subject: [PATCH 11/12] Use 'gl' search param to set country This switches the param used for the "country" config setting from "cr" (which only filters results by the country the result is hosted in) to "gl" (which overrides server/hosting location and produces results that are more accurate for the user's current country). Before this change, the country config setting was (imo) pretty useless. Allowing a user to override an instance's hosting location with their preferred country though is way more useful, especially for public instances that are hosted in a different country than the user. Closes #544 --- app/models/config.py | 2 +- app/request.py | 2 +- app/static/settings/countries.json | 485 +++++++++++++------------- app/static/settings/translations.json | 48 +-- app/templates/index.html | 1 - 5 files changed, 260 insertions(+), 278 deletions(-) diff --git a/app/models/config.py b/app/models/config.py index bb10d12..2419fe0 100644 --- a/app/models/config.py +++ b/app/models/config.py @@ -17,7 +17,7 @@ class Config: self.block = os.getenv('WHOOGLE_CONFIG_BLOCK', '') self.block_title = os.getenv('WHOOGLE_CONFIG_BLOCK_TITLE', '') self.block_url = os.getenv('WHOOGLE_CONFIG_BLOCK_URL', '') - self.ctry = os.getenv('WHOOGLE_CONFIG_COUNTRY', '') + self.ctry = os.getenv('WHOOGLE_CONFIG_COUNTRY', 'US') self.theme = os.getenv('WHOOGLE_CONFIG_THEME', 'system') self.safe = read_config_bool('WHOOGLE_CONFIG_SAFE') self.dark = read_config_bool('WHOOGLE_CONFIG_DARK') # deprecated diff --git a/app/request.py b/app/request.py index da8852a..ae36824 100644 --- a/app/request.py +++ b/app/request.py @@ -120,7 +120,7 @@ def gen_query(query, args, config, near_city=None) -> str: if 'chips' in args: param_dict['chips'] = '&chips=' + args.get('chips') - param_dict['cr'] = ('&cr=' + config.ctry) if config.ctry else '' + param_dict['gl'] = ('&gl=' + config.ctry) if config.ctry else '' param_dict['hl'] = '&hl=' + ( config.lang_interface.replace('lang_', '') if config.lang_interface else '' diff --git a/app/static/settings/countries.json b/app/static/settings/countries.json index 061b524..43da3b6 100644 --- a/app/static/settings/countries.json +++ b/app/static/settings/countries.json @@ -1,248 +1,247 @@ [ {"name": "-------", "value": ""}, - {"name": "Afghanistan", "value": "countryAF"}, - {"name": "Albania", "value": "countryAL"}, - {"name": "Algeria", "value": "countryDZ"}, - {"name": "American Samoa", "value": "countryAS"}, - {"name": "Andorra", "value": "countryAD"}, - {"name": "Angola", "value": "countryAO"}, - {"name": "Anguilla", "value": "countryAI"}, - {"name": "Antarctica", "value": "countryAQ"}, - {"name": "Antigua and Barbuda", "value": "countryAG"}, - {"name": "Argentina", "value": "countryAR"}, - {"name": "Armenia", "value": "countryAM"}, - {"name": "Aruba", "value": "countryAW"}, - {"name": "Australia", "value": "countryAU"}, - {"name": "Austria", "value": "countryAT"}, - {"name": "Azerbaijan", "value": "countryAZ"}, - {"name": "Bahamas", "value": "countryBS"}, - {"name": "Bahrain", "value": "countryBH"}, - {"name": "Bangladesh", "value": "countryBD"}, - {"name": "Barbados", "value": "countryBB"}, - {"name": "Belarus", "value": "countryBY"}, - {"name": "Belgium", "value": "countryBE"}, - {"name": "Belize", "value": "countryBZ"}, - {"name": "Benin", "value": "countryBJ"}, - {"name": "Bermuda", "value": "countryBM"}, - {"name": "Bhutan", "value": "countryBT"}, - {"name": "Bolivia", "value": "countryBO"}, - {"name": "Bosnia and Herzegovina", "value": "countryBA"}, - {"name": "Botswana", "value": "countryBW"}, - {"name": "Bouvet Island", "value": "countryBV"}, - {"name": "Brazil", "value": "countryBR"}, - {"name": "British Indian Ocean Territory", "value": "countryIO"}, - {"name": "Brunei Darussalam", "value": "countryBN"}, - {"name": "Bulgaria", "value": "countryBG"}, - {"name": "Burkina Faso", "value": "countryBF"}, - {"name": "Burundi", "value": "countryBI"}, - {"name": "Cambodia", "value": "countryKH"}, - {"name": "Cameroon", "value": "countryCM"}, - {"name": "Canada", "value": "countryCA"}, - {"name": "Cape Verde", "value": "countryCV"}, - {"name": "Cayman Islands", "value": "countryKY"}, - {"name": "Central African Republic", "value": "countryCF"}, - {"name": "Chad", "value": "countryTD"}, - {"name": "Chile", "value": "countryCL"}, - {"name": "China", "value": "countryCN"}, - {"name": "Christmas Island", "value": "countryCX"}, - {"name": "Cocos (Keeling) Islands", "value": "countryCC"}, - {"name": "Colombia", "value": "countryCO"}, - {"name": "Comoros", "value": "countryKM"}, - {"name": "Congo", "value": "countryCG"}, - {"name": "Congo, Democratic Republic of the", "value": "countryCD"}, - {"name": "Cook Islands", "value": "countryCK"}, - {"name": "Costa Rica", "value": "countryCR"}, - {"name": "Cote D\"ivoire", "value": "countryCI"}, - {"name": "Croatia (Hrvatska)", "value": "countryHR"}, - {"name": "Cuba", "value": "countryCU"}, - {"name": "Cyprus", "value": "countryCY"}, - {"name": "Czech Republic", "value": "countryCZ"}, - {"name": "Denmark", "value": "countryDK"}, - {"name": "Djibouti", "value": "countryDJ"}, - {"name": "Dominica", "value": "countryDM"}, - {"name": "Dominican Republic", "value": "countryDO"}, - {"name": "East Timor", "value": "countryTP"}, - {"name": "Ecuador", "value": "countryEC"}, - {"name": "Egypt", "value": "countryEG"}, - {"name": "El Salvador", "value": "countrySV"}, - {"name": "Equatorial Guinea", "value": "countryGQ"}, - {"name": "Eritrea", "value": "countryER"}, - {"name": "Estonia", "value": "countryEE"}, - {"name": "Ethiopia", "value": "countryET"}, - {"name": "European Union", "value": "countryEU"}, - {"name": "Falkland Islands (Malvinas)", "value": "countryFK"}, - {"name": "Faroe Islands", "value": "countryFO"}, - {"name": "Fiji", "value": "countryFJ"}, - {"name": "Finland", "value": "countryFI"}, - {"name": "France", "value": "countryFR"}, - {"name": "France, Metropolitan", "value": "countryFX"}, - {"name": "French Guiana", "value": "countryGF"}, - {"name": "French Polynesia", "value": "countryPF"}, - {"name": "French Southern Territories", "value": "countryTF"}, - {"name": "Gabon", "value": "countryGA"}, - {"name": "Gambia", "value": "countryGM"}, - {"name": "Georgia", "value": "countryGE"}, - {"name": "Germany", "value": "countryDE"}, - {"name": "Ghana", "value": "countryGH"}, - {"name": "Gibraltar", "value": "countryGI"}, - {"name": "Greece", "value": "countryGR"}, - {"name": "Greenland", "value": "countryGL"}, - {"name": "Grenada", "value": "countryGD"}, - {"name": "Guadeloupe", "value": "countryGP"}, - {"name": "Guam", "value": "countryGU"}, - {"name": "Guatemala", "value": "countryGT"}, - {"name": "Guinea", "value": "countryGN"}, - {"name": "Guinea-Bissau", "value": "countryGW"}, - {"name": "Guyana", "value": "countryGY"}, - {"name": "Haiti", "value": "countryHT"}, - {"name": "Heard Island and Mcdonald Islands", "value": "countryHM"}, - {"name": "Holy See (Vatican City State)", "value": "countryVA"}, - {"name": "Honduras", "value": "countryHN"}, - {"name": "Hong Kong", "value": "countryHK"}, - {"name": "Hungary", "value": "countryHU"}, - {"name": "Iceland", "value": "countryIS"}, - {"name": "India", "value": "countryIN"}, - {"name": "Indonesia", "value": "countryID"}, - {"name": "Iran, Islamic Republic of", "value": "countryIR"}, - {"name": "Iraq", "value": "countryIQ"}, - {"name": "Ireland", "value": "countryIE"}, - {"name": "Israel", "value": "countryIL"}, - {"name": "Italy", "value": "countryIT"}, - {"name": "Jamaica", "value": "countryJM"}, - {"name": "Japan", "value": "countryJP"}, - {"name": "Jordan", "value": "countryJO"}, - {"name": "Kazakhstan", "value": "countryKZ"}, - {"name": "Kenya", "value": "countryKE"}, - {"name": "Kiribati", "value": "countryKI"}, - {"name": "Korea, Democratic People\"s Republic of", - "value": "countryKP"}, - {"name": "Korea, Republic of", "value": "countryKR"}, - {"name": "Kuwait", "value": "countryKW"}, - {"name": "Kyrgyzstan", "value": "countryKG"}, - {"name": "Lao People\"s Democratic Republic", "value": "countryLA"}, - {"name": "Latvia", "value": "countryLV"}, - {"name": "Lebanon", "value": "countryLB"}, - {"name": "Lesotho", "value": "countryLS"}, - {"name": "Liberia", "value": "countryLR"}, - {"name": "Libyan Arab Jamahiriya", "value": "countryLY"}, - {"name": "Liechtenstein", "value": "countryLI"}, - {"name": "Lithuania", "value": "countryLT"}, - {"name": "Luxembourg", "value": "countryLU"}, - {"name": "Macao", "value": "countryMO"}, + {"name": "Afghanistan", "value": "AF"}, + {"name": "Albania", "value": "AL"}, + {"name": "Algeria", "value": "DZ"}, + {"name": "American Samoa", "value": "AS"}, + {"name": "Andorra", "value": "AD"}, + {"name": "Angola", "value": "AO"}, + {"name": "Anguilla", "value": "AI"}, + {"name": "Antarctica", "value": "AQ"}, + {"name": "Antigua and Barbuda", "value": "AG"}, + {"name": "Argentina", "value": "AR"}, + {"name": "Armenia", "value": "AM"}, + {"name": "Aruba", "value": "AW"}, + {"name": "Australia", "value": "AU"}, + {"name": "Austria", "value": "AT"}, + {"name": "Azerbaijan", "value": "AZ"}, + {"name": "Bahamas", "value": "BS"}, + {"name": "Bahrain", "value": "BH"}, + {"name": "Bangladesh", "value": "BD"}, + {"name": "Barbados", "value": "BB"}, + {"name": "Belarus", "value": "BY"}, + {"name": "Belgium", "value": "BE"}, + {"name": "Belize", "value": "BZ"}, + {"name": "Benin", "value": "BJ"}, + {"name": "Bermuda", "value": "BM"}, + {"name": "Bhutan", "value": "BT"}, + {"name": "Bolivia", "value": "BO"}, + {"name": "Bosnia and Herzegovina", "value": "BA"}, + {"name": "Botswana", "value": "BW"}, + {"name": "Bouvet Island", "value": "BV"}, + {"name": "Brazil", "value": "BR"}, + {"name": "British Indian Ocean Territory", "value": "IO"}, + {"name": "Brunei Darussalam", "value": "BN"}, + {"name": "Bulgaria", "value": "BG"}, + {"name": "Burkina Faso", "value": "BF"}, + {"name": "Burundi", "value": "BI"}, + {"name": "Cambodia", "value": "KH"}, + {"name": "Cameroon", "value": "CM"}, + {"name": "Canada", "value": "CA"}, + {"name": "Cape Verde", "value": "CV"}, + {"name": "Cayman Islands", "value": "KY"}, + {"name": "Central African Republic", "value": "CF"}, + {"name": "Chad", "value": "TD"}, + {"name": "Chile", "value": "CL"}, + {"name": "China", "value": "CN"}, + {"name": "Christmas Island", "value": "CX"}, + {"name": "Cocos (Keeling) Islands", "value": "CC"}, + {"name": "Colombia", "value": "CO"}, + {"name": "Comoros", "value": "KM"}, + {"name": "Congo", "value": "CG"}, + {"name": "Congo, Democratic Republic of the", "value": "CD"}, + {"name": "Cook Islands", "value": "CK"}, + {"name": "Costa Rica", "value": "CR"}, + {"name": "Cote D'ivoire", "value": "CI"}, + {"name": "Croatia (Hrvatska)", "value": "HR"}, + {"name": "Cuba", "value": "CU"}, + {"name": "Cyprus", "value": "CY"}, + {"name": "Czech Republic", "value": "CZ"}, + {"name": "Denmark", "value": "DK"}, + {"name": "Djibouti", "value": "DJ"}, + {"name": "Dominica", "value": "DM"}, + {"name": "Dominican Republic", "value": "DO"}, + {"name": "East Timor", "value": "TP"}, + {"name": "Ecuador", "value": "EC"}, + {"name": "Egypt", "value": "EG"}, + {"name": "El Salvador", "value": "SV"}, + {"name": "Equatorial Guinea", "value": "GQ"}, + {"name": "Eritrea", "value": "ER"}, + {"name": "Estonia", "value": "EE"}, + {"name": "Ethiopia", "value": "ET"}, + {"name": "European Union", "value": "EU"}, + {"name": "Falkland Islands (Malvinas)", "value": "FK"}, + {"name": "Faroe Islands", "value": "FO"}, + {"name": "Fiji", "value": "FJ"}, + {"name": "Finland", "value": "FI"}, + {"name": "France", "value": "FR"}, + {"name": "France, Metropolitan", "value": "FX"}, + {"name": "French Guiana", "value": "GF"}, + {"name": "French Polynesia", "value": "PF"}, + {"name": "French Southern Territories", "value": "TF"}, + {"name": "Gabon", "value": "GA"}, + {"name": "Gambia", "value": "GM"}, + {"name": "Georgia", "value": "GE"}, + {"name": "Germany", "value": "DE"}, + {"name": "Ghana", "value": "GH"}, + {"name": "Gibraltar", "value": "GI"}, + {"name": "Greece", "value": "GR"}, + {"name": "Greenland", "value": "GL"}, + {"name": "Grenada", "value": "GD"}, + {"name": "Guadeloupe", "value": "GP"}, + {"name": "Guam", "value": "GU"}, + {"name": "Guatemala", "value": "GT"}, + {"name": "Guinea", "value": "GN"}, + {"name": "Guinea-Bissau", "value": "GW"}, + {"name": "Guyana", "value": "GY"}, + {"name": "Haiti", "value": "HT"}, + {"name": "Heard Island and Mcdonald Islands", "value": "HM"}, + {"name": "Holy See (Vatican City State)", "value": "VA"}, + {"name": "Honduras", "value": "HN"}, + {"name": "Hong Kong", "value": "HK"}, + {"name": "Hungary", "value": "HU"}, + {"name": "Iceland", "value": "IS"}, + {"name": "India", "value": "IN"}, + {"name": "Indonesia", "value": "ID"}, + {"name": "Iran, Islamic Republic of", "value": "IR"}, + {"name": "Iraq", "value": "IQ"}, + {"name": "Ireland", "value": "IE"}, + {"name": "Israel", "value": "IL"}, + {"name": "Italy", "value": "IT"}, + {"name": "Jamaica", "value": "JM"}, + {"name": "Japan", "value": "JP"}, + {"name": "Jordan", "value": "JO"}, + {"name": "Kazakhstan", "value": "KZ"}, + {"name": "Kenya", "value": "KE"}, + {"name": "Kiribati", "value": "KI"}, + {"name": "Korea, Democratic People's Republic of", "value": "KP"}, + {"name": "Korea, Republic of", "value": "KR"}, + {"name": "Kuwait", "value": "KW"}, + {"name": "Kyrgyzstan", "value": "KG"}, + {"name": "Lao People's Democratic Republic", "value": "LA"}, + {"name": "Latvia", "value": "LV"}, + {"name": "Lebanon", "value": "LB"}, + {"name": "Lesotho", "value": "LS"}, + {"name": "Liberia", "value": "LR"}, + {"name": "Libyan Arab Jamahiriya", "value": "LY"}, + {"name": "Liechtenstein", "value": "LI"}, + {"name": "Lithuania", "value": "LT"}, + {"name": "Luxembourg", "value": "LU"}, + {"name": "Macao", "value": "MO"}, {"name": "Macedonia, the Former Yugosalv Republic of", - "value": "countryMK"}, - {"name": "Madagascar", "value": "countryMG"}, - {"name": "Malawi", "value": "countryMW"}, - {"name": "Malaysia", "value": "countryMY"}, - {"name": "Maldives", "value": "countryMV"}, - {"name": "Mali", "value": "countryML"}, - {"name": "Malta", "value": "countryMT"}, - {"name": "Marshall Islands", "value": "countryMH"}, - {"name": "Martinique", "value": "countryMQ"}, - {"name": "Mauritania", "value": "countryMR"}, - {"name": "Mauritius", "value": "countryMU"}, - {"name": "Mayotte", "value": "countryYT"}, - {"name": "Mexico", "value": "countryMX"}, - {"name": "Micronesia, Federated States of", "value": "countryFM"}, - {"name": "Moldova, Republic of", "value": "countryMD"}, - {"name": "Monaco", "value": "countryMC"}, - {"name": "Mongolia", "value": "countryMN"}, - {"name": "Montserrat", "value": "countryMS"}, - {"name": "Morocco", "value": "countryMA"}, - {"name": "Mozambique", "value": "countryMZ"}, - {"name": "Myanmar", "value": "countryMM"}, - {"name": "Namibia", "value": "countryNA"}, - {"name": "Nauru", "value": "countryNR"}, - {"name": "Nepal", "value": "countryNP"}, - {"name": "Netherlands", "value": "countryNL"}, - {"name": "Netherlands Antilles", "value": "countryAN"}, - {"name": "New Caledonia", "value": "countryNC"}, - {"name": "New Zealand", "value": "countryNZ"}, - {"name": "Nicaragua", "value": "countryNI"}, - {"name": "Niger", "value": "countryNE"}, - {"name": "Nigeria", "value": "countryNG"}, - {"name": "Niue", "value": "countryNU"}, - {"name": "Norfolk Island", "value": "countryNF"}, - {"name": "Northern Mariana Islands", "value": "countryMP"}, - {"name": "Norway", "value": "countryNO"}, - {"name": "Oman", "value": "countryOM"}, - {"name": "Pakistan", "value": "countryPK"}, - {"name": "Palau", "value": "countryPW"}, - {"name": "Palestinian Territory", "value": "countryPS"}, - {"name": "Panama", "value": "countryPA"}, - {"name": "Papua New Guinea", "value": "countryPG"}, - {"name": "Paraguay", "value": "countryPY"}, - {"name": "Peru", "value": "countryPE"}, - {"name": "Philippines", "value": "countryPH"}, - {"name": "Pitcairn", "value": "countryPN"}, - {"name": "Poland", "value": "countryPL"}, - {"name": "Portugal", "value": "countryPT"}, - {"name": "Puerto Rico", "value": "countryPR"}, - {"name": "Qatar", "value": "countryQA"}, - {"name": "Reunion", "value": "countryRE"}, - {"name": "Romania", "value": "countryRO"}, - {"name": "Russian Federation", "value": "countryRU"}, - {"name": "Rwanda", "value": "countryRW"}, - {"name": "Saint Helena", "value": "countrySH"}, - {"name": "Saint Kitts and Nevis", "value": "countryKN"}, - {"name": "Saint Lucia", "value": "countryLC"}, - {"name": "Saint Pierre and Miquelon", "value": "countryPM"}, - {"name": "Saint Vincent and the Grenadines", "value": "countryVC"}, - {"name": "Samoa", "value": "countryWS"}, - {"name": "San Marino", "value": "countrySM"}, - {"name": "Sao Tome and Principe", "value": "countryST"}, - {"name": "Saudi Arabia", "value": "countrySA"}, - {"name": "Senegal", "value": "countrySN"}, - {"name": "Serbia and Montenegro", "value": "countryCS"}, - {"name": "Seychelles", "value": "countrySC"}, - {"name": "Sierra Leone", "value": "countrySL"}, - {"name": "Singapore", "value": "countrySG"}, - {"name": "Slovakia", "value": "countrySK"}, - {"name": "Slovenia", "value": "countrySI"}, - {"name": "Solomon Islands", "value": "countrySB"}, - {"name": "Somalia", "value": "countrySO"}, - {"name": "South Africa", "value": "countryZA"}, + "value": "MK"}, + {"name": "Madagascar", "value": "MG"}, + {"name": "Malawi", "value": "MW"}, + {"name": "Malaysia", "value": "MY"}, + {"name": "Maldives", "value": "MV"}, + {"name": "Mali", "value": "ML"}, + {"name": "Malta", "value": "MT"}, + {"name": "Marshall Islands", "value": "MH"}, + {"name": "Martinique", "value": "MQ"}, + {"name": "Mauritania", "value": "MR"}, + {"name": "Mauritius", "value": "MU"}, + {"name": "Mayotte", "value": "YT"}, + {"name": "Mexico", "value": "MX"}, + {"name": "Micronesia, Federated States of", "value": "FM"}, + {"name": "Moldova, Republic of", "value": "MD"}, + {"name": "Monaco", "value": "MC"}, + {"name": "Mongolia", "value": "MN"}, + {"name": "Montserrat", "value": "MS"}, + {"name": "Morocco", "value": "MA"}, + {"name": "Mozambique", "value": "MZ"}, + {"name": "Myanmar", "value": "MM"}, + {"name": "Namibia", "value": "NA"}, + {"name": "Nauru", "value": "NR"}, + {"name": "Nepal", "value": "NP"}, + {"name": "Netherlands", "value": "NL"}, + {"name": "Netherlands Antilles", "value": "AN"}, + {"name": "New Caledonia", "value": "NC"}, + {"name": "New Zealand", "value": "NZ"}, + {"name": "Nicaragua", "value": "NI"}, + {"name": "Niger", "value": "NE"}, + {"name": "Nigeria", "value": "NG"}, + {"name": "Niue", "value": "NU"}, + {"name": "Norfolk Island", "value": "NF"}, + {"name": "Northern Mariana Islands", "value": "MP"}, + {"name": "Norway", "value": "NO"}, + {"name": "Oman", "value": "OM"}, + {"name": "Pakistan", "value": "PK"}, + {"name": "Palau", "value": "PW"}, + {"name": "Palestinian Territory", "value": "PS"}, + {"name": "Panama", "value": "PA"}, + {"name": "Papua New Guinea", "value": "PG"}, + {"name": "Paraguay", "value": "PY"}, + {"name": "Peru", "value": "PE"}, + {"name": "Philippines", "value": "PH"}, + {"name": "Pitcairn", "value": "PN"}, + {"name": "Poland", "value": "PL"}, + {"name": "Portugal", "value": "PT"}, + {"name": "Puerto Rico", "value": "PR"}, + {"name": "Qatar", "value": "QA"}, + {"name": "Reunion", "value": "RE"}, + {"name": "Romania", "value": "RO"}, + {"name": "Russian Federation", "value": "RU"}, + {"name": "Rwanda", "value": "RW"}, + {"name": "Saint Helena", "value": "SH"}, + {"name": "Saint Kitts and Nevis", "value": "KN"}, + {"name": "Saint Lucia", "value": "LC"}, + {"name": "Saint Pierre and Miquelon", "value": "PM"}, + {"name": "Saint Vincent and the Grenadines", "value": "VC"}, + {"name": "Samoa", "value": "WS"}, + {"name": "San Marino", "value": "SM"}, + {"name": "Sao Tome and Principe", "value": "ST"}, + {"name": "Saudi Arabia", "value": "SA"}, + {"name": "Senegal", "value": "SN"}, + {"name": "Serbia and Montenegro", "value": "CS"}, + {"name": "Seychelles", "value": "SC"}, + {"name": "Sierra Leone", "value": "SL"}, + {"name": "Singapore", "value": "SG"}, + {"name": "Slovakia", "value": "SK"}, + {"name": "Slovenia", "value": "SI"}, + {"name": "Solomon Islands", "value": "SB"}, + {"name": "Somalia", "value": "SO"}, + {"name": "South Africa", "value": "ZA"}, {"name": "South Georgia and the South Sandwich Islands", - "value": "countryGS"}, - {"name": "Spain", "value": "countryES"}, - {"name": "Sri Lanka", "value": "countryLK"}, - {"name": "Sudan", "value": "countrySD"}, - {"name": "Suriname", "value": "countrySR"}, - {"name": "Svalbard and Jan Mayen", "value": "countrySJ"}, - {"name": "Swaziland", "value": "countrySZ"}, - {"name": "Sweden", "value": "countrySE"}, - {"name": "Switzerland", "value": "countryCH"}, - {"name": "Syrian Arab Republic", "value": "countrySY"}, - {"name": "Taiwan", "value": "countryTW"}, - {"name": "Tajikistan", "value": "countryTJ"}, - {"name": "Tanzania, United Republic of", "value": "countryTZ"}, - {"name": "Thailand", "value": "countryTH"}, - {"name": "Togo", "value": "countryTG"}, - {"name": "Tokelau", "value": "countryTK"}, - {"name": "Tonga", "value": "countryTO"}, - {"name": "Trinidad and Tobago", "value": "countryTT"}, - {"name": "Tunisia", "value": "countryTN"}, - {"name": "Turkey", "value": "countryTR"}, - {"name": "Turkmenistan", "value": "countryTM"}, - {"name": "Turks and Caicos Islands", "value": "countryTC"}, - {"name": "Tuvalu", "value": "countryTV"}, - {"name": "Uganda", "value": "countryUG"}, - {"name": "Ukraine", "value": "countryUA"}, - {"name": "United Arab Emirates", "value": "countryAE"}, - {"name": "United Kingdom", "value": "countryUK"}, - {"name": "United States", "value": "countryUS"}, - {"name": "United States Minor Outlying Islands", "value": "countryUM"}, - {"name": "Uruguay", "value": "countryUY"}, - {"name": "Uzbekistan", "value": "countryUZ"}, - {"name": "Vanuatu", "value": "countryVU"}, - {"name": "Venezuela", "value": "countryVE"}, - {"name": "Vietnam", "value": "countryVN"}, - {"name": "Virgin Islands, British", "value": "countryVG"}, - {"name": "Virgin Islands, U.S.", "value": "countryVI"}, - {"name": "Wallis and Futuna", "value": "countryWF"}, - {"name": "Western Sahara", "value": "countryEH"}, - {"name": "Yemen", "value": "countryYE"}, - {"name": "Yugoslavia", "value": "countryYU"}, - {"name": "Zambia", "value": "countryZM"}, - {"name": "Zimbabwe", "value": "countryZW"} + "value": "GS"}, + {"name": "Spain", "value": "ES"}, + {"name": "Sri Lanka", "value": "LK"}, + {"name": "Sudan", "value": "SD"}, + {"name": "Suriname", "value": "SR"}, + {"name": "Svalbard and Jan Mayen", "value": "SJ"}, + {"name": "Swaziland", "value": "SZ"}, + {"name": "Sweden", "value": "SE"}, + {"name": "Switzerland", "value": "CH"}, + {"name": "Syrian Arab Republic", "value": "SY"}, + {"name": "Taiwan", "value": "TW"}, + {"name": "Tajikistan", "value": "TJ"}, + {"name": "Tanzania, United Republic of", "value": "TZ"}, + {"name": "Thailand", "value": "TH"}, + {"name": "Togo", "value": "TG"}, + {"name": "Tokelau", "value": "TK"}, + {"name": "Tonga", "value": "TO"}, + {"name": "Trinidad and Tobago", "value": "TT"}, + {"name": "Tunisia", "value": "TN"}, + {"name": "Turkey", "value": "TR"}, + {"name": "Turkmenistan", "value": "TM"}, + {"name": "Turks and Caicos Islands", "value": "TC"}, + {"name": "Tuvalu", "value": "TV"}, + {"name": "Uganda", "value": "UG"}, + {"name": "Ukraine", "value": "UA"}, + {"name": "United Arab Emirates", "value": "AE"}, + {"name": "United Kingdom", "value": "UK"}, + {"name": "United States", "value": "US"}, + {"name": "United States Minor Outlying Islands", "value": "UM"}, + {"name": "Uruguay", "value": "UY"}, + {"name": "Uzbekistan", "value": "UZ"}, + {"name": "Vanuatu", "value": "VU"}, + {"name": "Venezuela", "value": "VE"}, + {"name": "Vietnam", "value": "VN"}, + {"name": "Virgin Islands, British", "value": "VG"}, + {"name": "Virgin Islands, U.S.", "value": "VI"}, + {"name": "Wallis and Futuna", "value": "WF"}, + {"name": "Western Sahara", "value": "EH"}, + {"name": "Yemen", "value": "YE"}, + {"name": "Yugoslavia", "value": "YU"}, + {"name": "Zambia", "value": "ZM"}, + {"name": "Zimbabwe", "value": "ZW"} ] diff --git a/app/static/settings/translations.json b/app/static/settings/translations.json index a8f5d24..eb62744 100644 --- a/app/static/settings/translations.json +++ b/app/static/settings/translations.json @@ -2,8 +2,7 @@ "lang_en": { "search": "Search", "config": "Configuration", - "config-country": "Filter Results by Country", - "config-country-help": "Note: If enabled, a website will only appear in the search results if it is *hosted* in the selected country.", + "config-country": "Set Country", "config-lang": "Interface Language", "config-lang-search": "Search Language", "config-near": "Near", @@ -39,8 +38,7 @@ "lang_nl": { "search": "Zoeken", "config": "Instellingen", - "config-country": "Filter zoek resultaten bij land", - "config-country-help": "Let op: Als je dit aanzet zal alleen website die gehost worden in het land weergegeven worden.", + "config-country": "Land instellen", "config-lang": "Taal instellingen", "config-lang-search": "Zoek taal", "config-near": "Dichtbij", @@ -76,8 +74,7 @@ "lang_de": { "search": "Suchen", "config": "Einstellungen", - "config-country": "Ergebnisse nach Land filtern", - "config-country-help": "Hinweis: Wenn aktiv, wird eine Webseite nur angezeigt, wenn sie auch in dem jeweiligen Land *gehosted* wird.", + "config-country": "Land einstellen", "config-lang": "Oberflächen-Sprache", "config-lang-search": "Such-Sprache", "config-near": "In der Nähe von", @@ -113,8 +110,7 @@ "lang_es": { "search": "Buscar", "config": "Configuración", - "config-country": "Filtrar Resultados por País", - "config-country-help": "Nota: Si está habilitado, un sitio web solo aparecerá en los resultados de búsqueda si está alojado en ese país.", + "config-country": "Establecer País", "config-lang": "Idioma de Interfaz", "config-lang-search": "Idioma de Búsqueda", "config-near": "Cerca", @@ -150,8 +146,7 @@ "lang_it": { "search": "Cerca", "config": "Impostazioni", - "config-country": "Filtra risultati per paese", - "config-country-help": "Nota: se abilitato, il sito sarà presente tra i risultati se e soltanto se il server risiede nel paese selezionato", + "config-country": "Imposta Paese", "config-lang": "Lingua dell'interfaccia", "config-lang-search": "Lingua della ricerca", "config-near": "Vicino", @@ -187,8 +182,7 @@ "lang_pt": { "search": "Pesquisar", "config": "Configuração", - "config-country": "Filtrar Resultados por País", - "config-country-help": "Observação: Se ativado, um site só aparecerá nos resultados da pesquisa se estiver *hospedado* no país selecionado.", + "config-country": "Definir País", "config-lang": "Idioma da Interface", "config-lang-search": "Idioma da Pesquisa", "config-near": "Perto", @@ -224,8 +218,7 @@ "lang_ru": { "search": "Поиск", "config": "Настройка", - "config-country": "Фильтр результатов по стране", - "config-country-help": "Примечание: Если включено, то веб-сайт будет отображаться в результатах поиска только в том случае, если он *размещен* в выбранной стране.", + "config-country": "Установить страну", "config-lang": "Язык интерфейса", "config-lang-search": "Язык поиска", "config-near": "Около", @@ -261,8 +254,7 @@ "lang_zh-CN": { "search": "搜索", "config": "配置", - "config-country": "按国家过滤搜索结果", - "config-country-help": "注意:启用后,只有在所选国家*部署*的网站会出现在搜索结果中。", + "config-country": "设置国家", "config-lang": "界面语言", "config-lang-search": "搜索语言", "config-near": "接近", @@ -298,8 +290,7 @@ "lang_si": { "search": "සොයන්න", "config": "වින්‍යාසය", - "config-country": "රට අනුව ප්‍රතිඵල පෙරන්න", - "config-country-help": "සටහන: සබල කර ඇත්නම්, වියමන අඩවියක් සෙවුම් ප්‍රතිඵලවල දිස්වන්නේ එය තෝරාගත් රටෙහි සිට *සත්කාරකත්වය* දරන්නේ නම් පමණි.", + "config-country": "රට සකසන්න", "config-lang": "අතුරු මුහුණතෙහි භාෂාව", "config-lang-search": "සෙවුම් භාෂාව", "config-near": "ආසන්න", @@ -335,8 +326,7 @@ "lang_fr": { "search": "Chercher", "config": "Configuration", - "config-country": "Filter les Résultats par Pays", - "config-country-help": "Note : Si activé, un site web va uniquement apparaitre dans les résultat de la recherche si il est *hébérgé* dans le pays sélectionné.", + "config-country": "Définir le pays", "config-lang": "Langage de l'Interface", "config-lang-search": "Langage de Recherche", "config-near": "Proche", @@ -372,8 +362,7 @@ "lang_fa": { "search": "جستجو", "config": "پیکربندی", - "config-country": "فیلتر نتایج بر اساس کشور", - "config-country-help": "توجه: در صورت فعال بودن، وبسایت تنها در صورتی نمایش داده می‌شود که *در کشور انتخابی میزبانی شده باشد*.", + "config-country": "کشور را تنظیم کنید", "config-lang": "زبان رابط کاربری", "config-lang-search": "زبان جستجو", "config-near": "نزدیک", @@ -409,8 +398,7 @@ "lang_cs": { "search": "Hledat", "config": "Konfigurace", - "config-country": "Filtrovat výsledky podle země", - "config-country-help": "Poznámka: Pokud je povoleno, webová stránka se objeví ve výsledcích vyhledávání, pouze pokud je *hostována* ve vybrané zemi.", + "config-country": "Nastavte zemi", "config-lang": "Jazyk rozhraní", "config-lang-search": "Jazyk vyhledávání", "config-near": "Poblíž", @@ -446,8 +434,7 @@ "lang_zh-TW": { "search": "搜尋", "config": "設定", - "config-country": "依國家過濾結果", - "config-country-help": "注意:一經套用,只有在部署在指定國家內的網站會出現在搜尋結果中。", + "config-country": "設置國家", "config-lang": "界面語言", "config-lang-search": "搜尋語言", "config-near": "接近", @@ -483,8 +470,7 @@ "lang_bg": { "search": "Търсене", "config": "Конфигурация", - "config-country": "Филтрирай резултатите по държави", - "config-country-help": "Забележка: Ако това е разрешено, уебсайтoвете ще се показват в резултатите от търсенето, само ако са * хоствани * в избраната държава.", + "config-country": "Задайте държава", "config-lang": "Език на интерфейса", "config-lang-search": "Език за търсене", "config-near": "Близо до", @@ -520,8 +506,7 @@ "lang_hi": { "search": "खोज", "config": "कॉन्फ़िगरेशन", - "config-country": "देश के अनुसार परिणाम फ़िल्टर करें", - "config-country-help": "नोट: यदि सक्षम है, तो कोई वेबसाइट खोज परिणामों में केवल तभी दिखाई देगी जब वह चयनित देश में *होस्ट* हो।", + "config-country": "देश सेट करें", "config-lang": "इंटरफ़ेस भाषा", "config-lang-search": "खोज की भाषा", "config-near": "पास", @@ -557,8 +542,7 @@ "lang_ja": { "search": "検索", "config": "設定", - "config-country": "検索結果を国でフィルタ", - "config-country-help": "注: 有効にした場合、選択した国で*ホストされている*ウェブサイトのみが検索結果に表示されます。", + "config-country": "国を設定する", "config-lang": "インタフェースの言語", "config-lang-search": "検索する言語", "config-near": "場所", diff --git a/app/templates/index.html b/app/templates/index.html index e52e59e..6957d2d 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -97,7 +97,6 @@ {% endfor %} -
— {{ translation['config-country-help'] }}
From 73f631b1f977f1bd0640655382a2614f76567659 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 24 Nov 2021 12:38:56 -0700 Subject: [PATCH 12/12] Import logo stylesheet before applying custom css This fixes #551, and allows custom css to be applied to the Whoogle logo. --- app/templates/display.html | 1 + app/templates/index.html | 1 + app/templates/logo.html | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/display.html b/app/templates/display.html index df896b3..3cd76b6 100644 --- a/app/templates/display.html +++ b/app/templates/display.html @@ -5,6 +5,7 @@ + diff --git a/app/templates/index.html b/app/templates/index.html index 6957d2d..a71ea2e 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -21,6 +21,7 @@ + {% if config.theme %} {% if config.theme == 'system' %}