From bf5fc7edd054d542f91bf83c27582892cf99733e Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Sat, 13 May 2017 16:28:17 +1000 Subject: [PATCH 01/26] lower timeouts --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 5b56615a..30d8f704 100644 --- a/main.go +++ b/main.go @@ -38,8 +38,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) From 4b2b66afb962605b82246c997bc2bd0264568847 Mon Sep 17 00:00:00 2001 From: Mitki Date: Sat, 13 May 2017 19:52:22 -0300 Subject: [PATCH 02/26] Update pt-br.all.json https://github.com/ewhal/nyaa/pull/452#event-1081125238 --- translations/pt-br.all.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/translations/pt-br.all.json b/translations/pt-br.all.json index 8a2926fe..7da112b0 100644 --- a/translations/pt-br.all.json +++ b/translations/pt-br.all.json @@ -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", From 6adb1cfba7123cdeeacbf1257448526e16c0e983 Mon Sep 17 00:00:00 2001 From: yiiT Date: Sat, 13 May 2017 20:14:27 -0500 Subject: [PATCH 03/26] Update README.md (#458) Added Roadmap --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index e26d1bd5..5658b3bd 100644 --- a/README.md +++ b/README.md @@ -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 From 7d643e7cbf6412f0da79909134f9e78db2f92544 Mon Sep 17 00:00:00 2001 From: Yoposoc Date: Sat, 13 May 2017 19:19:42 -0700 Subject: [PATCH 04/26] Update ja-jp.all.json (#456) --- translations/ja-jp.all.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translations/ja-jp.all.json b/translations/ja-jp.all.json index 295718a7..c243957d 100644 --- a/translations/ja-jp.all.json +++ b/translations/ja-jp.all.json @@ -25,7 +25,7 @@ }, { "id":"signup_box_title", - "translation": "登録 ずっと無料です" + "translation": "登録 永遠無料です" }, { "id":"username", @@ -53,7 +53,7 @@ }, { "id":"terms_conditions_confirm", - "translation": "登録 をクリックすることにより、Cookie の使用を含む、本サイトの 利用規約 に同意したものとみなします。" + "translation": "登録 をクリックすることにより、クッキーの使用を含む、本サイトの 利用規約 に同意したものとみなします。" }, { "id":"signin", @@ -225,7 +225,7 @@ }, { "id": "notice_keep_seeding", - "translation": "お願い: DHT 機能を有効にし、なるべくシードを継続してください" + "translation": "注目: DHT 機能を有効にし、なるべくシードを継続してください" }, { "id": "official_nyaapocalipse_faq", @@ -317,7 +317,7 @@ }, { "id": "answer_how_can_i_help", - "translation": "ウェブ開発の経験があるのであれば、irc.rizon.net の #nyaapantsu IRC チャンネルに参加することができますよ。現在のデータベースがあるのなら、特に sukebei の方ですが、ぜひともアップロードしていただきたいです。" + "translation": "ウェブ開発の経験の件では、irc.rizon.net の #nyaapantsu IRC チャンネルに参加してください。現在のデータベースの件では、(特に sukebei)、ぜひともアップロードしていただきたいです。" }, { "id": "your_design_sucks_found_a_bug", From 52d2b49ec4665adc4909f351fda52e6c8c9e78e6 Mon Sep 17 00:00:00 2001 From: sisimouto Date: Sun, 14 May 2017 11:20:00 +0900 Subject: [PATCH 05/26] trans: update for th-th (#460) * Update th-th.all.json * Update th-th.all.json * Update th-th.all.json --- translations/th-th.all.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/translations/th-th.all.json b/translations/th-th.all.json index aa34e2f4..524484cf 100644 --- a/translations/th-th.all.json +++ b/translations/th-th.all.json @@ -309,7 +309,11 @@ }, { "id": "answer_which_trackers_do_you_recommend", - "translation": "ถ้าทอร์เรนท์ของคุณอัพโหลดไม่ได้เพราะแทรคเกอร์คุณควรใส่ตามนี้:" + "translation": "เรามีแทรคเกอร์เป็นของตัวเองแล้ว! กรุณาใส่ไว้บนสุดของลิสต์ก่อนอัพโหลด:" + }, + { + "id": "other_trackers", + "translation": "แต่คุณควรใส่ตามนี้ลงไปด้วยเผื่อมันมีอันเป็นไป" }, { "id": "how_can_i_help", From e8d05a9a25a7cca70ca7fc3458b44f361ed76590 Mon Sep 17 00:00:00 2001 From: wwwwwwwwwwwwwwwwwwwww123 Date: Sun, 14 May 2017 04:57:35 +0200 Subject: [PATCH 06/26] Update it-it.all.json (#462) "Membro" sounds like an euphemism for dick. "Carica" sounds ambiguous (can be interpreted as load). --- translations/it-it.all.json | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/translations/it-it.all.json b/translations/it-it.all.json index d1ea151f..c4e08c21 100644 --- a/translations/it-it.all.json +++ b/translations/it-it.all.json @@ -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", From 93b83fbfc9d5d5597ad5cea2a3ef03a8777f6d24 Mon Sep 17 00:00:00 2001 From: ayame-git Date: Sun, 14 May 2017 06:56:07 +0300 Subject: [PATCH 07/26] profile page hotfix --- templates/_user_list_torrents.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/_user_list_torrents.html b/templates/_user_list_torrents.html index 4b50ef6c..45461eea 100644 --- a/templates/_user_list_torrents.html +++ b/templates/_user_list_torrents.html @@ -10,8 +10,9 @@ {{T "size"}} {{T "links"}} - {{ range .Torrents }} - {{ with .ToJSON }} + {{ range $i, $t := .Torrents }} + {{ if lt $i 16 }} + {{ with $t.ToJSON }}
    From a9019bb4903637b69adf1bceb54444b9f195fe30 Mon Sep 17 00:00:00 2001 From: Mokhtar Date: Sun, 14 May 2017 06:03:04 +0200 Subject: [PATCH 08/26] Fix search category filter when subcategory's length exceeds 1 character (#457) * Fixed search category filter when subcategory's length exceeds 1 character * Changed the subcategory's length check to not let the possibility to overflow --- util/search/search.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/util/search/search.go b/util/search/search.go index a78fc9b7..f287ef43 100644 --- a/util/search/search.go +++ b/util/search/search.go @@ -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 { From b28e7657e17e71d29fff9b4863a0646d7c1489e9 Mon Sep 17 00:00:00 2001 From: ayame-git Date: Sun, 14 May 2017 07:15:58 +0300 Subject: [PATCH 09/26] api token on profile page --- templates/_profile_edit.html | 4 ++++ translations/en-us.all.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/templates/_profile_edit.html b/templates/_profile_edit.html index 0493ad72..076165ea 100644 --- a/templates/_profile_edit.html +++ b/templates/_profile_edit.html @@ -9,6 +9,10 @@

    {{ T "personal_info"}}

    +
    + +
    {{.ApiToken}}
    +
    diff --git a/translations/en-us.all.json b/translations/en-us.all.json index 2fc20207..f17378c8 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -547,6 +547,10 @@ "id": "moderator", "translation": "Moderator" }, + { + "id":" api_token", + "translation": "API Token" + } { "id": "save_changes", "translation": "Save Changes" From 2a3aa862cd776bf4ff6e25f6466708d956b51500 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Sun, 14 May 2017 15:13:37 +1000 Subject: [PATCH 10/26] Fix missing comma in EN-US --- translations/en-us.all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index f17378c8..5491199d 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -550,7 +550,7 @@ { "id":" api_token", "translation": "API Token" - } + }, { "id": "save_changes", "translation": "Save Changes" From f0582f13c28302c7ec0d176a66ac98be9a8dfd0c Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Sun, 14 May 2017 15:32:02 +1000 Subject: [PATCH 11/26] rename filesize_fetcher to metadata_fetcher --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 9e9bc736..14f1cb0d 100644 --- a/main.go +++ b/main.go @@ -147,7 +147,7 @@ func main() { RunScraper(conf) } else if *mode == "webapp" { RunServer(conf) - } else if *mode == "filesize_fetcher" { + } else if *mode == "metadata_fetcher" { RunFilesizeFetcher(conf) } else { log.Fatalf("invalid runtime mode: %s", *mode) From c40acb7a9fe5a758cb9e7cac057071e12ae5c9d4 Mon Sep 17 00:00:00 2001 From: xqm Date: Sun, 14 May 2017 17:41:29 +0800 Subject: [PATCH 12/26] Update zh-cn (#468) * Update for zh-cn and zh-tw Update for zh-cn and zh-tw * Update for zh-cn and zh-tw Update for zh-cn and zh-tw * Update zh-tw Update zh-tw * Update zh-cn and zh-tw Update zh-cn and zh-tw * revert zh-tw --- translations/zh-cn.all.json | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/translations/zh-cn.all.json b/translations/zh-cn.all.json index 815d0ddb..8caae778 100644 --- a/translations/zh-cn.all.json +++ b/translations/zh-cn.all.json @@ -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": "删除" } ] \ No newline at end of file From df8dc3412973a6cc59cefc98711c8d958deab152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AB=E9=9B=B2=20=E5=8D=83=E7=A7=8B?= Date: Sun, 14 May 2017 17:41:35 +0800 Subject: [PATCH 13/26] Making translation coherent and complete translation (#466) * Making translation coherent Fix strange translation and smooth writing * Complete translation and bug fixed --- translations/zh-tw.all.json | 56 ++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 20 deletions(-) diff --git a/translations/zh-tw.all.json b/translations/zh-tw.all.json index 41209553..d4476604 100644 --- a/translations/zh-tw.all.json +++ b/translations/zh-tw.all.json @@ -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 種子資料庫直到 4月5日 5月1日,這表示幾乎沒失去任何東西" + "translation": "我們有直到 4月5日 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": "刪除" } ] From c3e14155096999893ef7bdab7246c5ccace50039 Mon Sep 17 00:00:00 2001 From: MMP0 Date: Sun, 14 May 2017 18:42:41 +0900 Subject: [PATCH 14/26] Update Japanese translations (#465) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update ja-jp.all.json * 失われません -> 失われていません --- translations/ja-jp.all.json | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/translations/ja-jp.all.json b/translations/ja-jp.all.json index c243957d..bafadfc5 100644 --- a/translations/ja-jp.all.json +++ b/translations/ja-jp.all.json @@ -25,7 +25,7 @@ }, { "id":"signup_box_title", - "translation": "登録 永遠無料です" + "translation": "登録 永久無料です" }, { "id":"username", @@ -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", @@ -317,7 +317,7 @@ }, { "id": "answer_how_can_i_help", - "translation": "ウェブ開発の経験の件では、irc.rizon.net の #nyaapantsu IRC チャンネルに参加してください。現在のデータベースの件では、(特に sukebei)、ぜひともアップロードしていただきたいです。" + "translation": "ウェブ開発の専門知識がおありでしたら、irc.rizon.net の #nyaapantsu IRC チャンネルに参加できますよ。また、現在のデータベースをお持ちの場合、特に sukebei の場合は、ぜひともアップロードしていただきたいです。" }, { "id": "your_design_sucks_found_a_bug", @@ -543,6 +543,10 @@ "id": "moderator", "translation": "モデレーター" }, + { + "id":" api_token", + "translation": "API トークン" + }, { "id": "save_changes", "translation": "変更を保存" From 530734bbebc2607901d63c1132aba6770cab8e30 Mon Sep 17 00:00:00 2001 From: keo Date: Sun, 14 May 2017 13:11:58 +0300 Subject: [PATCH 15/26] typo --- translations/en-us.all.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/translations/en-us.all.json b/translations/en-us.all.json index 5491199d..f0abaa63 100644 --- a/translations/en-us.all.json +++ b/translations/en-us.all.json @@ -345,7 +345,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", From 68dcfd0fb757ee348ecb7ca4c978ce3ea8ad70de Mon Sep 17 00:00:00 2001 From: MMP0 Date: Sun, 14 May 2017 19:24:02 +0900 Subject: [PATCH 16/26] =?UTF-8?q?=E3=81=8A=E5=BF=98=E3=82=8C=E3=81=9A?= =?UTF-8?q?=E3=81=AB=20->=20=E3=81=8A=E5=BF=98=E3=82=8C=E3=81=AA=E3=81=8F?= =?UTF-8?q?=20(#469)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- translations/ja-jp.all.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/translations/ja-jp.all.json b/translations/ja-jp.all.json index bafadfc5..5057c5d9 100644 --- a/translations/ja-jp.all.json +++ b/translations/ja-jp.all.json @@ -101,7 +101,7 @@ }, { "id":"signup_verification_email", - "translation": "認証メールを送信しました。メールボックスを確認してください。迷惑メールフォルダーの確認もお忘れずに。" + "translation": "認証メールを送信しました。メールボックスを確認してください。迷惑メールフォルダーの確認もお忘れなく。" }, { "id":"signup_verification_noemail", @@ -381,11 +381,11 @@ }, { "id": "audio_lossless", - "translation": "オーディオ ‐ 可逆圧縮方式 (flacなど)" + "translation": "オーディオ ‐ 可逆圧縮方式 (FLAC など)" }, { "id": "audio_lossy", - "translation": "オーディオ ‐ 非可逆圧縮方式 (mp3など)" + "translation": "オーディオ ‐ 非可逆圧縮方式 (MP3 など)" }, { "id": "literature", From afb2fc7e8cc104f5b4402873c1232be5a749e375 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 14 May 2017 12:27:16 +0200 Subject: [PATCH 17/26] Fix navbar when logged in (idk who broke it) --- public/css/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/public/css/style.css b/public/css/style.css index 4e766db8..4c71284d 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -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 */ From c60a8635fc95993cf73582445c304b10a6b40f2e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 14 May 2017 13:01:59 +0200 Subject: [PATCH 18/26] Fix search in modpanel (@SpamNeko broke it) --- router/modpanel.go | 4 +++- router/templateVariables.go | 5 +++-- templates/_search.html | 20 +++++++++++++++++++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/router/modpanel.go b/router/modpanel.go index 35a720c1..3d864aef 100644 --- a/router/modpanel.go +++ b/router/modpanel.go @@ -110,7 +110,9 @@ 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} + search := NewSearchForm() + search.ShowItemsPerPage = false + htv := PanelIndexVbs{torrents, model.TorrentReportsToJSON(torrentReports), users, comments, search, currentUser, r.URL} err := panelIndex.ExecuteTemplate(w, "admin_index.html", htv) log.CheckError(err) } else { diff --git a/router/templateVariables.go b/router/templateVariables.go index 0f94509a..d3217fe2 100644 --- a/router/templateVariables.go +++ b/router/templateVariables.go @@ -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, } } diff --git a/templates/_search.html b/templates/_search.html index d737f16d..e07c07f6 100644 --- a/templates/_search.html +++ b/templates/_search.html @@ -31,6 +31,7 @@ + {{ if .Search.ShowItemsPerPage }} + {{ end }} {{end}} - +{{/* this is used in the modpanel */}} +{{define "search_advanced"}} + + +{{end}} {{define "search_button"}}
    From f1aa52e618dfedd1cd0c8a0dad7ba055a952a64b Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 14 May 2017 13:05:18 +0200 Subject: [PATCH 19/26] Cleanup usage of now removed HideAdvancedSearch --- router/faqHandler.go | 5 +---- router/modpanel.go | 6 +++--- router/notFoundHandler.go | 5 +---- router/searchHandler.go | 6 +++--- router/userHandler.go | 32 +++++++------------------------- 5 files changed, 15 insertions(+), 39 deletions(-) diff --git a/router/faqHandler.go b/router/faqHandler.go index af77167e..c1be82b3 100644 --- a/router/faqHandler.go +++ b/router/faqHandler.go @@ -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) } diff --git a/router/modpanel.go b/router/modpanel.go index 3d864aef..04c67528 100644 --- a/router/modpanel.go +++ b/router/modpanel.go @@ -139,9 +139,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") diff --git a/router/notFoundHandler.go b/router/notFoundHandler.go index ed41e902..5480068f 100644 --- a/router/notFoundHandler.go +++ b/router/notFoundHandler.go @@ -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) } diff --git a/router/searchHandler.go b/router/searchHandler.go index 57bfe1f1..1fe0e125 100644 --- a/router/searchHandler.go +++ b/router/searchHandler.go @@ -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)} diff --git a/router/userHandler.go b/router/userHandler.go index 5370896c..2017250a 100755 --- a/router/userHandler.go +++ b/router/userHandler.go @@ -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) } From e81e12318afcb690642e848b6f41fc1926ef2d1f Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 14 May 2017 13:09:24 +0200 Subject: [PATCH 20/26] Update german translation --- translations/de-de.all.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/translations/de-de.all.json b/translations/de-de.all.json index db2e1295..a3499c70 100644 --- a/translations/de-de.all.json +++ b/translations/de-de.all.json @@ -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", From 526b607fc4de973af47aab324664b1dd1bf5b130 Mon Sep 17 00:00:00 2001 From: Eliot Whalan Date: Sun, 14 May 2017 21:18:22 +1000 Subject: [PATCH 21/26] Add account settings link to dropdown --- templates/_badgemenu.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/_badgemenu.html b/templates/_badgemenu.html index 136f6ee3..bf3d25aa 100644 --- a/templates/_badgemenu.html +++ b/templates/_badgemenu.html @@ -7,6 +7,7 @@ {{ .Username }}