Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
Cette révision appartient à :
ElegantMonkey 2017-05-14 09:23:16 -03:00
révision f64ecb3d0f
23 fichiers modifiés avec 195 ajouts et 111 suppressions

Voir le fichier

@ -6,6 +6,12 @@
The aim of this project is to write a fully featured nyaa replacement in golang
that anyone will be able to deploy locally or remotely.
## [Roadmap](https://trello.com/b/gMJBwoRq/nyaa-pantsu-cat-roadmap)
The Roadmap will give you an overview of the features and tasks that the project are currently discussing, working on and have completed.
If you are looking for a feature that is not listed just make a GitHub Issue and it will get added to the trello board.
You can view the public trello board [here](https://trello.com/b/gMJBwoRq/nyaa-pantsu-cat-roadmap) or click on the "Roadmap".
# Requirements
* Golang

Voir le fichier

@ -27,8 +27,8 @@ func RunServer(conf *config.Config) {
// Set up server,
srv := &http.Server{
WriteTimeout: 24 * time.Second,
ReadTimeout: 8 * time.Second,
WriteTimeout: 5 * time.Second,
ReadTimeout: 5 * time.Second,
}
l, err := network.CreateHTTPListener(conf)
log.CheckError(err)

Voir le fichier

@ -224,6 +224,7 @@ div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:last-of-typ
#mainmenu .badgemenu {
padding-top: 0;
margin-right: -50px; /* don't ask */
}
/* PROFILE PAGE */

Voir le fichier

@ -8,11 +8,8 @@ import (
)
func FaqHandler(w http.ResponseWriter, r *http.Request) {
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
languages.SetTranslationFromRequest(faqTemplate, r, "en-us")
err := faqTemplate.ExecuteTemplate(w, "index.html", FaqTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
err := faqTemplate.ExecuteTemplate(w, "index.html", FaqTemplateVariables{Navigation{}, NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}

Voir le fichier

@ -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,7 +118,7 @@ func IndexModPanel(w http.ResponseWriter, r *http.Request) {
torrentReports, _, _ := reportService.GetAllTorrentReports(offset, 0)
languages.SetTranslationFromRequest(panelIndex, r, "en-us")
htv := PanelIndexVbs{torrents, model.TorrentReportsToJSON(torrentReports), users, comments, NewSearchForm(), 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 {
@ -137,9 +145,9 @@ func TorrentsListPanel(w http.ResponseWriter, r *http.Request) {
searchParam, torrents, _, err := search.SearchByQuery(r, pagenum)
searchForm := SearchForm{
SearchParam: searchParam,
Category: searchParam.Category.String(),
HideAdvancedSearch: false,
SearchParam: searchParam,
Category: searchParam.Category.String(),
ShowItemsPerPage: true,
}
languages.SetTranslationFromRequest(panelTorrentList, r, "en-us")
@ -256,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)
@ -295,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_)
}
@ -358,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)
}
@ -385,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_)
}

Voir le fichier

@ -10,11 +10,8 @@ import (
func NotFoundHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
languages.SetTranslationFromRequest(notFoundTemplate, r, "en-us")
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}

Voir le fichier

@ -38,9 +38,9 @@ func SearchHandler(w http.ResponseWriter, r *http.Request) {
navigationTorrents := Navigation{nbTorrents, int(searchParam.Max), pagenum, "search_page"}
// Convert back to strings for now.
searchForm := SearchForm{
SearchParam: searchParam,
Category: searchParam.Category.String(),
HideAdvancedSearch: false,
SearchParam: searchParam,
Category: searchParam.Category.String(),
ShowItemsPerPage: true,
}
htv := HomeTemplateVariables{b, searchForm, navigationTorrents, GetUser(r), r.URL, mux.CurrentRoute(r)}

Voir le fichier

@ -196,14 +196,15 @@ type Navigation struct {
type SearchForm struct {
common.SearchParam
Category string
HideAdvancedSearch bool
Category string
ShowItemsPerPage bool
}
// Some Default Values to ease things out
func NewSearchForm() SearchForm {
return SearchForm{
Category: "_",
ShowItemsPerPage: true,
}
}

Voir le fichier

@ -66,9 +66,7 @@ func UserProfileHandler(w http.ResponseWriter, r *http.Request) {
err["errors"] = append(err["errors"], errUser.Error())
}
languages.SetTranslationFromRequest(viewUserDeleteTemplate, r, "en-us")
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
htv := UserVerifyTemplateVariables{err, searchForm, Navigation{}, GetUser(r), r.URL, mux.CurrentRoute(r)}
htv := UserVerifyTemplateVariables{err, NewSearchForm(), Navigation{}, GetUser(r), r.URL, mux.CurrentRoute(r)}
errorTmpl := viewUserDeleteTemplate.ExecuteTemplate(w, "index.html", htv)
if errorTmpl != nil {
http.Error(w, errorTmpl.Error(), http.StatusInternalServerError)
@ -81,9 +79,7 @@ func UserProfileHandler(w http.ResponseWriter, r *http.Request) {
if unfollow != nil {
infosForm["infos"] = append(infosForm["infos"], fmt.Sprintf(T("user_unfollowed_msg"), userProfile.Username))
}
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
htv := UserProfileVariables{&userProfile, infosForm, searchForm, Navigation{}, currentUser, r.URL, mux.CurrentRoute(r)}
htv := UserProfileVariables{&userProfile, infosForm, NewSearchForm(), Navigation{}, currentUser, r.URL, mux.CurrentRoute(r)}
err := viewProfileTemplate.ExecuteTemplate(w, "index.html", htv)
if err != nil {
@ -91,11 +87,8 @@ func UserProfileHandler(w http.ResponseWriter, r *http.Request) {
}
}
} else {
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
languages.SetTranslationFromRequest(notFoundTemplate, r, "en-us")
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
@ -113,21 +106,16 @@ func UserDetailsHandler(w http.ResponseWriter, r *http.Request) {
b := form.UserForm{}
modelHelper.BindValueForm(&b, r)
languages.SetTranslationFromRequest(viewProfileEditTemplate, r, "en-us")
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
availableLanguages := languages.GetAvailableLanguages()
htv := UserProfileEditVariables{&userProfile, b, form.NewErrors(), form.NewInfos(), availableLanguages, searchForm, Navigation{}, currentUser, r.URL, mux.CurrentRoute(r)}
htv := UserProfileEditVariables{&userProfile, b, form.NewErrors(), form.NewInfos(), availableLanguages, NewSearchForm(), Navigation{}, currentUser, r.URL, mux.CurrentRoute(r)}
err := viewProfileEditTemplate.ExecuteTemplate(w, "index.html", htv)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
} else {
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
languages.SetTranslationFromRequest(notFoundTemplate, r, "en-us")
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
@ -185,21 +173,15 @@ func UserProfileFormHandler(w http.ResponseWriter, r *http.Request) {
http.Error(w, errorTmpl.Error(), http.StatusInternalServerError)
}
} else {
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
languages.SetTranslationFromRequest(notFoundTemplate, r, "en-us")
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
} else {
searchForm := NewSearchForm()
searchForm.HideAdvancedSearch = true
languages.SetTranslationFromRequest(notFoundTemplate, r, "en-us")
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, searchForm, GetUser(r), r.URL, mux.CurrentRoute(r)})
err := notFoundTemplate.ExecuteTemplate(w, "index.html", NotFoundTemplateVariables{Navigation{}, NewSearchForm(), GetUser(r), r.URL, mux.CurrentRoute(r)})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}

Voir le fichier

@ -37,6 +37,9 @@
<p>{{T "magnet_link_should_look_like"}} <span style="font-family:monospace">
magnet:?xt=urn:btih:[hash]&amp;dn=[name]&amp;tr=[tracker]&amp;tr=[...]</span></p>
<h2>{{T "how_do_i_link_my_old_account"}}</h2>
<p>{{T "answer_how_do_i_link_my_old_account"}}</p>
<h2 id="trackers">{{T "which_trackers_do_you_recommend"}}</h2>
<p>{{T "answer_which_trackers_do_you_recommend"}}</p>
<pre>udp://tracker.doko.moe:6969</pre>

Voir le fichier

@ -7,6 +7,7 @@
<img src="https://www.gravatar.com/avatar/{{ .MD5 }}?s=50" class="img-circle special-img"> {{ .Username }} <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}"><i class="fa fa-cog"></i> {{T "profile"}}</a></li>
<li><a href="{{ genRoute "user_profile_edit" "id" (print .ID) "username" .Username }}"><i class="fa fa-cog"></i> {{T "settings"}}</a></li>
{{if HasAdmin . }}<li><a href="{{ genRoute "mod_index" }}"><i class="fa fa-cog"></i> {{T "moderation"}}</a></li>{{end}}
<li class="divider"></li>
<li><a href="{{ genRoute "user_logout" }}"><i class="fa fa-sign-out"></i> {{ T "sign_out"}}</a></li>

Voir le fichier

@ -9,6 +9,10 @@
<h3>{{ T "personal_info"}}</h3>
<form class="form-horizontal" role="form" method="POST">
<div class="form-group">
<label class="col-lg-3 control-label">{{T "api_token" }}:</label>
<div class="col-lg-8">{{.ApiToken}}</div>
</div>
<div class="form-group">
<label class="col-lg-3 control-label">{{ T "email_address" }}:</label>
<div class="col-lg-8">

Voir le fichier

@ -31,6 +31,7 @@
<option value="2" {{if eq .Search.Status 2}}selected{{end}}>{{T "trusted"}}</option>
<option value="3" {{if eq .Search.Status 3}}selected{{end}}>A+</option>
</select>
{{ if .Search.ShowItemsPerPage }}
<select id="max" name="max" class="form-control input-sm">
<option value="5" {{if eq .Navigation.MaxItemPerPage 5}}selected{{end}}>5</option>
<option value="10" {{if eq .Navigation.MaxItemPerPage 10}}selected{{end}}>10</option>
@ -48,9 +49,26 @@
<option value="200" {{if eq .Navigation.MaxItemPerPage 200}}selected{{end}}>200</option>
<option value="300" {{if eq .Navigation.MaxItemPerPage 300}}selected{{end}}>300</option>
</select>
{{ end }}
<input type="hidden" name="userID" value="{{ .Search.UserID }}">
{{end}}
{{/* this is used in the modpanel */}}
{{define "search_advanced"}}
<select name="sort" class="form-control input-sm">
<option value="0" {{if eq .Search.Sort 0}}selected{{end}}>{{T "id"}}</option>
<option value="1" {{if eq .Search.Sort 1}}selected{{end}}>{{T "name"}}</option>
<option value="2" {{if eq .Search.Sort 2}}selected{{end}}>{{T "date"}}</option>
<option value="3" {{if eq .Search.Sort 3}}selected{{end}}>{{T "downloads"}}</option>
<option value="4" {{if eq .Search.Sort 4}}selected{{end}}>{{T "size"}}</option>
<option value="5" {{if eq .Search.Sort 4}}selected{{end}}>{{T "seeders"}}</option>
<option value="6" {{if eq .Search.Sort 4}}selected{{end}}>{{T "leechers"}}</option>
<option value="7" {{if eq .Search.Sort 4}}selected{{end}}>{{T "completed"}}</option>
</select>
<select name="order" class="form-control input-sm">
<option value="false" {{if eq .Search.Order false}}selected{{end}}>{{T "descending"}}</option>
<option value="true" {{if eq .Search.Order true}}selected{{end}}>{{T "ascending"}}</option>
</select>
{{end}}
{{define "search_button"}}
<div class="input-group">
<input name="q" class="form-control input-sm" placeholder="{{T "search"}}" type="text" value="{{.Search.Query}}">

Voir le fichier

@ -10,8 +10,9 @@
<th>{{T "size"}}</th>
<th>{{T "links"}}</th>
</tr>
{{ range .Torrents }}
{{ with .ToJSON }}
{{ range $i, $t := .Torrents }}
{{ if lt $i 16 }}
{{ with $t.ToJSON }}
<tr class="torrent-info
{{if eq .Status 2}}remake{{end}}
{{if eq .Status 3}}trusted{{end}}
@ -42,6 +43,7 @@
</tr>
{{end}}
{{end}}
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">

Voir le fichier

@ -305,11 +305,15 @@
},
{
"id": "which_trackers_do_you_recommend",
"translation": "Welche Tracker sind empfohlen?"
"translation": "Welche Tracker empfehlt ihr?"
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "Wenn deine Torrents wegen Trackern Probleme machen, solltest du einige dieser hinzufügen:"
"translation": "Wir haben jetzt unseren eigenen Tracker! Füge ihn vorm Hochladen deinen Torrents hinzu:"
},
{
"id": "other_trackers",
"translation": "Allerdings solltest du diese auch hinzufügen, nur für den Fall, dass etwas schief läuft"
},
{
"id": "how_can_i_help",

Voir le fichier

@ -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 <a href=\"ircs://irc.rizon.net/nyaapantsu-help\">#nyaapantsu-help@Rizon</a> 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?"
@ -345,7 +353,7 @@
},
{
"id": "uploading_file_prefills_fields",
"translation": "Uploading a torrent file allows pre-filling some fields, this is recommended."
"translation": "Uploading a torrent file allows pre-filling some fields. This is recommended."
},
{
"id": "magnet_link",
@ -547,6 +555,10 @@
"id": "moderator",
"translation": "Moderator"
},
{
"id":" api_token",
"translation": "API Token"
},
{
"id": "save_changes",
"translation": "Save Changes"

Voir le fichier

@ -101,15 +101,15 @@
},
{
"id":"signup_verification_email",
"translation": "Per concludere, controlla la tua casella email (e la cartella spam!) per l'email di verifica."
"translation": "Per concludere controlla la tua casella email (e la cartella spam!) per l'email di verifica."
},
{
"id":"signup_verification_noemail",
"translation": "La registrazione è avvenuta con successo, adesso puoi usare il tuo account."
"translation": "La registrazione è avvenuta con successo. Ora puoi usare il tuo account."
},
{
"id":"settings",
"translation": "Settaggi Account"
"translation": "Impostazioni Account"
},
{
"id":"torrents",
@ -173,7 +173,7 @@
},
{
"id": "upload",
"translation": "Carica"
"translation": "Upload"
},
{
"id": "faq",
@ -209,7 +209,7 @@
},
{
"id": "member",
"translation": "Membro"
"translation": "Utente"
},
{
"id": "sign_in",
@ -233,7 +233,7 @@
},
{
"id": "links_replacement_mirror",
"translation": "Collegamenti di sostituzione/mirror"
"translation": "Mirror"
},
{
"id": "what_happened",
@ -273,7 +273,7 @@
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "Sukebei può essere effettivamente in condizioni peggiori. Attualmente abbiamo i database di sukebei solo fino al 2016, ma un nuovo database potrebbe diventare disponible."
"translation": "Anche sukebei è al sicuro, e quasi nulla è andato perso."
},
{
"id": "how_are_we_recovering",
@ -281,7 +281,7 @@
},
{
"id": "answer_how_are_we_recovering",
"translation": "I database citati sono attualmente hostati su nyaa.pantsu.cat e sukebei.pantsu.cat. C'è una funzione di ricerca, e (almost) full nyaa functionality dovrebbe arrivare presto. Le statistiche dei Seeder/leecher sono possibili attraverso scraping e potrebbero essere ripristinate in futuro, visto che altre funzionalità hanno la precedenza adesso."
"translation": "I database citati sono attualmente hostati su nyaa.pantsu.cat e sukebei.pantsu.cat. C'è una funzione di ricerca, e (quasi) tutte le altre dovrebbero arrivare presto. Le statistiche dei Seeder/leecher sono possibili attraverso scraping e potrebbero essere ripristinate in futuro, visto che altre funzionalità hanno la precedenza adesso."
},
{
"id": "are_the_trackers_working",
@ -309,7 +309,7 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "Se il caricamente del tuo torrent è negato a causa dei trackers, dovrai aggiungere alcuni di questi:"
"translation": "Se il caricamento del tuo torrent è negato a causa dei trackers, dovrai aggiungere alcuni di questi:"
},
{
"id": "how_can_i_help",
@ -341,7 +341,7 @@
},
{
"id": "uploading_file_prefills_fields",
"translation": "Caricare un file torrent permette di auto-riempire alcuni campi, è raccomandato farlo."
"translation": "Caricare un file torrent permette di auto-riempire alcuni campi. È raccomandato farlo."
},
{
"id": "magnet_link",
@ -389,7 +389,7 @@
},
{
"id": "literature_english_translated",
"translation": "Letteratura - Tradotti in Inglese"
"translation": "Letteratura - Tradotta in Inglese"
},
{
"id": "literature_raw",
@ -397,7 +397,7 @@
},
{
"id": "literature_non_english_translated",
"translation": "Letteratura - Tradotti in altre lingue"
"translation": "Letteratura - Tradotta in altre lingue"
},
{
"id": "live_action",
@ -409,7 +409,7 @@
},
{
"id": "live_action_idol_pv",
"translation": "Live Action - Idol/Video Promozionali"
"translation": "Live Action - Idol/Videoclip"
},
{
"id": "live_action_non_english_translated",
@ -481,7 +481,7 @@
},
{
"id": "search",
"translation": "Ricerca"
"translation": "Cerca"
},
{
"id": "hash",
@ -513,7 +513,7 @@
},
{
"id": "language",
"translation": "Linguaggio"
"translation": "Lingua"
},
{
"id": "current_password",

Voir le fichier

@ -25,7 +25,7 @@
},
{
"id":"signup_box_title",
"translation": "登録 <small>ずっと無料です</small>"
"translation": "登録 <small>永久無料です</small>"
},
{
"id":"username",
@ -53,7 +53,7 @@
},
{
"id":"terms_conditions_confirm",
"translation": "<strong class=\"label label-primary\">登録</strong> をクリックすることにより、Cookie の使用を含む、本サイトの <a href=\"#\" data-toggle=\"modal\" data-target=\"#t_and_c_m\">利用規約</a> に同意したものとみなします。"
"translation": "<strong class=\"label label-primary\">登録</strong> をクリックすることにより、クッキーの使用を含む、本サイトの <a href=\"#\" data-toggle=\"modal\" data-target=\"#t_and_c_m\">利用規約</a> に同意したものとみなします。"
},
{
"id":"signin",
@ -101,7 +101,7 @@
},
{
"id":"signup_verification_email",
"translation": "認証メールを送信しました。メールボックスを確認してください。迷惑メールフォルダーの確認もお忘れずに。"
"translation": "認証メールを送信しました。メールボックスを確認してください。迷惑メールフォルダーの確認もお忘れなく。"
},
{
"id":"signup_verification_noemail",
@ -109,7 +109,7 @@
},
{
"id":"settings",
"translation": "アカウント設定"
"translation": "アカウント設定"
},
{
"id":"torrents",
@ -189,7 +189,7 @@
},
{
"id": "nothing_here",
"translation": "何もありません"
"translation": "ここには何もありません"
},
{
"id": "404_not_found",
@ -225,7 +225,7 @@
},
{
"id": "notice_keep_seeding",
"translation": "お願い: DHT 機能を有効にし、なるべくシードを継続してください"
"translation": "お知らせ: DHT 機能を有効にし、なるべくシードを継続してください"
},
{
"id": "official_nyaapocalipse_faq",
@ -245,7 +245,7 @@
},
{
"id": "its_not_a_ddos",
"translation": "いつものような DDoS 攻撃ではなく、利用停止になった。"
"translation": "いつものような DDoS 攻撃ではなく、サイト自体が利用停止になった。"
},
{
"id": "future_not_looking_good",
@ -261,7 +261,7 @@
},
{
"id": "in_short_no",
"translation": "いいえ。"
"translation": "一言で言えば、NO です。"
},
{
"id": "are_some_things_lost",
@ -273,7 +273,7 @@
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "ただし sukebei は別です。sukebei に至っては 2016年までのデータベースしか手元にありません。ただ、今後新しいデータベースが使える可能性はあります。"
"translation": "sukebei の方も問題なく、ほとんど失われていません。"
},
{
"id": "how_are_we_recovering",
@ -283,6 +283,14 @@
"id": "answer_how_are_we_recovering",
"translation": "上述のデータベースは nyaa.pantsu.cat と sukebei.pantsu.cat にホストされています。検索機能はすでにあり、近いうちに nyaa.se にあったほぼすべての機能が利用可能になるでしょう。"
},
{
"id": "how_do_i_link_my_old_account",
"translation": "以前のアップロードを新しいアカウントにリンクさせるにはどうすればいいの?"
},
{
"id": "answer_how_do_i_link_my_old_account",
"translation": "<a href=\"ircs://irc.rizon.net/nyaapantsu-help\">#nyaapantsu-help@Rizon</a> に参加し、モデレーターに以前のユーザー名と新しいユーザー名を添えて Torrent を移行するようお申し付けください。"
},
{
"id": "are_the_trackers_working",
"translation": "Torrent ファイルはまだ利用できる?"
@ -309,7 +317,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "トラッカーに Torrent のアップロードを拒否された場合は、この中のいくつかを追加する必要があります:"
"translation": "独自のトラッカーを用意していますので、アップロードする前にリストの一番上に追加してください:"
},
{
"id": "other_trackers",
"translation": "ただし、うまくいかない場合に備え、これらも追加しておく必要があります"
},
{
"id": "how_can_i_help",
@ -317,7 +329,7 @@
},
{
"id": "answer_how_can_i_help",
"translation": "ウェブ開発の経験があるのであれば、irc.rizon.net の #nyaapantsu IRC チャンネルに参加することができますよ。現在のデータベースがあるのなら、特に sukebei の方ですが、<b>ぜひともアップロードしていただきたいです。</b>"
"translation": "ウェブ開発の専門知識がおありでしたら、irc.rizon.net の #nyaapantsu IRC チャンネルに参加できますよ。また、現在のデータベースをお持ちの場合、特に sukebei の場合は、<b>ぜひともアップロードしていただきたいです。</b>"
},
{
"id": "your_design_sucks_found_a_bug",
@ -381,11 +393,11 @@
},
{
"id": "audio_lossless",
"translation": "オーディオ 可逆圧縮方式 (flacなど)"
"translation": "オーディオ 可逆圧縮方式 (FLAC など)"
},
{
"id": "audio_lossy",
"translation": "オーディオ 非可逆圧縮方式 (mp3など)"
"translation": "オーディオ 非可逆圧縮方式 (MP3 など)"
},
{
"id": "literature",
@ -543,6 +555,10 @@
"id": "moderator",
"translation": "モデレーター"
},
{
"id":" api_token",
"translation": "API トークン"
},
{
"id": "save_changes",
"translation": "変更を保存"

Voir le fichier

@ -309,7 +309,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "Se o seu torrent for negado por conta de trackers, você vai precisar adicionar alguns desses:"
"translation": "Agora nós possuímos nosso próprio Tracker, adicione-o ao topo da lista antes de enviar um torrent:"
},
{
"id": "other_trackers",
"translation": "Mas você também deve adicionar estes, para caso algo dê errado."
},
{
"id": "how_can_i_help",

Voir le fichier

@ -309,7 +309,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "ถ้าทอร์เรนท์ของคุณอัพโหลดไม่ได้เพราะแทรคเกอร์คุณควรใส่ตามนี้:"
"translation": "เรามีแทรคเกอร์เป็นของตัวเองแล้ว! กรุณาใส่ไว้บนสุดของลิสต์ก่อนอัพโหลด:"
},
{
"id": "other_trackers",
"translation": "แต่คุณควรใส่ตามนี้ลงไปด้วยเผื่อมันมีอันเป็นไป"
},
{
"id": "how_can_i_help",

Voir le fichier

@ -273,7 +273,7 @@
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "然而 sukebei 就没那么幸运了。种子库只备份到 2016年但也许能找到更新的版本"
"translation": "而 sukebei 也一样,几乎没有什么损失"
},
{
"id": "how_are_we_recovering",
@ -281,7 +281,7 @@
},
{
"id": "answer_how_are_we_recovering",
"translation": "前面所说的资料都存放在 nyaa.pantsu.cat 和 sukebei.pantsu.cat 的服务器上。 我们也会尽力恢复旧 nyaa 站的全部功能。 而在未来的某一天,种子和链接数的统计资料也可能通过抓取其他 tracker 來恢复!不过先要把眼前的工作完成再说。"
"translation": "前面所说的资料都存放在 nyaa.pantsu.cat 和 sukebei.pantsu.cat 的服务器上。 我们也会尽快恢复旧 nyaa 站的全部功能。"
},
{
"id": "are_the_trackers_working",
@ -309,7 +309,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "如果您上传种子被拒绝,原因是 tracker 不符合要求,那有可能需要加上这几个 tracker"
"translation": "现在我们有自己的 tracker 啦!在上传之前把他们放在 tracker 列表的顶部吧!"
},
{
"id": "other_trackers",
"translation": "当然,你也可以使用以下的 tracker ,不过某些情况下可能会出现错误。"
},
{
"id": "how_can_i_help",
@ -626,5 +630,9 @@
{
"id": "language_name",
"translation": "简体中文"
},
{
"id": "delete",
"translation": "删除"
}
]

Voir le fichier

@ -13,15 +13,15 @@
},
{
"id": "reset_password_title",
"translation": "喵 重密碼"
"translation": "喵 重密碼"
},
{
"id": "reset_password_content",
"translation": "請按下面連結重密碼"
"translation": "請按下面連結重密碼"
},
{
"id":"register_title",
"translation": "建新帳號"
"translation": "新帳號"
},
{
"id":"signup_box_title",
@ -161,7 +161,7 @@
},
{
"id": "home",
"translation": "頁"
"translation": "頁"
},
{
"id": "error_404",
@ -169,7 +169,7 @@
},
{
"id": "toggle_navigation",
"translation": "切換導列"
"translation": "切換導列"
},
{
"id": "upload",
@ -177,11 +177,11 @@
},
{
"id": "faq",
"translation": "有問有答"
"translation": "常見問題"
},
{
"id": "fap",
"translation": "不尻嗎"
"translation": "尻尻"
},
{
"id": "advanced_search",
@ -221,7 +221,7 @@
},
{
"id": "no_results_found",
"translation": "沒有結果喔"
"translation": "找不到結果"
},
{
"id": "notice_keep_seeding",
@ -249,7 +249,7 @@
},
{
"id": "future_not_looking_good",
"translation": "nyaa 的未來並不明朗(她真的離開了)"
"translation": "nyaa 的未來並不樂觀(她真的離開了)"
},
{
"id": "recovery_effort",
@ -265,15 +265,15 @@
},
{
"id": "are_some_things_lost",
"translation": "那有一部分的東西消失了嗎?"
"translation": "那有東西消失了嗎?"
},
{
"id": "answer_is_nyaa_db_lost",
"translation": "我們有 nyaa 種子資料庫直到 <s>4月5日</s> 5月1日這表示幾乎沒失去任何東西"
"translation": "我們有直到 <s>4月5日</s> 5月1日的 nyaa 種子資料庫,這表示幾乎沒失去任何東西"
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "然而 sukebei 的命運比較坎坷。目前資料庫只有備份到 2016年但也許有個新的日期版本可供使用"
"translation": "sukebei 還活著,也幾乎沒有雷到。然而 sukebei 的命運比較坎坷。目前資料庫只有備份到 2016年但也許有個新的日期版本可供使用"
},
{
"id": "how_are_we_recovering",
@ -309,7 +309,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "如果您上傳種子遭到拒絕,原因是 tracker 不符要求,那有可能需要加上這其中幾個 tracker"
"translation": "我們現在有自己的 Tracker 啦!如果您上傳種子遭到拒絕,原因是 tracker 不符要求,那有可能需要加上這其中幾個 tracker"
},
{
"id": "other_trackers",
"translation": "不過你最好再加上這些,免得雷到。"
},
{
"id": "how_can_i_help",
@ -325,11 +329,11 @@
},
{
"id": "why_written_in_go",
"translation": "爲啥要用 GO 寫啊?沒其他更好的程式語言"
"translation": "你的狗屎爛蛋為什麼用Go寫"
},
{
"id": "authors_favorite_language",
"translation": "這是作者的愛啊啊啊啊"
"translation": "作者尬意"
},
{
"id": "upload_magnet",
@ -351,6 +355,10 @@
"id": "all_categories",
"translation": "所有分類"
},
{
"id": "select_a_torrent_category",
"translation": "選擇種子分類"
},
{
"id": "anime",
"translation": "動畫"
@ -449,7 +457,7 @@
},
{
"id": "description_markdown_notice",
"translation": "描述可使用 Markdown"
"translation": "描述可使用 Markdown 語法"
},
{
"id": "show_all",
@ -539,6 +547,10 @@
"id": "moderator",
"translation": "管理員"
},
{
"id":" api_token",
"translation": "API Token"
},
{
"id": "save_changes",
"translation": "儲存變更"
@ -565,11 +577,11 @@
},
{
"id": "who_is_renchon",
"translation": "誰是れんちょん?"
"translation": "誰是れんちょん"
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん是匿名評論與上傳者的默認用戶名同時也顯示為Nyaa站原始資源的上傳者."
"translation": "れんちょん是匿名評論與上傳者的默認用戶名同時也顯示為Nyaa站原始資源的上傳者"
},
{
"id": "mark_as_remake",
@ -577,7 +589,7 @@
},
{
"id": "email_changed",
"translation": "郵箱更變成功,一封確認郵件已發送到 %s ,請點擊裏面的確認連結來完成修改!"
"translation": "電子郵件變更成功,已發送確認郵件到 %s ,請按下裡面的確認連結來完成修改!"
},
{
"id": "torrent_status",
@ -617,10 +629,14 @@
},
{
"id": "change_language",
"translation": "變語言"
"translation": "語言"
},
{
"id": "language_name",
"translation": "繁體中文"
},
{
"id": "delete",
"translation": "刪除"
}
]

Voir le fichier

@ -87,8 +87,8 @@ func searchByQuery(r *http.Request, pagenum int, countAll bool) (
}
search.Category.Main = uint8(tmp)
if len(s) == 3 {
tmp, err = strconv.ParseUint(string(s[2]), 10, 8)
if len(s) > 2 && len(s) < 5 {
tmp, err = strconv.ParseUint(s[2:], 10, 8)
if err != nil {
return
}
@ -151,7 +151,7 @@ func searchByQuery(r *http.Request, pagenum int, countAll bool) (
if search.Category.Main != 0 {
conditions = append(conditions, "category = ?")
parameters.Params = append(parameters.Params, string(catString[0]))
parameters.Params = append(parameters.Params, search.Category.Main)
}
if search.UserID != 0 {
conditions = append(conditions, "uploader = ?")
@ -159,7 +159,7 @@ func searchByQuery(r *http.Request, pagenum int, countAll bool) (
}
if search.Category.Sub != 0 {
conditions = append(conditions, "sub_category = ?")
parameters.Params = append(parameters.Params, string(catString[2]))
parameters.Params = append(parameters.Params, search.Category.Sub)
}
if search.Status != 0 {
if search.Status == common.FilterRemakes {