[i18n] Add exceptions

This commit is contained in:
iacore
2024-10-09 12:26:06 +00:00
parent 356d83bc7f
commit b63215a55b
2 changed files with 9 additions and 7 deletions
+3 -7
View File
@@ -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)) {
+6
View File
@@ -0,0 +1,6 @@
package i18n
var IgnoreTheseStrings = map[string]bool {
"": true,
"»": true,
}