mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
[i18n] Add exceptions
This commit is contained in:
@@ -10,6 +10,8 @@ import (
|
||||
"github.com/soluble-ai/go-jnode"
|
||||
"github.com/yargevad/filepathx"
|
||||
"golang.org/x/net/html"
|
||||
|
||||
"codeberg.org/vnpower/pixivfe/v2/i18n"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -75,13 +77,7 @@ func processFile(filename string, result *jnode.Node) {
|
||||
|
||||
// manual filter
|
||||
func shouldIgnore(msg string) bool {
|
||||
if msg == "" {
|
||||
return true
|
||||
}
|
||||
if msg == "»" {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
return i18n.IgnoreTheseStrings[msg]
|
||||
}
|
||||
|
||||
func visit(node *html.Node, record func([]*html.Node)) {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
package i18n
|
||||
|
||||
var IgnoreTheseStrings = map[string]bool {
|
||||
"": true,
|
||||
"»": true,
|
||||
}
|
||||
Reference in New Issue
Block a user