Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0
Cette révision appartient à :
Eliot Whalan 2017-05-14 09:23:28 +10:00
révision 7533a66f4e
42 fichiers modifiés avec 818 ajouts et 249 suppressions

Voir le fichier

@ -21,7 +21,7 @@ type Config struct {
DBType string `json:"db_type"`
// DBParams will be directly passed to Gorm, and its internal
// structure depends on the dialect for each db type
DBParams string `json:"db_params"`
DBParams string `json:"db_params"`
DBLogMode string `json:"db_logmode"`
// tracker scraper config (required)
Scrape ScraperConfig `json:"scraper"`
@ -29,11 +29,13 @@ type Config struct {
Cache CacheConfig `json:"cache"`
// search config
Search SearchConfig `json:"search"`
// internationalization config
I18n I18nConfig `json:"i18n"`
// optional i2p configuration
I2P *I2PConfig `json:"i2p"`
}
var Defaults = Config{"localhost", 9999, "sqlite3", "./nyaa.db?cache_size=50", "default", DefaultScraperConfig, DefaultCacheConfig, DefaultSearchConfig, nil}
var Defaults = Config{"localhost", 9999, "sqlite3", "./nyaa.db?cache_size=50", "default", DefaultScraperConfig, DefaultCacheConfig, DefaultSearchConfig, DefaultI18nConfig, nil}
var allowedDatabaseTypes = map[string]bool{
"sqlite3": true,
@ -57,6 +59,7 @@ func New() *Config {
config.DBLogMode = Defaults.DBLogMode
config.Scrape = Defaults.Scrape
config.Cache = Defaults.Cache
config.I18n = Defaults.I18n
return &config
}

11
config/i18n.go Fichier normal
Voir le fichier

@ -0,0 +1,11 @@
package config
type I18nConfig struct {
TranslationsDirectory string `json:"translations_directory"`
DefaultLanguage string `json:"default_language"`
}
var DefaultI18nConfig = I18nConfig{
TranslationsDirectory: "translations",
DefaultLanguage: "en-us", // TODO: Remove refs to "en-us" from the code and templates
}

19
main.go
Voir le fichier

@ -6,7 +6,6 @@ import (
"net/http"
"os"
"path/filepath"
"time"
"github.com/ewhal/nyaa/cache"
@ -15,23 +14,12 @@ import (
"github.com/ewhal/nyaa/network"
"github.com/ewhal/nyaa/router"
"github.com/ewhal/nyaa/service/scraper"
"github.com/ewhal/nyaa/util/languages"
"github.com/ewhal/nyaa/util/log"
"github.com/ewhal/nyaa/util/search"
"github.com/ewhal/nyaa/util/signals"
"github.com/nicksnyder/go-i18n/i18n"
)
func initI18N() {
/* Initialize the languages translation */
i18n.MustLoadTranslationFile("translations/en-us.all.json")
paths, err := filepath.Glob("translations/*.json")
if err == nil {
for _, path := range paths {
i18n.LoadTranslationFile(path)
}
}
}
// RunServer runs webapp mainloop
func RunServer(conf *config.Config) {
http.Handle("/", router.Router)
@ -122,7 +110,10 @@ func main() {
if err != nil {
log.Fatal(err.Error())
}
initI18N()
err = languages.InitI18n(conf.I18n)
if err != nil {
log.Fatal(err.Error())
}
err = cache.Configure(&conf.Cache)
if err != nil {
log.Fatal(err.Error())

Voir le fichier

@ -202,6 +202,10 @@ div.container div.blockBody:nth-of-type(2) table tr:first-of-type th:last-of-typ
{
width: 12rem;
}
#mainmenu .navbar-form select.form-control#max
{
width: 8rem;
}
.special-img
{
position: relative;

Voir le fichier

@ -2,9 +2,9 @@ var night = localStorage.getItem("night");
function toggleNightMode() {
var night = localStorage.getItem("night");
if(night == "true") {
document.getElementById("style-dark").remove()
document.getElementsByTagName("head")[0].removeChild(darkStyleLink);
} else {
document.getElementsByTagName("head")[0].append(darkStyleLink);
document.getElementsByTagName("head")[0].appendChild(darkStyleLink);
}
localStorage.setItem("night", (night == "true") ? "false" : "true");
}
@ -78,5 +78,4 @@ function loadLanguages() {
xhr.send()
}
loadLanguages();
loadLanguages();

Voir le fichier

@ -5,6 +5,7 @@ import (
"html"
"net/http"
"strconv"
"strings"
"github.com/ewhal/nyaa/db"
"github.com/ewhal/nyaa/model"
@ -21,6 +22,83 @@ import (
"github.com/gorilla/mux"
)
type ReassignForm struct {
AssignTo uint
By string
Data string
Torrents []uint
}
func (f *ReassignForm) ExtractInfo(r *http.Request) error {
f.By = r.FormValue("by")
if f.By != "olduser" && f.By != "torrentid" {
return fmt.Errorf("what?")
}
f.Data = strings.Trim(r.FormValue("data"), " \r\n")
if f.By == "olduser" {
if f.Data == "" {
return fmt.Errorf("No username given")
} else if strings.Contains(f.Data, "\n") {
return fmt.Errorf("More than one username given")
}
} else if f.By == "torrentid" {
if f.Data == "" {
return fmt.Errorf("No IDs given")
}
splitData := strings.Split(f.Data, "\n")
for i, tmp := range splitData {
tmp = strings.Trim(tmp, " \r")
torrent_id, err := strconv.ParseUint(tmp, 10, 0)
if err != nil {
return fmt.Errorf("Couldn't parse number on line %d", i+1)
}
f.Torrents = append(f.Torrents, uint(torrent_id))
}
}
tmp := r.FormValue("to")
parsed, err := strconv.ParseUint(tmp, 10, 0)
if err != nil {
return err
}
f.AssignTo = uint(parsed)
_, _, _, _, err = userService.RetrieveUser(r, tmp)
if err != nil {
return fmt.Errorf("User to assign to doesn't exist")
}
return nil
}
func (f *ReassignForm) ExecuteAction() (int, error) {
var toBeChanged []uint
var err error
if f.By == "olduser" {
toBeChanged, err = userService.RetrieveOldUploadsByUsername(f.Data)
if err != nil {
return 0, err
}
} else if f.By == "torrentid" {
toBeChanged = f.Torrents
}
num := 0
for _, torrent_id := range toBeChanged {
torrent, err2 := torrentService.GetRawTorrentById(torrent_id)
if err2 == nil {
torrent.UploaderID = f.AssignTo
db.ORM.Save(&torrent)
num += 1
}
}
// TODO: clean shit from user_uploads_old if needed
return num, nil
}
func IndexModPanel(w http.ResponseWriter, r *http.Request) {
currentUser := GetUser(r)
if userPermission.HasAdmin(currentUser) {
@ -271,3 +349,43 @@ func TorrentReportDeleteModPanel(w http.ResponseWriter, r *http.Request) {
http.Error(w, "admins only", http.StatusForbidden)
}
}
func TorrentReassignModPanel(w http.ResponseWriter, r *http.Request) {
currentUser := GetUser(r)
if !userPermission.HasAdmin(currentUser) {
http.Error(w, "admins only", http.StatusForbidden)
return
}
languages.SetTranslationFromRequest(panelTorrentReassign, r, "en-us")
htv := PanelTorrentReassignVbs{ReassignForm{}, NewSearchForm(), currentUser, form.NewErrors(), form.NewInfos(), r.URL}
err := panelTorrentReassign.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err)
}
func TorrentPostReassignModPanel(w http.ResponseWriter, r *http.Request) {
currentUser := GetUser(r)
if !userPermission.HasAdmin(currentUser) {
http.Error(w, "admins only", http.StatusForbidden)
return
}
var rForm ReassignForm
err := form.NewErrors()
infos := form.NewInfos()
err2 := rForm.ExtractInfo(r)
if err2 != nil {
err["errors"] = append(err["errors"], err2.Error())
} else {
count, err2 := rForm.ExecuteAction()
if err2 != nil {
err["errors"] = append(err["errors"], "Something went wrong")
} else {
infos["infos"] = append(infos["infos"], fmt.Sprintf("%d torrents updated.", count))
}
}
htv := PanelTorrentReassignVbs{rForm, NewSearchForm(), currentUser, err, infos, r.URL}
err_ := panelTorrentReassign.ExecuteTemplate(w, "admin_index.html", htv)
log.CheckError(err_)
}

Voir le fichier

@ -101,17 +101,14 @@ func init() {
Router.HandleFunc("/mod/torrent/delete", TorrentDeleteModPanel).Name("mod_tdelete")
Router.HandleFunc("/mod/report/delete", TorrentReportDeleteModPanel).Name("mod_trdelete")
Router.HandleFunc("/mod/comment/delete", CommentDeleteModPanel).Name("mod_cdelete")
Router.HandleFunc("/mod/reassign", TorrentReassignModPanel).Name("mod_treassign").Methods("GET")
Router.HandleFunc("/mod/reassign", TorrentPostReassignModPanel).Name("mod_treassign").Methods("POST")
//reporting a torrent
Router.HandleFunc("/report/{id}", ReportTorrentHandler).Methods("POST").Name("post_comment")
Router.PathPrefix("/captcha").Methods("GET").HandlerFunc(captcha.ServeFiles)
//Router.HandleFunc("/report/create", gzipTorrentReportCreateHandler).Name("torrent_report_create").Methods("POST")
// TODO Allow only moderators to access /moderation/*
//Router.HandleFunc("/moderation/report/delete", gzipTorrentReportDeleteHandler).Name("torrent_report_delete").Methods("POST")
//Router.HandleFunc("/moderation/torrent/delete", gzipTorrentDeleteHandler).Name("torrent_delete").Methods("POST")
Router.HandleFunc("/language", SeeLanguagesHandler).Methods("GET").Name("see_languages")
Router.HandleFunc("/language", ChangeLanguageHandler).Methods("POST").Name("change_language")

Voir le fichier

@ -9,7 +9,7 @@ var TemplateDir = "templates"
var homeTemplate, searchTemplate, faqTemplate, uploadTemplate, viewTemplate, viewRegisterTemplate, viewLoginTemplate, viewRegisterSuccessTemplate, viewVerifySuccessTemplate, viewProfileTemplate, viewProfileEditTemplate, viewUserDeleteTemplate, notFoundTemplate, changeLanguageTemplate *template.Template
var panelIndex, panelTorrentList, panelUserList, panelCommentList, panelTorrentEd, panelTorrentReportList *template.Template
var panelIndex, panelTorrentList, panelUserList, panelCommentList, panelTorrentEd, panelTorrentReportList, panelTorrentReassign *template.Template
type templateLoader struct {
templ **template.Template
@ -127,6 +127,11 @@ func ReloadTemplates() {
name: "torrent_report",
file: filepath.Join("admin", "torrent_report.html"),
},
templateLoader{
templ: &panelTorrentReassign,
name: "torrent_reassign",
file: filepath.Join("admin", "reassign.html"),
},
}
for idx := range modTempls {

Voir le fichier

@ -36,6 +36,24 @@ var FuncMap = template.FuncMap{
}
return "error"
},
"genSearchWithOrdering": func(currentUrl url.URL, sortBy string) template.URL {
values := currentUrl.Query()
order := false
if _, ok := values["order"]; ok {
order, _ = strconv.ParseBool(values["order"][0])
if values["sort"][0]==sortBy {
order=!order //Flip order by repeat-clicking
} else {
order=false //Default to descending when sorting by something new
}
}
values.Set("sort", sortBy)
values.Set("order", strconv.FormatBool(order))
currentUrl.RawQuery=values.Encode()
return template.URL(currentUrl.String())
},
"genNav": func(nav Navigation, currentUrl *url.URL, pagesSelectable int) template.HTML {
var ret = ""
if (nav.TotalItem > 0) {

Voir le fichier

@ -157,6 +157,7 @@ type PanelCommentListVbs struct {
User *model.User
URL *url.URL // For parsing Url in templates
}
type PanelTorrentEdVbs struct {
Upload UploadForm
Search SearchForm
@ -174,6 +175,15 @@ type PanelTorrentReportListVbs struct {
URL *url.URL // For parsing Url in templates
}
type PanelTorrentReassignVbs struct {
Reassign ReassignForm
Search SearchForm // unused?
User *model.User // unused?
FormErrors map[string][]string
FormInfos map[string][]string
URL *url.URL // For parsing Url in templates
}
/*
* Variables used by the upper ones
*/

Voir le fichier

@ -71,7 +71,7 @@ func GetTorrentById(id string) (torrent model.Torrent, err error) {
torrent.Uploader = new(model.User)
db.ORM.Where("user_id = ?", torrent.UploaderID).Find(torrent.Uploader)
torrent.OldUploader = ""
if torrent.ID <= config.LastOldTorrentID {
if torrent.ID <= config.LastOldTorrentID && torrent.UploaderID == 0 {
var tmp model.UserUploadsOld
if !db.ORM.Where("torrent_id = ?", torrent.ID).Find(&tmp).RecordNotFound() {
torrent.OldUploader = tmp.Username
@ -88,6 +88,15 @@ func GetTorrentById(id string) (torrent model.Torrent, err error) {
return
}
// won't fetch user or comments
func GetRawTorrentById(id uint) (torrent model.Torrent, err error) {
err = nil
if db.ORM.Where("torrent_id = ?", id).Find(&torrent).RecordNotFound() {
err = errors.New("Article is not found.")
}
return
}
func GetTorrentsOrderByNoCount(parameters *serviceBase.WhereParams, orderBy string, limit int, offset int) (torrents []model.Torrent, err error) {
torrents, _, err = getTorrentsOrderBy(parameters, orderBy, limit, offset, false)
return

Voir le fichier

@ -16,7 +16,11 @@ func CheckTrackers(trackers []string) bool {
"://tracker.istole.it:80",
"://tracker.ccc.de:80",
"://bt2.careland.com.cn:6969",
"://announce.torrentsmd.com:8080"}
"://announce.torrentsmd.com:8080",
"://open.demonii.com:1337",
"://tracker.btcake.com",
"://tracker.prq.to",
"://bt.rghost.net"}
var numGood int
for _, t := range trackers {

Voir le fichier

@ -50,7 +50,7 @@ func IsAgreed(termsAndConditions string) bool { // TODO: Inline function
type RegistrationForm struct {
Username string `form:"username" needed:"true" len_min:"3" len_max:"20"`
Email string `form:"email"`
Password string `form:"password" needed:"true" len_min:"6" len_max:"25" equalInput:"ConfirmPassword"`
Password string `form:"password" needed:"true" len_min:"6" len_max:"72" equalInput:"ConfirmPassword"`
ConfirmPassword string `form:"password_confirmation" omit:"true" needed:"true"`
CaptchaID string `form:"captchaID" omit:"true" needed:"true"`
TermsAndConditions bool `form:"t_and_c" omit:"true" needed:"true" equal:"true" hum_name:"Terms and Conditions"`
@ -67,8 +67,8 @@ type UserForm struct {
Username string `form:"username" needed:"true" len_min:"3" len_max:"20"`
Email string `form:"email"`
Language string `form:"language" default:"en-us"`
CurrentPassword string `form:"current_password" len_min:"6" len_max:"25" omit:"true"`
Password string `form:"password" len_min:"6" len_max:"25" equalInput:"Confirm_Password"`
CurrentPassword string `form:"current_password" len_min:"6" len_max:"72" omit:"true"`
Password string `form:"password" len_min:"6" len_max:"72" equalInput:"Confirm_Password"`
Confirm_Password string `form:"password_confirmation" omit:"true"`
Status int `form:"status" default:"0"`
}

Voir le fichier

@ -253,6 +253,19 @@ func RetrieveUserByUsername(username string) (*model.PublicUser, string, int, er
return &model.PublicUser{User: &user}, username, http.StatusOK, nil
}
func RetrieveOldUploadsByUsername(username string) ([]uint, error) {
var ret []uint
var tmp []*model.UserUploadsOld
err := db.ORM.Where("username = ?", username).Find(&tmp).Error
if err != nil {
return ret, err
}
for _, tmp2 := range tmp {
ret = append(ret, tmp2.TorrentId)
}
return ret, nil
}
// RetrieveUserForAdmin retrieves a user for an administrator.
func RetrieveUserForAdmin(id string) (model.User, int, error) {
var user model.User

Voir le fichier

@ -39,14 +39,15 @@
<h2 id="trackers">{{T "which_trackers_do_you_recommend"}}</h2>
<p>{{T "answer_which_trackers_do_you_recommend"}}</p>
<pre>udp://tracker.coppersurfer.tk:6969
udp://zer0day.to:1337/announce
udp://tracker.leechers-paradise.org:6969
udp://explodie.org:6969
udp://tracker.opentrackr.org:1337
udp://tracker.internetwarriors.net:1337/announce
http://mgtracker.org:6969/announce
http://tracker.baka-sub.cf/announce</pre>
<pre>udp://tracker.doko.moe:6969</pre>
<p>{{T "other_trackers"}}</p>
<pre>udp://zer0day.to:1337/announce
udp://tracker.leechers-paradise.org:6969
udp://explodie.org:6969
udp://tracker.opentrackr.org:1337
udp://tracker.internetwarriors.net:1337/announce
http://mgtracker.org:6969/announce
http://tracker.baka-sub.cf/announce</pre>
<h2>{{T "how_can_i_help"}}</h2>
<p>{{T "answer_how_can_i_help"}}</p>

Voir le fichier

@ -5,7 +5,7 @@
<label for="solution">Captcha</label>
<input type="text" name="captchaID" value="{{.CaptchaID}}" hidden>
<img src="/captcha/{{.CaptchaID}}.png">
<input type="text" name="solution" class="form-control" placeholder="Captcha" autocomplete="off" required>
<input type="text" name="solution" id="solution" class="form-control" placeholder="Captcha" autocomplete="off" required>
</div>
{{end}}
{{end}}

Voir le fichier

@ -8,7 +8,7 @@
darkStyleLink.type = "text/css";
darkStyleLink.href = "/css/style-night.css"
if (night == "true") {
document.getElementsByTagName("head")[0].append(darkStyleLink);
document.getElementsByTagName("head")[0].appendChild(darkStyleLink);
}
</script>
{{end}}

Voir le fichier

@ -31,24 +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>
<input type="hidden" name="userID" value="{{ .Search.UserID }}">
{{end}}
{{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>
<select name="max" class="form-control input-sm">
<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>
<option value="15" {{if eq .Navigation.MaxItemPerPage 15}}selected{{end}}>15</option>
@ -65,6 +48,7 @@
<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>
<input type="hidden" name="userID" value="{{ .Search.UserID }}">
{{end}}
{{define "search_button"}}

Voir le fichier

@ -9,8 +9,10 @@
{{ range .Comments}}
<tr><td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td><td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .User.Username }}</a></td>
<td><a href="{{ genRoute "mod_cdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a></td></tr>
<tr>
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td>
<td><a>{{ .UserID }}</a></td>
<td><a href="{{ genRoute "mod_cdelete" }}?id={{.ID}}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a></td></tr>
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">

Voir le fichier

@ -11,7 +11,7 @@
<tr>
<td><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">Edit</a>)</td>
<td><a href="{{ genRoute "mod_tlist" }}?userID={{.UploaderID}}">{{ .UploaderID }}</a></td>
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a></td>
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a></td>
</tr>
{{end}}
</table>
@ -22,7 +22,7 @@
</nav>
<hr />
<h3 id="torrents">Last Torrents Report</h3>
<h3 id="torrents">Last Torrents Reports</h3>
<table class="table">
<tr>
<th class="col-xs-9">Torrent Name</th>
@ -36,13 +36,13 @@
<td><a href="{{ genRoute "view_torrent" "id" .Torrent.ID }}">{{ .Torrent.Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{.Torrent.ID}}">Edit</a>)</td>
<td>{{.User.Username}}</td>
<td>{{.Description}}</td>
<td><a href="{{ genRoute "mod_trdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a></td>
<td><a href="{{ genRoute "mod_trdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a></td>
</tr>
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_trlist" }}">More</a></li>
<li><a href="{{ genRoute "mod_trlist" }}">More</a></li>
</ul>
</nav>
<hr />
@ -53,11 +53,11 @@
<th class="col-xs-1">Action</th>
</tr>
{{ range .Users}}
{{range .Users}}
<tr>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a></td>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a></td>
</tr>
{{end}}
</table>
@ -75,15 +75,18 @@
<th class="col-xs-1">Action</th>
</tr>
{{ range .Comments}}
{{range .Comments}}
<tr><td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td><td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{.UserID}}</a></td>
<td><a href="{{ genRoute "mod_cdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a></td></tr>
<tr>
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{ .Content }}</a></td>
<td><a href="{{ genRoute "mod_cedit" }}?id={{.ID}}">{{.UserID}}</a></td>
<td><a href="{{ genRoute "mod_cdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a></td>
</tr>
{{end}}
</table>
<nav class="torrentNav" aria-label="Page navigation">
<ul class="pagination">
<li><a href="{{ genRoute "mod_clist" }}">More</a></li>
<li><a href="{{ genRoute "mod_clist" }}">More</a></li>
</ul>
</nav>
{{end}}

Voir le fichier

@ -12,17 +12,6 @@
<label for="name">{{T "name"}}</label>
<input type="text" name="name" class="form-control" placeholder="File Name" value="{{.Name}}" required>
</div>
<!--
<div class="form-group">
<label for="torrent">{{T "torrent_file"}}</label>
<input type="file" name="torrent" id="torrent" accept=".torrent">
<p class="help-block">{{T "uploading_file_prefills_fields"}}</p>
</div>
<div class="form-group">
<label for="magnet">{{T "magnet_link"}}</label>
<input type="text" name="magnet" class="form-control"
style="width:60rem" placeholder="{{T "magnet_link"}}" value="{{.Magnet}}">
</div>-->
<div class="form-group">
<label for="c">{{T "category"}}</label>
<select name="c" class="form-control input-sm">

32
templates/admin/reassign.html Fichier normal
Voir le fichier

@ -0,0 +1,32 @@
{{define "title"}}Torrent Reassign{{end}}
{{define "content"}}
<form enctype="multipart/form-data" method="POST">
{{ range (index $.FormInfos "infos")}}
<div class="alert alert-info"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-info-sign"></i> {{ . }}</div>
{{end}}
{{ range (index $.FormErrors "errors")}}
<div class="alert alert-danger"><a class="panel-close close" data-dismiss="alert">×</a><i class="glyphicon glyphicon-exclamation-sign"></i> {{ . }}</div>
{{end}}
<p>Reassigning torrents to a new user is not easily reverted and should be done with care.</p>
{{with .Reassign}}
<div class="form-group">
<label for="name">Reassign to:</label>
<input type="text" name="to" class="form-control" placeholder="User ID" {{if ne .AssignTo 0}}value="{{.AssignTo}}"{{end}} required>
</div>
<div class="form-group">
<label for="by">Reassign based on:</label><br />
<input type="radio" name="by" value="olduser" {{if eq .By "olduser"}}selected{{end}} required> Old Username<br />
<input type="radio" name="by" value="torrentid" {{if eq .By "torrentid"}}selected{{end}} required> Torrent ID
</div>
<div class="form-group">
<p>One ID per line <b>or</b> a single username</p>
<textarea rows="20" cols="40" name="data">{{.Data}}</textarea>
</div>
{{end}}
<p>Might take a long time, do <b>NOT</b> abort the request.</p>
<button type="submit" class="btn btn-success">{{T "save_changes"}}</button>
</form>
{{end}}

Voir le fichier

@ -13,7 +13,7 @@
<tr>
<td><a href="{{ genViewTorrentRoute .ID }}">{{ .Name }}</a> (<a href="{{ genRoute "mod_tedit" }}?id={{.ID}}">Edit</a>)</td>
<td><a href="{{ genRoute "mod_tlist" }}?userID={{.UploaderID}}">{{ .UploaderID }}</a></td>
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a></td>
<td><a href="{{ genRoute "mod_tdelete" }}?id={{ .ID }}" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a></td>
</tr>
{{end}}
</table>

Voir le fichier

@ -9,8 +9,8 @@
{{ range .Users}}
<tr>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td>{{if gt .ID 0}}<a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i>{{ T "delete" }}</a>{{end}}</td>
<td><a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?edit">{{ .Username }}</a></td>
<td>{{if gt .ID 0}}<a href="{{ genRoute "user_profile" "id" (print .ID) "username" .Username }}?delete" class="btn btn-danger btn-lg" onclick="if (!confirm('Are you sure?')) return false;"><i class="glyphicon glyphicon-trash"></i> {{ T "delete" }}</a>{{end}}</td>
</tr>
{{end}}
</table>

Voir le fichier

@ -47,7 +47,13 @@
<li><a href="{{ genRoute "mod_tlist"}}">{{T "Torrents"}}</a></li>
<li><a href="{{ genRoute "mod_ulist"}}">{{T "Users"}}</a></li>
<li><a href="{{ genRoute "mod_clist"}}">{{T "Comments"}}</a></li>
<li><a href="{{ genRoute "mod_trlist"}}">{{T "Torrent Reports"}}</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Other<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="{{ genRoute "mod_trlist"}}">{{T "Torrent Reports"}}</a></li>
<li><a href="{{ genRoute "mod_treassign" }}">Torrent Reassign</a></li>
</ul>
</li>
</ul>
{{block "badge_user" .}}{{end}}

Voir le fichier

@ -1,7 +1,7 @@
{{define "title"}}{{T "home"}}{{end}}
{{define "contclass"}}cont-home{{end}}
{{define "content"}}
<div class="blockBody">
<div class="blockBody">
<ul class="list-inline" aria-label="Page navigation">
<li><img id="mascot" src="/img/renchon.png" /></li>
<li style="padding-top: 7%;" class="pull-right"><ul class="pagination">
@ -13,10 +13,16 @@
<table class="table custom-table-hover">
<tr>
<th class="col-xs-1 hidden-xs">{{T "category"}}</th>
<th class="col-xs-8">{{T "name"}}</th>
<th class="col-xs-1 hidden-xs">{{T "S"}} / {{T "L"}} / {{T "D"}}</th>
<th class="col-xs-1 hidden-xs">{{T "date"}}</th>
<th class="col-xs-1 hidden-xs">{{T "size"}}</th>
<th class="col-xs-8">
<a href="{{ genSearchWithOrdering .URL "1" }}">{{T "name"}}</a>
</th>
<th class="col-xs-1 hidden-xs">
<a href="{{ genSearchWithOrdering .URL "4" }}">{{T "S"}}</a> /
<a href="{{ genSearchWithOrdering .URL "4" }}">{{T "L"}}</a> /
<a href="{{ genSearchWithOrdering .URL "3" }}">{{T "D"}}</a>
</th>
<th class="col-xs-1 hidden-xs"><a href="{{ genSearchWithOrdering .URL "2" }}">{{T "date"}}</th></a>
<th class="col-xs-1 hidden-xs"><a href="{{ genSearchWithOrdering .URL "4" }}">{{T "size"}}</a></th>
<th class="col-xs-1 hidden-xs">{{T "links"}}</th>
</tr>
{{ range .ListTorrents}}

Voir le fichier

@ -72,21 +72,6 @@
<div style="padding-top: 10rem"></div>
<div class="container {{block "contclass" .}}generic{{end}}" id="container">
{{if not .Search.HideAdvancedSearch}}
<div class="blockBody" style="text-align:center">
<a href="#advanced-search" data-toggle="collapse">{{T "advanced_search"}}</a><br />
<form id="advanced-search" class="navbar-form collapse" role="search" action="/search" method="get">
<div class="form-group">
{{block "search_common" .}}{{end}}
{{block "search_advanced" .}}{{end}}
{{block "search_button" .}}{{end}}
</div>
</form>
<div style="clear:both"></div>
</div>
<div style="margin:0.5em"></div>
{{end}}
{{block "content" .}}{{T "nothing_here"}}{{end}}
</div>
@ -96,12 +81,15 @@
Powered by NyaaPantsu
</footer>
{{if eq .User.ID 0}}
<form method="POST" action="{{ .URL.Parse "/language" }}" id="bottom_language_selector_form">
<select id="bottom_language_selector" name="language" onchange="javascript:document.getElementById('bottom_language_selector_form').submit()" hidden class="form-control"></select>
</form>
<noscript>
<center><a href="{{ .URL.Parse "/language" }}">{{ T "change_language" }}</a></center>
</noscript>
{{end}}
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>

Voir le fichier

@ -7,7 +7,7 @@
<div class="form-group">
<label for="name">{{T "name"}}</label>
<input type="text" name="name" class="form-control" placeholder="File Name" value="{{.Name}}" required>
<input type="text" name="name" id="name" class="form-control" placeholder="File Name" value="{{.Name}}" autofocus required>
</div>
<div class="form-group">
<label for="torrent">{{T "torrent_file"}}</label>
@ -16,12 +16,12 @@
</div>
<div class="form-group">
<label for="magnet">{{T "magnet_link"}}</label>
<input type="text" name="magnet" class="form-control"
<input type="text" name="magnet" id="magnet" class="form-control"
style="width:60rem" placeholder="{{T "magnet_link"}}" value="{{.Magnet}}">
</div>
<div class="form-group">
<label for="c">{{T "category"}}</label>
<select name="c" class="form-control input-sm" required>
<select name="c" id="c" class="form-control input-sm" required>
<option value="">{{T "select_a_torrent_category"}}</option>
<option value="3_12" {{if eq .Category "3_12"}}selected{{end}}>{{T "anime_amv"}}</option>
<option value="3_5" {{if eq .Category "3_5"}}selected{{end}}>{{T "anime_english_translated"}}</option>
@ -43,14 +43,14 @@
</select>
</div>
<div class="form-group">
<input type="checkbox" name="remake">
<input type="checkbox" name="remake" id="remake" >
<label for="remake">{{T "mark_as_remake"}}</label>
</div>
<div class="form-group">
<label for="desc">{{T "torrent_description"}}</label>
<p class="help-block">{{T "description_markdown_notice"}}</p>
<textarea name="desc" class="form-control" rows="10">{{.Description}}</textarea>
<textarea name="desc" id="desc" class="form-control" rows="10">{{.Description}}</textarea>
</div>
{{block "captcha" .}}{{end}}

Voir le fichier

@ -12,7 +12,7 @@
<div class="alert alert-danger">{{ . }}</div>
{{end}}
<div class="form-group">
<input type="text" name="username" id="username" class="form-control input-lg" autofocus="" placeholder="{{ T "email_address_or_username"}}">
<input type="text" name="username" id="username" class="form-control input-lg" autofocus placeholder="{{ T "email_address_or_username"}}">
{{ range (index $.FormErrors "username")}}
<p class="text-error">{{ . }}</p>
{{end}}

Voir le fichier

@ -12,13 +12,13 @@
<div class="alert alert-danger">{{ . }}</div>
{{end}}
<div class="form-group">
<input type="text" name="username" id="display_name" class="form-control input-lg" placeholder="{{T "username" }}" tabindex="1" value="{{ .Username }}">
<input type="text" name="username" id="display_name" class="form-control input-lg" placeholder="{{T "username" }}" value="{{ .Username }}" autofocus>
{{ range (index $.FormErrors "username")}}
<p class="text-error">{{ . }}</p>
{{end}}
</div>
<div class="form-group">
<input type="email" name="email" id="email" class="form-control input-lg" placeholder="{{T "email_address" }}" tabindex="2" value="{{ .Email }}">
<input type="email" name="email" id="email" class="form-control input-lg" placeholder="{{T "email_address" }}" value="{{ .Email }}">
{{ range (index $.FormErrors "email")}}
<p class="text-error">{{ . }}</p>
{{end}}
@ -26,7 +26,7 @@
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="form-group">
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="{{T "password" }}" tabindex="3" value="{{ .Password }}">
<input type="password" name="password" id="password" class="form-control input-lg" placeholder="{{T "password" }}" value="{{ .Password }}">
{{ range (index $.FormErrors "password")}}
<p class="text-error">{{ . }}</p>
{{end}}
@ -34,7 +34,7 @@
</div>
<div class="col-xs-12 col-sm-6 col-md-6">
<div class="form-group">
<input type="password" name="password_confirmation" id="password_confirmation" class="form-control input-lg" placeholder="{{T "confirm_password" }}" tabindex="4">
<input type="password" name="password_confirmation" id="password_confirmation" class="form-control input-lg" placeholder="{{T "confirm_password" }}">
{{ range (index $.FormErrors "password_confirmation")}}
<p class="text-error">{{ . }}</p>
{{end}}
@ -44,7 +44,7 @@
<div class="row">
<div class="col-xs-4 col-sm-3 col-md-3">
<span class="button-checkbox">
<button type="button" class="btn hidden" data-color="info" tabindex="5">{{T "i_agree" }}</button>
<button type="button" class="btn hidden" data-color="info">{{T "i_agree" }}</button>
<input type="checkbox" name="t_and_c" id="t_and_c" value="1">
{{ range (index $.FormErrors "t_and_c")}}
<p class="text-error">{{ . }}</p>
@ -60,7 +60,7 @@
<hr class="colorgraph">
<div class="row">
<div class="col-xs-12 col-md-6"><input type="submit" value="{{T "register" }}" class="btn btn-primary btn-block btn-lg" tabindex="7"></div>
<div class="col-xs-12 col-md-6"><input type="submit" value="{{T "register" }}" class="btn btn-primary btn-block btn-lg"></div>
<div class="col-xs-12 col-md-6">or <a href="{{ genRoute "user_login" }}" class="">{{T "signin" }}</a></div>
</div>
</form>

Voir le fichier

@ -123,23 +123,22 @@
</div>
</div>
</div>
{{with .Torrent}}
<div id="reportModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<h4 class="modal-title">Report Torrent #{{.ID}}</h4>
<h4 class="modal-title">Report Torrent #{{.Torrent.ID}}</h4>
</div>
<div class="modal-body">
<b>Report type:</b>
<form method="post" action="/report/{{.ID}}">
<input type="radio" name="report_type" value="illegal"> Illegal content<br />
<input type="radio" name="report_type" value="spam"> Spam / Garbage<br />
<input type="radio" name="report_type" value="wrongcat"> Wrong category<br />
<input type="radio" name="report_type" value="dup"> Duplicate / Deprecated<br />
{{end}}
<form method="post" action="/report/{{.Torrent.ID}}">
<input type="radio" name="report_type" value="illegal" required> Illegal content<br />
<input type="radio" name="report_type" value="spam" required> Spam / Garbage<br />
<input type="radio" name="report_type" value="wrongcat" required> Wrong category<br />
<input type="radio" name="report_type" value="dup" required> Duplicate / Deprecated<br />
{{block "captcha" .}}{{end}}
<button type="submit" class="btn btn-default">Report!</button>
</form> <br />

Voir le fichier

@ -273,7 +273,7 @@
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "Um Sukebei steht es hingegen schlechter. Zurzeit haben wir nur eine Sukebei-Datenbank bis 2016, aber eine neuere Datenbank steht möglicherweise zu Verfügung."
"translation": "Das Gleiche gilt für Sukebei, es fehlt auch fast nichts."
},
{
"id": "how_are_we_recovering",
@ -281,7 +281,7 @@
},
{
"id": "answer_how_are_we_recovering",
"translation": "Die obengenannten Datenbanken werden im Moment auf nyaa.pantsu.cat und sukebei.pantsu.cat bereitgestellt. Es gibt eine Suchfunktion und (fast) vollständige Funktionalität von nyaa sollte bald wiederhergestellt sein. Seeder/Leecher Statistiken sind via Scraping möglich und werden in Zukunft vielleicht wiederhergestellt werden, da andere Funktionen Vorrang haben."
"translation": "Die obengenannten Datenbanken werden im Moment auf nyaa.pantsu.cat und sukebei.pantsu.cat bereitgestellt. Es gibt eine Suchfunktion und (fast) vollständige Funktionalität von nyaa sollte bald wiederhergestellt sein."
},
{
"id": "are_the_trackers_working",
@ -317,7 +317,7 @@
},
{
"id": "answer_how_can_i_help",
"translation": "Wenn du Erfahrungen mit Webseitenprogrammierung hast, kannst du dem IRC-Kanal #nyaapantsu auf irc.rizon.net (Englisch) beitreten. Wenn du irgendwelche Datenbanken hast, insbesondere für Sukebei, <b>LAD SIE HOCH</b>."
"translation": "Wenn du Erfahrungen mit Webseitenprogrammierung hast, kannst du dem IRC-Kanal #nyaapantsu auf irc.rizon.net (Englisch) beitreten. Wenn du irgendwelche Datenbanken hast, insbesondere für Sukebei, lad sie hoch."
},
{
"id": "your_design_sucks_found_a_bug",
@ -351,6 +351,10 @@
"id": "all_categories",
"translation": "Alle Kategorien"
},
{
"id": "select_a_torrent_category",
"translation": "Wähle eine Kategorie aus"
},
{
"id": "anime",
"translation": "Anime"
@ -587,6 +591,10 @@
"id": "torrent_status_remake",
"translation": "Remake"
},
{
"id": "profile_edit_page",
"translation": "Profil von %s bearbeiten"
},
{
"id": "seeders",
"translation": "Seeder"
@ -599,8 +607,16 @@
"id": "completed",
"translation": "Komplett"
},
{
"id": "change_language",
"translation": "Sprache ändern"
},
{
"id": "language_name",
"translation": "Deutsch"
},
{
"id": "delete",
"translation": "Löschen"
}
]

Voir le fichier

@ -249,7 +249,7 @@
},
{
"id": "future_not_looking_good",
"translation": "Future prospects for nyaa are not looking good. (It's dead)"
"translation": "Future prospects for nyaa are not looking good. (It's dead, Jim)"
},
{
"id": "recovery_effort",
@ -281,7 +281,7 @@
},
{
"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. Seeder/leecher statistics are possible via scraping and might be restored sometime in the future, since other feature take priority right now."
"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": "are_the_trackers_working",
@ -309,7 +309,11 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "If your torrent upload is denied because of trackers you'll need to add some of these:"
"translation": "We now have our own Tracker!, add it to the top of the list before uploading:"
},
{
"id": "other_trackers",
"translation": "But you should also add these, just in case something goes wrong"
},
{
"id": "how_can_i_help",
@ -573,7 +577,7 @@
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん is the username assigned to uploads and comments made anonymously. It is also used for torrent imported from the original nyaa, though the original uploader may be displayed alongside."
"translation": "れんちょん (Ren-chon) is the username assigned to uploads and comments made anonymously. It is also used for torrents imported from the original nyaa, though sometimes the original uploader can be displayed alongside."
},
{
"id": "mark_as_remake",
@ -626,5 +630,9 @@
{
"id": "language_name",
"translation": "English"
},
{
"id": "delete",
"translation": "Delete"
}
]

Voir le fichier

@ -1,7 +1,7 @@
[
{
"id": "link",
"translation": "link"
"translation": "enlace"
},
{
"id": "verify_email_title",
@ -9,7 +9,7 @@
},
{
"id": "verify_email_content",
"translation": "Por favor, da click en el siguiente link para verificar tu correo electrónico."
"translation": "Por favor, da click en el siguiente enlace para verificar tu correo electrónico."
},
{
"id": "reset_password_title",
@ -17,7 +17,7 @@
},
{
"id": "reset_password_content",
"translation": "Por favor, da click en el siguiente link para reestablecer tu contraseña."
"translation": "Por favor, da click en el siguiente enlace para reestablecer tu contraseña."
},
{
"id":"register_title",
@ -25,7 +25,7 @@
},
{
"id":"signup_box_title",
"translation": "Por favor registrate. <small>Es gratis y siempre lo será.</small>"
"translation": "Por favor, regístrate. <small>Es gratis y siempre lo será.</small>"
},
{
"id":"username",
@ -53,7 +53,7 @@
},
{
"id":"terms_conditions_confirm",
"translation": "Al dar click en <strong class=\"label label-primary\">Registrate</strong>, aceptas los <a href=\"#\" data-toggle=\"modal\" data-target=\"#t_and_c_m\">Terminos and Condiciones</a> establecidos por este sitio, incluyendo nuestro uso de Cookies."
"translation": "Al dar click en <strong class=\"label label-primary\">Registrarse</strong>, aceptas los <a href=\"#\" data-toggle=\"modal\" data-target=\"#t_and_c_m\">Términos y Condiciones</a> del sitio, incluyendo nuestro Uso de Cookies."
},
{
"id":"signin",
@ -61,7 +61,7 @@
},
{
"id":"register",
"translation": "Registrate"
"translation": "Registrarse"
},
{
"id":"terms_conditions",
@ -89,23 +89,27 @@
},
{
"id":"register_success_title",
"translation": "Registro exitoso"
"translation": "Registro Exitoso"
},
{
"id":"sign_up_success",
"translation": "Gracias por registrate!"
"translation": "¡Gracias por registrarte!"
},
{
"id":"verify_success",
"translation": "<i style=\"color:limegreen\" class=\"glyphicon glyphicon-ok-circle\"></i>Tu cuenta ha sido activada!"
"translation": "<i style=\"color:limegreen\" class=\"glyphicon glyphicon-ok-circle\"></i>¡Tu cuenta ha sido activada!"
},
{
"id":"signup_verification_email",
"translation": "Ahora, como paso final para registrarte, por favor revisa la bandeja de entrada de tu correo electrónico (o spam) y da click en el link provisto para activar tu cuenta!"
"translation": "Por último, revisa en tu bandeja de entrada (¡y en la carpeta de spam!) el correo de verificación."
},
{
"id":"signup_verification_noemail",
"translation": "Te has registrado exitosamente, ahora puedes usar tu cuenta."
},
{
"id":"settings",
"translation": "Ajustes"
"translation": "Ajustes de la Cuenta"
},
{
"id":"torrents",
@ -115,6 +119,18 @@
"id":"follow",
"translation": "Seguir"
},
{
"id":"unfollow",
"translation": "Dejar de Seguir"
},
{
"id":"user_followed_msg",
"translation": "¡Ahora sigues a %s!"
},
{
"id":"user_unfollowed_msg",
"translation": "¡Has dejado de seguir a %s!"
},
{
"id":"profile_page",
"translation": "Perfil de %s"
@ -141,7 +157,7 @@
},
{
"id": "links",
"translation": "Links"
"translation": "Enlaces"
},
{
"id": "home",
@ -181,7 +197,7 @@
},
{
"id": "no_torrents_uploaded",
"translation": "No hay torrents subidos aún!"
"translation": "¡No hay torrents subidos aún!"
},
{
"id": "profile",
@ -201,7 +217,7 @@
},
{
"id": "sign_up",
"translation": "Registrate"
"translation": "Registrarse"
},
{
"id": "no_results_found",
@ -209,7 +225,7 @@
},
{
"id": "notice_keep_seeding",
"translation": "AVISO: Sigue compartiendo (seeding) y habilita DHT."
"translation": "AVISO: Sigue compartiendo y habilita la red DHT"
},
{
"id": "official_nyaapocalipse_faq",
@ -217,7 +233,7 @@
},
{
"id": "links_replacement_mirror",
"translation": "Links al reemplazo/espejo"
"translation": "Enlaces al reemplazo/espejo"
},
{
"id": "what_happened",
@ -225,15 +241,15 @@
},
{
"id": "nyaa_se_went_offline",
"translation": "nyaa.se y los dominios asociados (como nyaatorrents.info) quedaron fuera de linea el 1ro de Mayo del 2017."
"translation": "nyaa.se y los dominios relacionados (como nyaatorrents.info) quedaron fuera de línea el 1ro de Mayo de 2017."
},
{
"id": "its_not_a_ddos",
"translation": "Fueron desactivados, asi que no fue un ataque DDos como lo es usualmente."
"translation": "Fueron desactivados, así que no fue un ataque DDoS como lo es usualmente."
},
{
"id": "future_not_looking_good",
"translation": "Las perspectivas de futuro para nyaa no se ven bien. (Está muerto)"
"translation": "Las posibilidades de que nyaa vuelva son desalentadoras. (Está muerto)"
},
{
"id": "recovery_effort",
@ -241,7 +257,7 @@
},
{
"id": "is_everything_lost",
"translation": "¿Está todo perdido?"
"translation": "¿Se ha perdido todo?"
},
{
"id": "in_short_no",
@ -249,7 +265,7 @@
},
{
"id": "are_some_things_lost",
"translation": "¿Hay cosas perdidas?"
"translation": "¿Hay algo que se haya perdido?"
},
{
"id": "answer_is_nyaa_db_lost",
@ -257,7 +273,7 @@
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "Sukebei, sin embargo, está en peor estado. Actualmente, solo tenemos bases de datos hasta el 2016, pero una nueva base de datos podría estar disponible para usar."
"translation": "Sukebei también está a salvo, casi nada se perdió."
},
{
"id": "how_are_we_recovering",
@ -265,7 +281,7 @@
},
{
"id": "answer_how_are_we_recovering",
"translation": "Las bases de datos mencionadas están hospedadas en nyaa.pantsu.cat y sukebei.pantsu.cat. Hay una función de busqueda, y (casi) la funcionalidad total de nyaa deberia estar pronto. Las estadisticas de Seeder/leecher son posibles mediante 'scraping' y podrían ser restauradas en un futuro, debido a que otras funcionalidades son prioridad por el momento."
"translation": "Las bases de datos mencionadas están hospedadas en nyaa.pantsu.cat y sukebei.pantsu.cat. Hay una función de busqueda, y la (casi) total funcionalidad de nyaa deberia estar lista pronto. Las estadisticas de Seeder/leecher son posibles mediante 'scraping' y podrían ser restauradas en un futuro, debido a que otras funcionalidades son prioridad por el momento."
},
{
"id": "are_the_trackers_working",
@ -273,7 +289,7 @@
},
{
"id": "answer_are_the_trackers_working",
"translation": "Aún si los trackers están caídos, los seeders aún están conectadosa la red DHT. Mientras el archivo esté listado en la red DHT, se compatirá como usualmente pasa."
"translation": "Aún si los trackers están caídos, los seeders aún están conectados a la red descentralizada DHT. Mientras el archivo esté listado en la red DHT, se compatirá como usualmente pasa."
},
{
"id": "how_do_i_download_the_torrents",
@ -281,11 +297,11 @@
},
{
"id": "answer_how_do_i_download_the_torrents",
"translation": " Sólo usa el <b>link magnet</b>. El link magnet será utilizado por tu cliente de BitTorrent para buscar el archivo en la red DHT y descargarlo."
"translation": "Solo usa el <b>enlace magnet</b>. El enlace magnet será usado por tu cliente de BitTorrent para buscar el archivo en la red DHT y debería descargarlo correctamente."
},
{
"id": "magnet_link_should_look_like",
"translation": "El link magnetico debería verse así:"
"translation": "El enlace magnet debería verse así:"
},
{
"id": "which_trackers_do_you_recommend",
@ -293,7 +309,7 @@
},
{
"id": "answer_which_trackers_do_you_recommend",
"translation": "Si tu carga de un torrent es denegada por culpa de los trackers, necesitarás agregar algunos de estos:"
"translation": "Si el torrent que subes es rechazado debido a los trackers, necesitarás añadir alguno de estos:"
},
{
"id": "how_can_i_help",
@ -301,15 +317,15 @@
},
{
"id": "answer_how_can_i_help",
"translation": "Si tienes expericia en desarrollo web, puedes unirte al canal IRC #nyaapantsu en irc.rizon.net. Si tienes bases de datos actuales, especialemente de sukebei, <b>SUBELAS</b>."
"translation": "Si tienes experiencia en desarrollo web, puedes unirte al canal IRC #nyaapantsu en irc.rizon.net. Si tienes bases de datos actuales, especialmente de sukebei, súbelas por favor."
},
{
"id": "your_design_sucks_found_a_bug",
"translation": "El diseño apesta / Encontré un bug"
"translation": "El diseño apesta / Encontré un error"
},
{
"id": "why_written_in_go",
"translation": "¿Porqué está escrito en Go?"
"translation": "¿Por qué está escrito en Go?"
},
{
"id": "authors_favorite_language",
@ -329,11 +345,15 @@
},
{
"id": "magnet_link",
"translation": "Link magnet"
"translation": "Enlace Magnet"
},
{
"id": "all_categories",
"translation": "Todas las categorías"
"translation": "Todas las Categorías"
},
{
"id": "select_a_torrent_category",
"translation": "Selecciona una Categoría para el Torrent"
},
{
"id": "anime",
@ -345,11 +365,11 @@
},
{
"id": "anime_english_translated",
"translation": "Anime - Traducción a Inglés"
"translation": "Anime - Traducido al Inglés"
},
{
"id": "anime_non_english_translated",
"translation": "Anime - Traducción diferente a Inglés"
"translation": "Anime - Traducido a un idioma distinto del Inglés"
},
{
"id": "anime_raw",
@ -361,11 +381,11 @@
},
{
"id": "audio_lossless",
"translation": "Audio - Lossless"
"translation": "Audio - Sin Pérdida"
},
{
"id": "audio_lossy",
"translation": "Audio - Lossy"
"translation": "Audio - Con Pérdida"
},
{
"id": "literature",
@ -373,7 +393,7 @@
},
{
"id": "literature_english_translated",
"translation": "Literatura - Traducción a Inglés"
"translation": "Literatura - Traducida al Inglés"
},
{
"id": "literature_raw",
@ -381,7 +401,7 @@
},
{
"id": "literature_non_english_translated",
"translation": "Literatura - Traducción diferente a Inglés"
"translation": "Literatura - Traducida a un idioma distinto del Inglés"
},
{
"id": "live_action",
@ -389,7 +409,7 @@
},
{
"id": "live_action_english_translated",
"translation": "Live Action - Traducción a Inglés"
"translation": "Live Action - Traducido al Inglés"
},
{
"id": "live_action_idol_pv",
@ -397,7 +417,7 @@
},
{
"id": "live_action_non_english_translated",
"translation": "Live Action - Traducción diferente a Inglés"
"translation": "Live Action - Traducido a un idioma distinto del Inglés"
},
{
"id": "live_action_raw",
@ -429,19 +449,19 @@
},
{
"id": "torrent_description",
"translation": "Description del Torrent"
"translation": "Descripción del Torrent"
},
{
"id": "limited_html_set_is_allowed_use",
"translation": "Un conjunto limitado de HTML se permite en la descripción, asegúrate de utilizarlo"
"id": "description_markdown_notice",
"translation": "Puedes usar Markdown en las descripciones."
},
{
"id": "show_all",
"translation": "Mostrar todos"
"translation": "Mostrar todo"
},
{
"id": "filter_remakes",
"translation": "Filtrar Remaked"
"translation": "Filtrar Remakes"
},
{
"id": "trusted",
@ -529,19 +549,79 @@
},
{
"id": "profile_updated",
"translation": "Tu perfil ha sido actualizado correctamente!"
"translation": "¡Tu perfil ha sido actualizado correctamente!"
},
{
"id": "delete_account",
"translation": "Eliminar cuenta"
"translation": "Eliminar Cuenta"
},
{
"id": "delete_account_confirm",
"translation": "¿Estás seguro de que desear eliminar esta cuenta?"
"translation": "¿Estás seguro de que deseas eliminar esta cuenta?"
},
{
"id": "delete_success",
"translation": "Se ha eliminado exitosamente la cuenta!"
"translation": "¡Esta cuenta ha sido eliminada exitosamente!"
},
{
"id": "moderation",
"translation": "Moderación"
},
{
"id": "who_is_renchon",
"translation": "¿Quién es れんちょん?"
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん es el nombre de usuario asignado a las subidas y comentarios hechos anónimamente. También es usado en los torrents importados desde el nyaa original, aunque es posible que se muestre junto al nombre de usuario original."
},
{
"id": "mark_as_remake",
"translation": "Marcar como remake"
},
{
"id": "email_changed",
"translation": "¡Se ha cambiado exitosamente la dirección de correo electrónico! Sin embargo, tendrás que confirmar el cambio dando click al enlace enviado a: %s"
},
{
"id": "torrent_status",
"translation": "Estado del Torrent"
},
{
"id": "torrent_status_hidden",
"translation": "Oculto"
},
{
"id": "torrent_status_normal",
"translation": "Normal"
},
{
"id": "torrent_status_remake",
"translation": "Remake"
},
{
"id": "profile_edit_page",
"translation": "Editar perfil de %s"
},
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{
"id": "seeders",
"translation": "Seeders"
},
{
"id": "leechers",
"translation": "Leechers"
},
{
"id": "completed",
"translation": "Completado"
},
{
"id": "change_language",
"translation": "Cambiar Idioma"
},
{
"id": "language_name",

Voir le fichier

@ -229,7 +229,7 @@
},
{
"id": "nyaa_se_went_offline",
"translation": "nyaa.se és a vele kapcsolatos domain-ek (pl. nyaatorrents.info) elérhetetlenné vált 2017. Május 1-én."
"translation": "nyaa.se és a vele kapcsolatos domain-ek (pl. nyaatorrents.info) elérhetetlenné váltak 2017. május 1-én."
},
{
"id": "its_not_a_ddos",
@ -547,6 +547,66 @@
"id": "delete_success",
"translation": "A fiók törlésre került."
},
{
"id": "moderation",
"translation": "Moderáció"
},
{
"id": "who_is_renchon",
"translation": "Ki a fasz az a れんちょん?"
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん nevet az kapja, aki névtelenül ír kommentet vagy tölt fel valamit. Ezt a nevet kapják az eredeti nyaa-ról átimportált torrentek is, viszont az eredeti feltöltő neve megjelenhet mellette."
},
{
"id": "mark_as_remake",
"translation": "Remake-ként jelölés"
},
{
"id": "email_changed",
"translation": "Az email megváltoztatása sikeres volt, viszont még meg kell erősítened a(z) %s címre küldött linkkel."
},
{
"id": "torrent_status",
"translation": "Torrent állapota"
},
{
"id": "torrent_status_hidden",
"translation": "Eltüntetett"
},
{
"id": "torrent_status_normal",
"translation": "Normál"
},
{
"id": "torrent_status_remake",
"translation": "Remake"
},
{
"id": "profile_edit_page",
"translation": "%s profiljának szerkesztése."
},
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{
"id": "seeders",
"translation": "Seederek"
},
{
"id": "leechers",
"translation": "Leecherek"
},
{
"id": "completed",
"translation": "Befejezett"
},
{
"id": "change_language",
"translation": "Nyelv megváltoztatása"
},
{
"id": "language_name",
"translation": "Magyar"

Voir le fichier

@ -9,7 +9,7 @@
},
{
"id": "verify_email_content",
"translation": "あなたのメールアドレスを認証するには、以下のリンクをクリックします。"
"translation": "お使いのメールアドレスを認証するには、以下のリンクをクリックします。"
},
{
"id": "reset_password_title",
@ -97,7 +97,7 @@
},
{
"id":"verify_success",
"translation": "<i style=\"color:limegreen\" class=\"glyphicon glyphicon-ok-circle\"></i>アカウントは有効になっています。"
"translation": "<i style=\"color:limegreen\" class=\"glyphicon glyphicon-ok-circle\"></i>お使いのアカウントは有効になりました。"
},
{
"id":"signup_verification_email",
@ -105,7 +105,7 @@
},
{
"id":"signup_verification_noemail",
"translation": "認証が完了しました。今からこのアカウントを使うことができます。"
"translation": "認証が完了しました。今からこのアカウントを使えるようになります。"
},
{
"id":"settings",
@ -119,13 +119,25 @@
"id":"follow",
"translation": "フォロー"
},
{
"id":"unfollow",
"translation": "フォロー解除"
},
{
"id":"user_followed_msg",
"translation": "%s さんをフォローしました。"
},
{
"id":"user_unfollowed_msg",
"translation": "%s さんのフォローを解除しました。"
},
{
"id":"profile_page",
"translation": "%s プロフィールページ"
"translation": "%s さんのプロフィールページ"
},
{
"id":"see_more_torrents_from",
"translation": "%s の Torrent をもっと表示"
"translation": "%s さんの Torrent をもっと表示"
},
{
"id":"category",
@ -217,7 +229,7 @@
},
{
"id": "official_nyaapocalipse_faq",
"translation": "公式 nyaa <ruby>黙示録<rp>(</rp><rt>アポカリプス</rt><rp>)</rp></ruby> のよくある質問"
"translation": "公式 nyaa 最期についてよくある質問"
},
{
"id": "links_replacement_mirror",
@ -229,7 +241,7 @@
},
{
"id": "nyaa_se_went_offline",
"translation": "nyaa.se とその関連ドメイン (nyaatorrents.infoなど) は 2017年5月1日 にオフラインになった。"
"translation": "nyaa.se 並びにその関連ドメイン (nyaatorrents.info など) は 2017年5月1日 にオフラインになった。"
},
{
"id": "its_not_a_ddos",
@ -245,7 +257,7 @@
},
{
"id": "is_everything_lost",
"translation": "nyaa.se のすべてが失われてしまったの?"
"translation": "すべてが失われてしまったの?"
},
{
"id": "in_short_no",
@ -257,7 +269,7 @@
},
{
"id": "answer_is_nyaa_db_lost",
"translation": "<s>4月5日</s> 5月1日までの nyaa.se のデータベースはあります。要するに、ほとんど失われていません。"
"translation": "<s>4月5日</s> 5月1日までのデータベースはあります。要するに、ほとんど失われていません。"
},
{
"id": "answer_is_sukebei_db_lost",
@ -265,11 +277,11 @@
},
{
"id": "how_are_we_recovering",
"translation": "どのように復旧させるの?"
"translation": "どのように復旧してるの?"
},
{
"id": "answer_how_are_we_recovering",
"translation": "上述のデータベースは nyaa.pantsu.cat と sukebei.pantsu.cat にホストされています。検索機能はすでにあり、近いうちに nyaa.se にあったほぼすべての機能が利用可能になるでしょう。また、Seeder / Leecher 統計はスクレイピングによって収集可能ですが、今は他に優先すべきことがあるため後回しにされます。"
"translation": "上述のデータベースは nyaa.pantsu.cat と sukebei.pantsu.cat にホストされています。検索機能はすでにあり、近いうちに nyaa.se にあったほぼすべての機能が利用可能になるでしょう。"
},
{
"id": "are_the_trackers_working",
@ -339,6 +351,10 @@
"id": "all_categories",
"translation": "すべてのカテゴリー"
},
{
"id": "select_a_torrent_category",
"translation": "Torrent カテゴリーを選択"
},
{
"id": "anime",
"translation": "アニメ"
@ -353,7 +369,7 @@
},
{
"id": "anime_non_english_translated",
"translation": "アニメ 英訳"
"translation": "アニメ 英訳"
},
{
"id": "anime_raw",
@ -373,19 +389,19 @@
},
{
"id": "literature",
"translation": ""
"translation": "書籍"
},
{
"id": "literature_english_translated",
"translation": " 英訳済み"
"translation": "書籍 英訳済み"
},
{
"id": "literature_raw",
"translation": " RAW"
"translation": "書籍 RAW"
},
{
"id": "literature_non_english_translated",
"translation": "英訳"
"translation": "書籍 英訳"
},
{
"id": "live_action",
@ -401,7 +417,7 @@
},
{
"id": "live_action_non_english_translated",
"translation": "実写 英訳"
"translation": "実写 英訳"
},
{
"id": "live_action_raw",
@ -437,7 +453,7 @@
},
{
"id": "description_markdown_notice",
"translation": "説明文には MarkDown 記法が使えます。"
"translation": "説明文には MarkDown 記法を使うことができます。"
},
{
"id": "show_all",
@ -445,7 +461,7 @@
},
{
"id": "filter_remakes",
"translation": "再構成されたフィルター"
"translation": "再構成フィルター"
},
{
"id": "trusted",
@ -457,7 +473,7 @@
},
{
"id": "downloads",
"translation": "ダウンロード"
"translation": "ダウンロード"
},
{
"id": "descending",
@ -549,7 +565,7 @@
},
{
"id": "moderation",
"translation": "緩和"
"translation": "節制"
},
{
"id": "who_is_renchon",
@ -592,9 +608,6 @@
"translation": "2006/01/02 15:04"
},
{
"id": "language_name",
"translation": "日本語"
},
"id": "seeders",
"translation": "Seeder 数"
},
@ -605,5 +618,17 @@
{
"id": "completed",
"translation": "完了数"
},
{
"id": "change_language",
"translation": "言語の変更"
},
{
"id": "language_name",
"translation": "日本語"
},
{
"id": "delete",
"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",
@ -569,7 +573,7 @@
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん é o nome atribuído a uploads e comentários feitos anonimamente. Também é usado para torrents importados do nyaa original, embora o uploader original seja mostrado ao lado."
"translation": "れんちょん (Ren-chon) é o nome atribuído a uploads e comentários feitos anonimamente. Também é usado para torrents importados do nyaa original, embora o uploader original seja mostrado ao lado."
},
{
"id": "mark_as_remake",

Voir le fichier

@ -229,11 +229,11 @@
},
{
"id": "official_nyaapocalipse_faq",
"translation": "ถาม-ตอบ Nyaapocalypse อย่างเป็นทางการ"
"translation": "ถาม-ตอบสถานการณ์ล่าสุดของ Nyaa อย่างเป็นทางการ"
},
{
"id": "links_replacement_mirror",
"translation": "ลิงค์สำหรับเว็บที่ใช้แทน/Mirror"
"translation": "ลิงค์สำหรับเว็บที่ใช้ทดแทน/Mirror"
},
{
"id": "what_happened",
@ -249,7 +249,7 @@
},
{
"id": "future_not_looking_good",
"translation": "และอนาคตข้างหน้าสำหรับ Nyaa ดูจะไม่ค่อยดีเท่าไหร่ (ตายสนิท)"
"translation": "และอนาคตสำหรับ Nyaa เองก็ไม่ค่อยดีเท่าไหร่ (ตายสนิท)"
},
{
"id": "recovery_effort",
@ -269,11 +269,11 @@
},
{
"id": "answer_is_nyaa_db_lost",
"translation": "เรามีข้อมูลฐานข้อมูลทอร์เรนท์ที่อยู่บน Nyaa ถึง <s>5 เมษายน</s> 1 พฤษภาคม นั่นหมายความว่าไม่มีอะไรหาย"
"translation": "เรามีข้อมูลฐานข้อมูลทอร์เรนท์ที่อยู่บน Nyaa ถึง <s>5 เมษายน</s> 1 พฤษภาคม นั่นหมายความว่าแทบจะไม่มีอะไรหาย"
},
{
"id": "answer_is_sukebei_db_lost",
"translation": "สำหรับ Sukebei นั่นโชคร้ายหน่อย ที่ในตอนนี้เรามีฐานข้อมูลของ 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 (เกือบ) ครบถ้วนควรจะมาในเร็วๆ นี้ สถิติผู้ปล่อย/ผู้โหลดที่อาจจะกู้กลับมาผ่านการ Scraping ในอนาคตอันใกล้ตั้งแต่ฟีเจอร์อื่นๆ ถูกให้ความสำคัญมากกว่าในตอนนี้"
"translation": "ฐานข้อมูลดังกล่าวถูกใช้งานกับ nyaa.pantsu.cat และ sukebei.pantsu.cat ซึ่งมีระบบค้นหา และระบบของ Nyaa (เกือบ) ครบถ้วนควรจะมาในเร็วๆ นี้"
},
{
"id": "are_the_trackers_working",
@ -317,11 +317,11 @@
},
{
"id": "answer_how_can_i_help",
"translation": "หากมีประสบการณ์ในการเขียนเว็บ คุณสามารถเข้ามาคุยในช่อง IRC #nyaapantsu บน irc.rizon.net หากคุณมีฐานข้อมูลใดๆ โดยเฉพาะของ Sukebei <b>กรุณาอัพโหลด</b>"
"translation": "หากมีประสบการณ์ในการเขียนเว็บ คุณสามารถเข้ามาคุยในช่อง IRC #nyaapantsu บน irc.rizon.net หากคุณมีฐานข้อมูลใดๆ โดยเฉพาะของ Sukebei กรุณาอัพโหลด"
},
{
"id": "your_design_sucks_found_a_bug",
"translation": "ดีไซน์กากว่ะ / เจอบัค"
"translation": "ดีไซน์กากว่ะคุณ / เจอบัค"
},
{
"id": "why_written_in_go",
@ -329,7 +329,7 @@
},
{
"id": "authors_favorite_language",
"translation": "เพราะเป็นภาษาถนัดของผู้พัฒนา"
"translation": "เพราะเป็นภาษาที่ผู้พัฒนาชอบ"
},
{
"id": "upload_magnet",
@ -350,6 +350,10 @@
{
"id": "all_categories",
"translation": "ทุกหมวดหมู่"
},
{
"id": "select_a_torrent_category",
"translation": "เลือกหมวดหมู่ทอร์เรนท์"
},
{
"id": "anime",
@ -457,7 +461,7 @@
},
{
"id": "filter_remakes",
"translation": "Filter Remakes"
"translation": "กรองงานทำซ้ำออกไป"
},
{
"id": "trusted",
@ -473,11 +477,11 @@
},
{
"id": "descending",
"translation": "Descending"
"translation": "เรียงจากบนลงล่าง"
},
{
"id": "ascending",
"translation": "Ascending"
"translation": "เรียงจากล่างขึ้นบน"
},
{
"id": "search",
@ -569,7 +573,7 @@
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん คือชื่อผู้ใช้ที่ตั้งไว้สำหรับอัพโหลดและคอมเมนท์แบบไม่ระบุตัวตน ซึ่งถูกใช้กับทอร์เรนท์ที่กู้มาจาก Nyaa ดั้งเดิม และชื่อผู้อัพโหลดดั้งเดิมควรจะแสดงผลคู่กัน"
"translation": "れんちょん คือชื่อผู้ใช้ที่ตั้งไว้สำหรับอัพโหลดและคอมเมนท์แบบไม่ระบุตัวตน ซึ่งถูกใช้กับทอร์เรนท์ที่กู้มาจาก Nyaa ดั้งเดิม และในบางครั้งชื่อผู้อัพโหลดดั้งเดิมจะแสดงผลคู่กัน"
},
{
"id": "mark_as_remake",
@ -615,8 +619,16 @@
"id": "completed",
"translation": "โหลดเสร็จแล้ว"
},
{
"id": "change_language",
"translation": "เปลี่ยนภาษา"
},
{
"id": "language_name",
"translation": "ไทย"
"translation": "ภาษาไทย"
},
{
"id": "delete",
"translation": "ลบ"
}
]

Voir le fichier

@ -113,7 +113,7 @@
},
{
"id":"torrents",
"translation": "种子"
"translation": "种子列表"
},
{
"id":"follow",
@ -181,7 +181,7 @@
},
{
"id": "fap",
"translation": "秘花园"
"translation": "花园"
},
{
"id": "advanced_search",
@ -237,7 +237,7 @@
},
{
"id": "what_happened",
"translation": "什么鬼"
"translation": "Nyaa站怎么了"
},
{
"id": "nyaa_se_went_offline",
@ -245,15 +245,15 @@
},
{
"id": "its_not_a_ddos",
"translation": "站点完全被停用,并不是以往的 DDoS 攻击"
"translation": "这次并不是因为以往的 DDoS 攻击,而是站点完全被停用了"
},
{
"id": "future_not_looking_good",
"translation": "nyaa 的未来非常的严峻 她真的走了"
"translation": "Nyaa 的未来非常的严峻,她永远的走了"
},
{
"id": "recovery_effort",
"translation": "而资料的抢救也正在进行中"
"translation": "我们正在进行对资料的抢救"
},
{
"id": "is_everything_lost",
@ -285,7 +285,7 @@
},
{
"id": "are_the_trackers_working",
"translation": "这些种子都还活着吗?"
"translation": "那..这些种子都还活着吗?"
},
{
"id": "answer_are_the_trackers_working",
@ -293,7 +293,7 @@
},
{
"id": "how_do_i_download_the_torrents",
"translation": "所以要怎么抓种?"
"translation": "所以要怎么抓种?"
},
{
"id": "answer_how_do_i_download_the_torrents",
@ -321,20 +321,16 @@
},
{
"id": "your_design_sucks_found_a_bug",
"translation": "你们设计的破网站 / 我找到 bug 了!"
"translation": "你们设计的什么破网站 / 我找到 bug 了!"
},
{
"id": "why_written_in_go",
"translation": "为啥要用 GO 语言?没有别的选择了吗"
"translation": "为什么非要用辣鸡 GO 语言"
},
{
"id": "authors_favorite_language",
"translation": "这是作者的信仰!"
},
{
"id": "nyaa_pantsu_dont_host_files",
"translation": "nyaa.pantsu.cat 以及 sukebei.pantsu.cat 沒有保存任何资料喵~"
},
{
"id": "upload_magnet",
"translation": "上传磁力链接"
@ -355,25 +351,29 @@
"id": "all_categories",
"translation": "所有分类"
},
{
"id": "select_a_torrent_category",
"translation": "请选择种子分类"
},
{
"id": "anime",
"translation": "动画"
"translation": "动"
},
{
"id": "anime_amv",
"translation": "动 - 动画MV"
"translation": "动 - 动画MV"
},
{
"id": "anime_english_translated",
"translation": "动 - 已翻译为英文"
"translation": "动 - 已翻译为英文"
},
{
"id": "anime_non_english_translated",
"translation": "动 - 未翻译为英文"
"translation": "动 - 未翻译为英文"
},
{
"id": "anime_raw",
"translation": "动 - 生肉"
"translation": "动 - 生肉"
},
{
"id": "audio",
@ -461,11 +461,11 @@
},
{
"id": "filter_remakes",
"translation": "过滤 Remakes"
"translation": "过滤再发行版"
},
{
"id": "trusted",
"translation": "信任的"
"translation": "信任的资源"
},
{
"id": "id",
@ -562,5 +562,69 @@
{
"id": "delete_success",
"translation": "您的账号已被删除!"
},
{
"id": "moderation",
"translation": "节制"
},
{
"id": "who_is_renchon",
"translation": "れんちょん是谁?"
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん是匿名评论与上传者的默认用户名同时也显示为Nyaa站原始资源的上传者."
},
{
"id": "mark_as_remake",
"translation": "标为再发行版(重制版)"
},
{
"id": "email_changed",
"translation": "邮箱更变成功喵~一份确认邮件已发送到 %s ,请点击里面的确认链接来完成修改!"
},
{
"id": "torrent_status",
"translation": "种子状态"
},
{
"id": "torrent_status_hidden",
"translation": "隐藏"
},
{
"id": "torrent_status_normal",
"translation": "普通"
},
{
"id": "torrent_status_remake",
"translation": "再发行"
},
{
"id": "profile_edit_page",
"translation": "编辑 %s 的个人资料"
},
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{
"id": "seeders",
"translation": "上传数"
},
{
"id": "leechers",
"translation": "下载数"
},
{
"id": "completed",
"translation": "完成数"
},
{
"id": "change_language",
"translation": "切换语言"
},
{
"id": "language_name",
"translation": "简体中文"
}
]
]

Voir le fichier

@ -558,5 +558,69 @@
{
"id": "delete_success",
"translation": "您的帳號已經成功刪除!"
},
{
"id": "moderation",
"translation": "節制"
},
{
"id": "who_is_renchon",
"translation": "誰是れんちょん?"
},
{
"id": "renchon_anon_explanation",
"translation": "れんちょん是匿名評論與上傳者的默認用戶名同時也顯示為Nyaa站原始資源的上傳者."
},
{
"id": "mark_as_remake",
"translation": "設為Remake"
},
{
"id": "email_changed",
"translation": "郵箱更變成功,一封確認郵件已發送到 %s ,請點擊裏面的確認連結來完成修改!"
},
{
"id": "torrent_status",
"translation": "種子狀態"
},
{
"id": "torrent_status_hidden",
"translation": "隱藏"
},
{
"id": "torrent_status_normal",
"translation": "普通"
},
{
"id": "torrent_status_remake",
"translation": "再發行"
},
{
"id": "profile_edit_page",
"translation": "編輯 %s 的個人檔案"
},
{
"id":"date_format",
"translation": "2006-01-02 15:04"
},
{
"id": "seeders",
"translation": "上傳數"
},
{
"id": "leechers",
"translation": "下載數"
},
{
"id": "completed",
"translation": "完成數"
},
{
"id": "change_language",
"translation": "更變語言"
},
{
"id": "language_name",
"translation": "繁體中文"
}
]

Voir le fichier

@ -2,13 +2,40 @@ package languages
import (
"fmt"
"html/template"
"net/http"
"path"
"path/filepath"
"github.com/ewhal/nyaa/config"
"github.com/ewhal/nyaa/service/user"
"github.com/nicksnyder/go-i18n/i18n"
"github.com/nicksnyder/go-i18n/i18n/language"
"html/template"
"net/http"
)
// Initialize the languages translation
func InitI18n(conf config.I18nConfig) error {
defaultFilepath := path.Join(conf.TranslationsDirectory, conf.DefaultLanguage+".all.json")
err := i18n.LoadTranslationFile(defaultFilepath)
if err != nil {
panic(fmt.Sprintf("failed to load default translation file '%s': %v", defaultFilepath, err))
}
paths, err := filepath.Glob(path.Join(conf.TranslationsDirectory, "*.json"))
if err != nil {
return fmt.Errorf("failed to get translation files: %v", err)
}
for _, path := range paths {
err := i18n.LoadTranslationFile(path)
if err != nil {
return fmt.Errorf("failed to load translation file '%s': %v", path, err)
}
}
return nil
}
// When go-i18n finds a language with >0 translations, it uses it as the Tfunc
// However, if said language has a missing translation, it won't fallback to the "main" language
func TfuncAndLanguageWithFallback(language string, languages ...string) (i18n.TranslateFunc, *language.Language, error) {
@ -81,7 +108,6 @@ func GetTfuncAndLanguageFromRequest(r *http.Request, defaultLanguage string) (T
return
}
func SetTranslationFromRequest(tmpl *template.Template, r *http.Request, defaultLanguage string) i18n.TranslateFunc {
r.Header.Add("Vary", "Accept-Encoding")
T, _ := GetTfuncAndLanguageFromRequest(r, defaultLanguage)

Voir le fichier

@ -0,0 +1,18 @@
package languages
import (
"path"
"testing"
"github.com/ewhal/nyaa/config"
)
func TestInitI18n(t *testing.T) {
conf := config.DefaultI18nConfig
conf.TranslationsDirectory = path.Join("..", "..", conf.TranslationsDirectory)
err := InitI18n(conf)
if err != nil {
t.Errorf("failed to initialize language translations: %v", err)
}
}