diff --git a/router/modpanel.go b/router/modpanel.go index 04c67528..73ac081b 100644 --- a/router/modpanel.go +++ b/router/modpanel.go @@ -98,6 +98,14 @@ func (f *ReassignForm) ExecuteAction() (int, error) { return num, nil } +// Helper that creates a search form without items/page field +// these need to be used when the templateVariables don't include `Navigation` +func NewPanelSearchForm() SearchForm { + form := NewSearchForm() + form.ShowItemsPerPage = false + return form +} + func IndexModPanel(w http.ResponseWriter, r *http.Request) { currentUser := GetUser(r) @@ -110,9 +118,7 @@ func IndexModPanel(w http.ResponseWriter, r *http.Request) { torrentReports, _, _ := reportService.GetAllTorrentReports(offset, 0) languages.SetTranslationFromRequest(panelIndex, r, "en-us") - search := NewSearchForm() - search.ShowItemsPerPage = false - htv := PanelIndexVbs{torrents, model.TorrentReportsToJSON(torrentReports), users, comments, search, currentUser, r.URL} + htv := PanelIndexVbs{torrents, model.TorrentReportsToJSON(torrentReports), users, comments, NewPanelSearchForm(), currentUser, r.URL} err := panelIndex.ExecuteTemplate(w, "admin_index.html", htv) log.CheckError(err) } else { @@ -258,7 +264,7 @@ func TorrentEditModPanel(w http.ResponseWriter, r *http.Request) { uploadForm.Category = torrentJson.Category + "_" + torrentJson.SubCategory uploadForm.Status = torrentJson.Status uploadForm.Description = string(torrentJson.Description) - htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL} + htv := PanelTorrentEdVbs{uploadForm, NewPanelSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL} err := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv) log.CheckError(err) @@ -297,7 +303,7 @@ func TorrentPostEditModPanel(w http.ResponseWriter, r *http.Request) { } } languages.SetTranslationFromRequest(panelTorrentEd, r, "en-us") - htv := PanelTorrentEdVbs{uploadForm, NewSearchForm(), currentUser, err, infos, r.URL} + htv := PanelTorrentEdVbs{uploadForm, NewPanelSearchForm(), currentUser, err, infos, r.URL} err_ := panelTorrentEd.ExecuteTemplate(w, "admin_index.html", htv) log.CheckError(err_) } @@ -360,7 +366,7 @@ func TorrentReassignModPanel(w http.ResponseWriter, r *http.Request) { } languages.SetTranslationFromRequest(panelTorrentReassign, r, "en-us") - htv := PanelTorrentReassignVbs{ReassignForm{}, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL} + htv := PanelTorrentReassignVbs{ReassignForm{}, NewPanelSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL} err := panelTorrentReassign.ExecuteTemplate(w, "admin_index.html", htv) log.CheckError(err) } @@ -387,7 +393,7 @@ func TorrentPostReassignModPanel(w http.ResponseWriter, r *http.Request) { } } - htv := PanelTorrentReassignVbs{rForm, NewSearchForm(), currentUser, err, infos, r.URL} + htv := PanelTorrentReassignVbs{rForm, NewPanelSearchForm(), currentUser, err, infos, r.URL} err_ := panelTorrentReassign.ExecuteTemplate(w, "admin_index.html", htv) log.CheckError(err_) } diff --git a/templates/FAQ.html b/templates/FAQ.html index 28703d9e..9178f6a1 100644 --- a/templates/FAQ.html +++ b/templates/FAQ.html @@ -37,6 +37,9 @@

{{T "magnet_link_should_look_like"}} magnet:?xt=urn:btih:[hash]&dn=[name]&tr=[tracker]&tr=[...]

+

{{T "how_do_i_link_my_old_account"}}

+

{{T "answer_how_do_i_link_my_old_account"}}

+

{{T "which_trackers_do_you_recommend"}}

{{T "answer_which_trackers_do_you_recommend"}}

udp://tracker.doko.moe:6969
diff --git a/translations/en-us.all.json b/translations/en-us.all.json index f0abaa63..3d913c46 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -283,6 +283,14 @@ "id": "answer_how_are_we_recovering", "translation": "The aforementioned databases are being hosted at nyaa.pantsu.cat and sukebei.pantsu.cat. There is a search function, and (almost) full nyaa functionality should be coming soon." }, + { + "id": "how_do_i_link_my_old_account", + "translation": "How do I link my old uploads back to my new account?" + }, + { + "id": "answer_how_do_i_link_my_old_account", + "translation": "Join #nyaapantsu-help@Rizon and ask a moderator to migrate your old torrents while mentioning your old and new usernames." + }, { "id": "are_the_trackers_working", "translation": "Are the torrents still working?" diff --git a/translations/ja-jp.all.json b/translations/ja-jp.all.json index 5057c5d9..8898c611 100644 --- a/translations/ja-jp.all.json +++ b/translations/ja-jp.all.json @@ -309,7 +309,11 @@ }, { "id": "answer_which_trackers_do_you_recommend", - "translation": "トラッカーに Torrent のアップロードを拒否された場合は、この中のいくつかを追加する必要があります:" + "translation": "独自のトラッカーを用意していますので、アップロードする前にリストの一番上に追加してください:" + }, + { + "id": "other_trackers", + "translation": "ただし、うまくいかない場合に備え、これらも追加しておく必要があります" }, { "id": "how_can_i_help",