Added basic i18n

This commit is contained in:
2026-03-10 15:18:34 +08:00
parent 093a8745ac
commit 7d1de5f781
25 changed files with 660 additions and 105 deletions

View File

@@ -1,6 +1,7 @@
package bus
import (
"fmt"
i18n "github.com/tgckpg/golifehk/i18n"
query "github.com/tgckpg/golifehk/query"
)
@@ -53,10 +54,11 @@ func (this *BusStop) Reload() {
}
func (this BusStop) Register(registers map[string]struct{}) bool {
if _, ok := registers[this.StationId]; ok {
key := fmt.Sprintf("%s,%s", this.StationId, this.ReferenceId)
if _, ok := registers[key]; ok {
return false
}
registers[this.StationId] = struct{}{}
registers[key] = struct{}{}
return true
}