From 3c065191308c3acebf3cc0086c485da75e3a36aa Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Tue, 23 Nov 2021 13:48:54 -0700 Subject: [PATCH] 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'] }}