test
This commit is contained in:
parent
6cb67a6f35
commit
efa1197af3
@ -8,8 +8,6 @@ import "strings"
|
||||
type msgIdStrPairs map[string]string
|
||||
type localesMsg map[string]msgIdStrPairs
|
||||
|
||||
//const pattern = `msgid "(.+)"\nmsgstr "(.+)"`
|
||||
//const patternP = `msgid "(.+)"\nmsgid_plural "(.+)"\nmsgstr\[.\] "(.+)"\nmsgstr\[.\] "(.+)"`
|
||||
var pattern = [2] string {`msgid "(.+)"\nmsgstr "(.+)"`,`msgid "(.+)"\nmsgid_plural "(.+)"\nmsgstr\[.\] "(.+)"\nmsgstr\[.\] "(.+)"`}
|
||||
|
||||
func getPOPath(locale, domain, localedir string) string {
|
||||
|
14
po2json/po2json_test.go
Normal file
14
po2json/po2json_test.go
Normal file
@ -0,0 +1,14 @@
|
||||
package po2json
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestAll(t *testing.T) {
|
||||
locales := []string{"en_UK", "eu_ES"}
|
||||
const domain = "base"
|
||||
const localedir = "locales"
|
||||
|
||||
t.Log(getPOPath(locales[0], domain, localedir))
|
||||
t.Log(getPOPath(locales[1], domain, localedir))
|
||||
|
||||
t.Log(PO2JSON(locales, domain, localedir))
|
||||
}
|
Loading…
Reference in New Issue
Block a user