diff --git a/i18n/crawler/main.go b/i18n/crawler/main.go index bfa3e51..79a71a6 100644 --- a/i18n/crawler/main.go +++ b/i18n/crawler/main.go @@ -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)) { diff --git a/i18n/exceptions.go b/i18n/exceptions.go new file mode 100644 index 0000000..1a90292 --- /dev/null +++ b/i18n/exceptions.go @@ -0,0 +1,6 @@ +package i18n + +var IgnoreTheseStrings = map[string]bool { + "": true, + "»": true, +}