* Add support for Lingva translations in results
Searches that contain the word "translate" and are normal search queries
(i.e. not news/images/video/etc) now create an iframe to a Lingva url to
translate the user's search using their configured search language.
The Lingva url can be configured using the WHOOGLE_ALT_TL env var, or
will fall back to the official Lingva instance url (lingva.ml).
For more info, visit https://github.com/TheDavidDelta/lingva-translate
* Add basic test for lingva results
* Allow user specified lingva instances through csp frame-src
* Fix pep8 issue
@ -311,6 +312,7 @@ There are a few optional environment variables available for customizing a Whoog
| WHOOGLE_ALT_YT | The youtube.com alternative to use when site alternatives are enabled in the config. |
| WHOOGLE_ALT_IG | The instagram.com alternative to use when site alternatives are enabled in the config. |
| WHOOGLE_ALT_RD | The reddit.com alternative to use when site alternatives are enabled in the config. |
| WHOOGLE_ALT_TL | The Google Translate alternative to use. This is used for all "translate ____" searches. |
### Config Environment Variables
These environment variables allow setting default config values, but can be overwritten manually by using the home page config menu. These allow a shortcut for destroying/rebuilding an instance to the same config state every time.
"description":"The Google Translate alternative to use for all searches following the 'translate ___' structure.",
"value":"lingva.ml",
"required":false
},
"WHOOGLE_CONFIG_COUNTRY":{
"description":"[CONFIG] The country to use for restricting search results (use values from https://raw.githubusercontent.com/benbusby/whoogle-search/develop/app/static/settings/countries.json)",
"config-country-help":"Note: If enabled, a website will only appear in the search results if it is *hosted* in the selected country.",
"config-lang":"Interface Language",
"config-lang-search":"Search Language",
"config-near":"Near",
"config-near-help":"City Name",
"config-block":"Block",
"config-block-help":"Comma-separated site list",
"config-nojs":"Show NoJS Links",
"config-dark":"Dark Mode",
"config-safe":"Safe Search",
"config-alts":"Replace Social Media Links",
"config-alts-help":"Replaces Twitter/YouTube/Instagram/etc links with privacy respecting alternatives.",
"config-new-tab":"Open Links in New Tab",
"config-images":"Full Size Image Search",
"config-images-help":"(Experimental) Adds the 'View Image' option to desktop image searches. This will cause image result thumbnails to be lower resolution.",
"config-tor":"Use Tor",
"config-get-only":"GET Requests Only",
"config-url":"Root URL",
"config-css":"Custom CSS",
"load":"Load",
"apply":"Apply",
"save-as":"Save As...",
"github-link":"View on GitHub",
"translate":"translate"
},
"lang_nl":{
"search":"Zoeken",
"config":"Instellingen",
@ -25,7 +54,8 @@
"load":"Laden",
"apply":"Opslaan",
"save-as":"Opslaan Als...",
"github-link":"Bekijk op GitHub"
"github-link":"Bekijk op GitHub",
"translate":"vertalen"
},
"lang_de":{
"search":"Suchen",
@ -53,35 +83,8 @@
"load":"Laden",
"apply":"Übernehmen",
"save-as":"Speichern unter...",
"github-link":"Auf GitHub öffnen"
},
"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-lang":"Interface Language",
"config-lang-search":"Search Language",
"config-near":"Near",
"config-near-help":"City Name",
"config-block":"Block",
"config-block-help":"Comma-separated site list",
"config-nojs":"Show NoJS Links",
"config-dark":"Dark Mode",
"config-safe":"Safe Search",
"config-alts":"Replace Social Media Links",
"config-alts-help":"Replaces Twitter/YouTube/Instagram/etc links with privacy respecting alternatives.",
"config-new-tab":"Open Links in New Tab",
"config-images":"Full Size Image Search",
"config-images-help":"(Experimental) Adds the 'View Image' option to desktop image searches. This will cause image result thumbnails to be lower resolution.",