diff --git a/donate.php b/donate.php index 4653ba4..1426dee 100644 --- a/donate.php +++ b/donate.php @@ -10,8 +10,7 @@
There are no results. Please try different keywords!
"; + echo "" . TEXTS["failure_empty"] . "
"; return; } diff --git a/engines/librex/fallback.php b/engines/librex/fallback.php index d3b6c34..4e22173 100644 --- a/engines/librex/fallback.php +++ b/engines/librex/fallback.php @@ -67,7 +67,7 @@ return array( "error" => array( - "message" => "No results found. Unable to fallback to other instances." + "message" => TEXTS["failure_fallback"] ) ); } diff --git a/engines/text/duckduckgo.php b/engines/text/duckduckgo.php index da35f93..ae80446 100644 --- a/engines/text/duckduckgo.php +++ b/engines/text/duckduckgo.php @@ -1,7 +1,6 @@ query)); $results = array(); @@ -53,7 +52,7 @@ // base_url is to be removed in the future, see #47 "base_url" => htmlspecialchars(get_base_url($url)), "description" => $description == null ? - "No description was provided for this site." : + TEXTS["result_no_description"] : htmlspecialchars($description->textContent) ) ); diff --git a/engines/text/google.php b/engines/text/google.php index 814eb47..8435743 100644 --- a/engines/text/google.php +++ b/engines/text/google.php @@ -64,7 +64,7 @@ // base_url is to be removed in the future, see #47 "base_url" => htmlspecialchars(get_base_url($url)), "description" => $description == null ? - "No description was provided for this site." : + TEXTS["result_no_description"] : htmlspecialchars($description->textContent) ) ); @@ -72,7 +72,7 @@ if (empty($results) && !str_contains($response, "Our systems have detected unusual traffic from your computer network.")) { $results["error"] = array( - "message" => "There are no results. Please try different keywords!" + "message" => TEXTS["failure_empty"] ); } diff --git a/index.php b/index.php index 92df811..288eb54 100644 --- a/index.php +++ b/index.php @@ -10,8 +10,8 @@ diff --git a/instances.php b/instances.php index 0ecffc5..ad31932 100644 --- a/instances.php +++ b/instances.php @@ -51,7 +51,7 @@ list_instances($librey_instances); ?> -The following instances are running the older LibreX:
+LibreX")?>:
diff --git a/locale/en.php b/locale/en.php new file mode 100644 index 0000000..e5d9592 --- /dev/null +++ b/locale/en.php @@ -0,0 +1,53 @@ + "LibreY search", + "search_button" => "Search with LibreY", + "torrent_search_button" => "Search torrents with LibreY", + + "source_code_link" => "Source", + "instances_link" => "Instances", + "settings_link" => "Settings", + "api_link" => "API", + "donate_link" => "Donate ❤️", + + "latest_commit" => "Latest commit: %s", + + "category_general" => "General", + "category_images" => "Images", + "category_videos" => "Videos", + "category_torrents" => "Torrents", + "category_tor" => "Tor", + + "feature_disabled" => "The host has disabled this feature :C", + + "settings_title" => "Settings", + "settings_theme" => "Theme", + "settings_special_disabled" => "Disable special queries (e.g.: currency conversion)", + + "settings_frontends" => "Privacy friendly frontends", + "settings_frontends_description" => "For an example if you want to view YouTube without getting spied on, click on \"Invidious\", find the instance that is most suitable for you then paste it in (correct format: https://example.com)", + "settings_frontends_disable" => "Disable frontends", + + "settings_search_settings" => "Search settings", + "settings_language" => "Language", + + "settings_number_of_results" => "Number of results per page", + + "settings_safe_search" => "Safe search", + "settings_save" => "Save", + "settings_reset" => "Reset", + + + "failure_fallback" => "No results found. Unable to fallback to other instances.", + "failure_empty" => "No results found. Please try different keywords!", + "result_no_description" => "No description was provided for this site.", + + "instances_librex" => "The following instances are running the older %s", + + "donate_original_developer" => "Donate to the original developer of %s, a + project LibreY tries to improve.", + "donate_fork" => "Donate to the person that forked LibreX into %s" +); + +?> diff --git a/locale/localization.php b/locale/localization.php new file mode 100644 index 0000000..6e40791 --- /dev/null +++ b/locale/localization.php @@ -0,0 +1,27 @@ + diff --git a/misc/footer.php b/misc/footer.php index 9b1b179..af063d4 100644 --- a/misc/footer.php +++ b/misc/footer.php @@ -1,15 +1,15 @@diff --git a/misc/header.php b/misc/header.php index b7944bf..9a8ae7b 100644 --- a/misc/header.php +++ b/misc/header.php @@ -1,3 +1,4 @@ +
@@ -6,7 +7,7 @@ - + " type="application/opensearchdescription+xml" href="opensearch.xml?method=POST" rel="search"/> disable_bittorent_search) { - echo "
The host disabled this feature! :C
"; + echo "
" . TEXTS["feature_disabled"] . "
"; break; } @@ -129,7 +129,7 @@ case 4: if ($opts->disable_hidden_service_search) { - echo "
The host disabled this feature! :C
"; + echo "
" . TEXTS["feature_disabled"] . "
"; break; } require "engines/ahmia/hidden_service.php"; diff --git a/search.php b/search.php index 8fa24d7..0f71087 100644 --- a/search.php +++ b/search.php @@ -29,7 +29,7 @@
+ ?> -