summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rwxr-xr-xapp/api.go2
-rwxr-xr-xapp/cache.go2
-rwxr-xr-xapp/parsers.go2
-rwxr-xr-xapp/router.go2
-rwxr-xr-xapp/util.go4
-rwxr-xr-xapp/wrapper.go6
6 files changed, 9 insertions, 9 deletions
diff --git a/app/api.go b/app/api.go
index 0398d3c..c891c36 100755
--- a/app/api.go
+++ b/app/api.go
@@ -57,7 +57,7 @@ func (a API) sendMedia(d *devianter.Deviation) {
}
}
-// TODO: сделать фильтры
+// TODO: add filters
func (a API) Random() {
// Bounded retries: the loop used to be unbounded, and the DeviantArt-error
// path never incremented attempt, so a single request could spin forever
diff --git a/app/cache.go b/app/cache.go
index e03db67..1cb8988 100755
--- a/app/cache.go
+++ b/app/cache.go
@@ -1,4 +1,4 @@
-// TODO: реализовать кеширование JSON и почистить код
+// TODO: implement JSON caching and clean up the code
package app
import (
diff --git a/app/parsers.go b/app/parsers.go
index 229b4b5..976c1b5 100755
--- a/app/parsers.go
+++ b/app/parsers.go
@@ -188,7 +188,7 @@ type text struct {
To int
}
-// переписать весь этот пиздец нахуй
+// TODO: rewrite this whole mess
func ParseDescription(dscr devianter.Text) string {
var parsedDescription strings.Builder
TagBuilder := func(content string, tags ...string) string {
diff --git a/app/router.go b/app/router.go
index ac65c3d..13e8415 100755
--- a/app/router.go
+++ b/app/router.go
@@ -52,7 +52,7 @@ func Router() {
return fileReaded
}
- // функция, что управляет всем
+ // the function that drives everything
handle := func(w http.ResponseWriter, r *http.Request) {
path := parsepath(r.URL.Path)
Host = "http://" + r.Host
diff --git a/app/util.go b/app/util.go
index c886b29..1eecc13 100755
--- a/app/util.go
+++ b/app/util.go
@@ -261,13 +261,13 @@ func GetValueOfTag(t *html.Tokenizer) string {
}
}
-// навигация по страницам
+// page navigation
type DeviationList struct {
Pages int
More bool
}
-// FIXME: на некоротрых артах первая страница может вызывать полное отсутствие панели навигации.
+// FIXME: on some artworks the first page can make the navigation panel disappear entirely.
func (s skunkyart) NavBase(c DeviationList) string {
var list strings.Builder
diff --git a/app/wrapper.go b/app/wrapper.go
index 0f69159..9668ce0 100755
--- a/app/wrapper.go
+++ b/app/wrapper.go
@@ -167,7 +167,7 @@ func (s skunkyart) GRUser() {
}
}
-// посты
+// posts
func (s skunkyart) Deviation(author, postname string) {
id_search := regexp.MustCompile("[0-9]+").FindAllString(postname, -1)
if len(id_search) < 1 {
@@ -209,7 +209,7 @@ func (s skunkyart) Deviation(author, postname string) {
}
}
- // хештэги
+ // hashtags
for _, x := range post.Post.Deviation.Extended.Tags {
var tag strings.Builder
tag.WriteString(` <a href="`)
@@ -270,7 +270,7 @@ func (s skunkyart) Search() {
ss.Content, daError, err = devianter.PerformSearch(s.Query, s.Page, s.Type)
case 'g', 'f':
ss.Content, daError, err = devianter.PerformSearch(s.Query, s.Page, s.Type, s.Args.Get("usr"))
- case 'r': // скраппер, поскольку девиантартовцы зажопили гостевое API для поиска групп
+ case 'r': // scraper, since DeviantArt withholds the guest API for group search
var (
usernames = make(map[int]string)
url strings.Builder