fix missing lang strings
This commit is contained in:
parent
2757fc8d80
commit
2f347bb759
10 changed files with 19 additions and 20 deletions
|
@ -55,8 +55,8 @@ msgstr "Safe Search On"
|
||||||
msgid "save_settings"
|
msgid "save_settings"
|
||||||
msgstr "Save settings"
|
msgstr "Save settings"
|
||||||
|
|
||||||
msgid "page_title"
|
msgid "all_settings"
|
||||||
msgstr "Search results for '%s'"
|
msgstr "All settings"
|
||||||
|
|
||||||
msgid "site_name"
|
msgid "site_name"
|
||||||
msgstr "Ocásek"
|
msgstr "Ocásek"
|
||||||
|
|
|
@ -55,8 +55,8 @@ msgstr "Włączony filtr"
|
||||||
msgid "save_settings"
|
msgid "save_settings"
|
||||||
msgstr "Zapisz ustawienia"
|
msgstr "Zapisz ustawienia"
|
||||||
|
|
||||||
msgid "page_title"
|
msgid "all_settings"
|
||||||
msgstr "Wyniki wyszukiwania dla '%s'"
|
msgstr "Wszystkie ustawienia"
|
||||||
|
|
||||||
msgid "site_name"
|
msgid "site_name"
|
||||||
msgstr "Ocásek"
|
msgstr "Ocásek"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "page_title" .Query }}</title>
|
<title>{{ .Query }} - {{ translate "site_name" }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "page_title" .Query }}</title>
|
<title>{{ .Query }} - {{ translate "site_name" }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "page_title" .Query }}</title>
|
<title>{{ .Query }} - {{ translate "site_name" }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/style-fixedwidth.css">
|
<link rel="stylesheet" href="/static/css/style-fixedwidth.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "page_title" .Query }}</title>
|
<title>{{ translate "site_name" }} - {{ .Query }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "search_page_title" }}</title>
|
<title>{{ translate "site_name" }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/style-search.css">
|
<link rel="stylesheet" href="/static/css/style-search.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
<div class="settings-content">
|
<div class="settings-content">
|
||||||
<button id="settingsButton" onclick="window.location.href='/settings'">{{ translate "all_settings" }}</button> <!-- Well its unessesary to use js here but this menu will not work without js anyway -->
|
<button id="settingsButton" onclick="window.location.href='/settings'">{{ translate "all_settings" }}</button> <!-- Well its unessesary to use js here but this menu will not work without js anyway -->
|
||||||
<div class="theme-settings theme-mini-settings">
|
<div class="theme-settings theme-mini-settings">
|
||||||
<p><span class="highlight">{{ translate "current_theme" }}: </span> <span id="theme_name">{{.Theme}}</span></p>
|
<p><span class="highlight">{{ translate "theme" }}: </span> <span id="theme_name">{{.Theme}}</span></p>
|
||||||
<div class="themes-settings-menu">
|
<div class="themes-settings-menu">
|
||||||
<div><img class="view-image-search clickable" id="dark_theme" alt="{{ translate "dark_theme" }}" src="/static/images/dark.webp"></div>
|
<div><img class="view-image-search clickable" id="dark_theme" alt="{{ translate "dark_theme" }}" src="/static/images/dark.webp"></div>
|
||||||
<div><img class="view-image-search clickable" id="light_theme" alt="{{ translate "light_theme" }}" src="/static/images/light.webp"></div>
|
<div><img class="view-image-search clickable" id="light_theme" alt="{{ translate "light_theme" }}" src="/static/images/light.webp"></div>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "page_title" .Query }}</title>
|
<title>{{ .Query }} - {{ translate "site_name" }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
{{ if .IsThemeDark }}
|
{{ if .IsThemeDark }}
|
||||||
<meta name="darkreader-lock">
|
<meta name="darkreader-lock">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<title>{{ translate "page_title" .Query }}</title>
|
<title>{{ .Query }} - {{ translate "site_name" }}</title>
|
||||||
<link rel="stylesheet" href="/static/css/style.css">
|
<link rel="stylesheet" href="/static/css/style.css">
|
||||||
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
<link rel="stylesheet" href="/static/css/{{.Theme}}.css">
|
||||||
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
<link rel="search" type="application/opensearchdescription+xml" title="{{ translate "site_name" }}" href="/opensearch.xml">
|
||||||
|
|
|
@ -65,25 +65,24 @@ func buildSearchURL(query, safe, lang string, page, resultsPerPage int) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
langParam := ""
|
langParam := ""
|
||||||
var glParam, uuleParam string
|
var glParam string
|
||||||
|
|
||||||
if lang != "" {
|
if lang != "" {
|
||||||
// Use lang as the geolocation
|
// Use lang as the geolocation
|
||||||
langParam = "&lr=lang_" + lang
|
langParam = "&lr=lang_" + lang
|
||||||
glParam = "&gl=" + lang
|
glParam = "&gl=" + lang
|
||||||
uuleParam = ""
|
|
||||||
} else {
|
} else {
|
||||||
// Use random geolocation
|
// Use default geolocation
|
||||||
glParam, uuleParam = "us", "us"
|
glParam = "&gl=us"
|
||||||
}
|
}
|
||||||
|
|
||||||
startIndex := (page - 1) * resultsPerPage
|
startIndex := (page - 1) * resultsPerPage
|
||||||
|
|
||||||
printDebug(fmt.Sprintf("https://www.google.com/search?q=%s%s%s%s%s&start=%d",
|
printDebug(fmt.Sprintf("https://www.google.com/search?q=%s%s%s%s&start=%d",
|
||||||
url.QueryEscape(query), safeParam, langParam, glParam, uuleParam, startIndex))
|
url.QueryEscape(query), safeParam, langParam, glParam, startIndex))
|
||||||
|
|
||||||
return fmt.Sprintf("https://www.google.com/search?q=%s%s%s%s%s&start=%d",
|
return fmt.Sprintf("https://www.google.com/search?q=%s%s%s%s&start=%d",
|
||||||
url.QueryEscape(query), safeParam, langParam, glParam, uuleParam, startIndex)
|
url.QueryEscape(query), safeParam, langParam, glParam, startIndex)
|
||||||
}
|
}
|
||||||
|
|
||||||
// func getRandomGeoLocation() (string, string) {
|
// func getRandomGeoLocation() (string, string) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue