Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/go-i18n.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Snyder <nickdsnyder@gmail.com>2019-06-11 20:06:53 +0300
committerGitHub <noreply@github.com>2019-06-11 20:06:53 +0300
commit0c6ce6ac1e8c119993c3d5638af4f7cd67ff068a (patch)
tree076e423ae93607c1000f77d66688c35393b49dfe
parent25e77afbf581e1fffd4e6caff4720575093def0b (diff)
Move code to v2 subfolder for greater compatibility (#187)v2.0.2
-rw-r--r--.gitignore6
-rw-r--r--.golangci.yml6
-rw-r--r--.travis.yml7
-rw-r--r--README.md10
-rw-r--r--dev.md4
-rw-r--r--v2/.goreleaser.yml (renamed from .goreleaser.yml)0
-rw-r--r--v2/example/README.md (renamed from example/README.md)0
-rw-r--r--v2/example/active.en.toml (renamed from example/active.en.toml)0
-rw-r--r--v2/example/active.es.toml (renamed from example/active.es.toml)0
-rw-r--r--v2/example/main.go (renamed from example/main.go)0
-rw-r--r--v2/go.mod (renamed from go.mod)0
-rw-r--r--v2/go.sum (renamed from go.sum)0
-rw-r--r--v2/goi18n/active.en.toml (renamed from goi18n/active.en.toml)0
-rw-r--r--v2/goi18n/common_test.go (renamed from goi18n/common_test.go)0
-rw-r--r--v2/goi18n/extract_command.go (renamed from goi18n/extract_command.go)0
-rw-r--r--v2/goi18n/extract_command_test.go (renamed from goi18n/extract_command_test.go)0
-rw-r--r--v2/goi18n/main.go (renamed from goi18n/main.go)0
-rw-r--r--v2/goi18n/main_test.go (renamed from goi18n/main_test.go)0
-rw-r--r--v2/goi18n/marshal.go (renamed from goi18n/marshal.go)0
-rw-r--r--v2/goi18n/merge_command.go (renamed from goi18n/merge_command.go)0
-rw-r--r--v2/goi18n/merge_command_test.go (renamed from goi18n/merge_command_test.go)0
-rw-r--r--v2/i18n/bundle.go (renamed from i18n/bundle.go)0
-rw-r--r--v2/i18n/bundle_test.go (renamed from i18n/bundle_test.go)0
-rw-r--r--v2/i18n/doc.go (renamed from i18n/doc.go)0
-rw-r--r--v2/i18n/example_test.go (renamed from i18n/example_test.go)0
-rw-r--r--v2/i18n/language_test.go (renamed from i18n/language_test.go)0
-rw-r--r--v2/i18n/localizer.go (renamed from i18n/localizer.go)0
-rw-r--r--v2/i18n/localizer_test.go (renamed from i18n/localizer_test.go)0
-rw-r--r--v2/i18n/message.go (renamed from i18n/message.go)0
-rw-r--r--v2/i18n/message_template.go (renamed from i18n/message_template.go)0
-rw-r--r--v2/i18n/message_template_test.go (renamed from i18n/message_template_test.go)0
-rw-r--r--v2/i18n/message_test.go (renamed from i18n/message_test.go)0
-rw-r--r--v2/i18n/parse.go (renamed from i18n/parse.go)0
-rw-r--r--v2/i18n/parse_test.go (renamed from i18n/parse_test.go)0
-rw-r--r--v2/internal/plural/codegen/generate.sh (renamed from internal/plural/codegen/generate.sh)0
-rw-r--r--v2/internal/plural/codegen/main.go (renamed from internal/plural/codegen/main.go)0
-rw-r--r--v2/internal/plural/codegen/plurals.xml (renamed from internal/plural/codegen/plurals.xml)0
-rw-r--r--v2/internal/plural/codegen/xml.go (renamed from internal/plural/codegen/xml.go)0
-rw-r--r--v2/internal/plural/doc.go (renamed from internal/plural/doc.go)0
-rw-r--r--v2/internal/plural/form.go (renamed from internal/plural/form.go)0
-rw-r--r--v2/internal/plural/operands.go (renamed from internal/plural/operands.go)0
-rw-r--r--v2/internal/plural/operands_test.go (renamed from internal/plural/operands_test.go)0
-rw-r--r--v2/internal/plural/rule.go (renamed from internal/plural/rule.go)0
-rw-r--r--v2/internal/plural/rule_gen.go (renamed from internal/plural/rule_gen.go)0
-rw-r--r--v2/internal/plural/rule_gen_test.go (renamed from internal/plural/rule_gen_test.go)0
-rw-r--r--v2/internal/plural/rule_test.go (renamed from internal/plural/rule_test.go)0
-rw-r--r--v2/internal/plural/rules.go (renamed from internal/plural/rules.go)0
-rw-r--r--v2/internal/plural/rules_test.go (renamed from internal/plural/rules_test.go)0
-rw-r--r--v2/internal/template.go (renamed from internal/template.go)0
-rw-r--r--v2/internal/template_test.go (renamed from internal/template_test.go)0
50 files changed, 15 insertions, 18 deletions
diff --git a/.gitignore b/.gitignore
index 281914e..a762d33 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@ output/
*.test
*.swp
-example/example
-goi18n/goi18n
+v2/example/example
+v2/goi18n/goi18n
-dist/
+v2/dist/
diff --git a/.golangci.yml b/.golangci.yml
index 55e6686..c0435fb 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -1,8 +1,8 @@
# https://github.com/golangci/golangci/wiki/Configuration
-service:
- prepare:
- - go get -t ./...
+# service:
+# prepare:
+# - go get -t ./...
linters:
enable:
- gofmt
diff --git a/.travis.yml b/.travis.yml
index ec9b5bd..7ce55bc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,11 +7,8 @@ matrix:
- go: 1.12.x
env: GO111MODULE=on COVER='-coverprofile=coverage.txt -covermode=atomic'
-install:
- - go get -t -v ./...
-
script:
- - go test -race $COVER ./...
+ - cd v2; go test -race $COVER ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
@@ -19,7 +16,7 @@ after_success:
deploy:
- provider: script
skip_cleanup: true
- script: curl -sL https://git.io/goreleaser | bash
+ script: cd v2; curl -sL https://git.io/goreleaser | bash
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
diff --git a/README.md b/README.md
index ce38b4a..2d851a0 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ go-i18n is a Go [package](#package-i18n) and a [command](#command-goi18n) that h
- Supports strings with named variables using [text/template](http://golang.org/pkg/text/template/) syntax.
- Supports message files of any format (e.g. JSON, TOML, YAML).
-## Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/i18n)
+## Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n)
The i18n package provides support for looking up messages according to a set of locale preferences.
@@ -55,7 +55,7 @@ localizer.Localize(&i18n.LocalizeConfig{
}) // Nick has 2 cats.
```
-## Command goi18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/goi18n)
+## Command goi18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/v2/goi18n)
The goi18n command manages message files used by the i18n package.
@@ -115,9 +115,9 @@ If you have added new messages to your program:
## For more information and examples:
-- Read the [documentation](http://godoc.org/github.com/nicksnyder/go-i18n/).
-- Look at the [code examples](https://github.com/nicksnyder/go-i18n/blob/master/i18n/example_test.go) and [tests](https://github.com/nicksnyder/go-i18n/blob/master/i18n/localizer_test.go).
-- Look at an example [application](https://github.com/nicksnyder/go-i18n/tree/master/example).
+- Read the [documentation](http://godoc.org/github.com/nicksnyder/go-i18n/v2).
+- Look at the [code examples](https://github.com/nicksnyder/go-i18n/blob/master/v2/i18n/example_test.go) and [tests](https://github.com/nicksnyder/go-i18n/blob/master/i18n/v2/localizer_test.go).
+- Look at an example [application](https://github.com/nicksnyder/go-i18n/tree/master/v2/example).
## License
diff --git a/dev.md b/dev.md
index d0210bb..f21dd61 100644
--- a/dev.md
+++ b/dev.md
@@ -4,5 +4,5 @@
1. Go to http://cldr.unicode.org/index/downloads to find the latest version.
1. Download the latest version of cldr-common (e.g. http://unicode.org/Public/cldr/33/cldr-common-33.0.zip)
-1. Unzip and copy `common/supplemental/plurals.xml` to `i18n/internal/plural/codegen/plurals.xml`
-1. Run `generate.sh` in `i18n/internal/plural/codegen/`
+1. Unzip and copy `v2/common/supplemental/plurals.xml` to `v2/i18n/internal/plural/codegen/plurals.xml`
+1. Run `generate.sh` in `v2/i18n/internal/plural/codegen/`
diff --git a/.goreleaser.yml b/v2/.goreleaser.yml
index d9352ad..d9352ad 100644
--- a/.goreleaser.yml
+++ b/v2/.goreleaser.yml
diff --git a/example/README.md b/v2/example/README.md
index 4ef9c4d..4ef9c4d 100644
--- a/example/README.md
+++ b/v2/example/README.md
diff --git a/example/active.en.toml b/v2/example/active.en.toml
index e642c54..e642c54 100644
--- a/example/active.en.toml
+++ b/v2/example/active.en.toml
diff --git a/example/active.es.toml b/v2/example/active.es.toml
index 43b5593..43b5593 100644
--- a/example/active.es.toml
+++ b/v2/example/active.es.toml
diff --git a/example/main.go b/v2/example/main.go
index 838e145..838e145 100644
--- a/example/main.go
+++ b/v2/example/main.go
diff --git a/go.mod b/v2/go.mod
index 7aba6f8..7aba6f8 100644
--- a/go.mod
+++ b/v2/go.mod
diff --git a/go.sum b/v2/go.sum
index 96207c2..96207c2 100644
--- a/go.sum
+++ b/v2/go.sum
diff --git a/goi18n/active.en.toml b/v2/goi18n/active.en.toml
index e69de29..e69de29 100644
--- a/goi18n/active.en.toml
+++ b/v2/goi18n/active.en.toml
diff --git a/goi18n/common_test.go b/v2/goi18n/common_test.go
index 0017bd2..0017bd2 100644
--- a/goi18n/common_test.go
+++ b/v2/goi18n/common_test.go
diff --git a/goi18n/extract_command.go b/v2/goi18n/extract_command.go
index 178a06d..178a06d 100644
--- a/goi18n/extract_command.go
+++ b/v2/goi18n/extract_command.go
diff --git a/goi18n/extract_command_test.go b/v2/goi18n/extract_command_test.go
index 4aacafa..4aacafa 100644
--- a/goi18n/extract_command_test.go
+++ b/v2/goi18n/extract_command_test.go
diff --git a/goi18n/main.go b/v2/goi18n/main.go
index f2f3d2c..f2f3d2c 100644
--- a/goi18n/main.go
+++ b/v2/goi18n/main.go
diff --git a/goi18n/main_test.go b/v2/goi18n/main_test.go
index 42d3a6a..42d3a6a 100644
--- a/goi18n/main_test.go
+++ b/v2/goi18n/main_test.go
diff --git a/goi18n/marshal.go b/v2/goi18n/marshal.go
index 751b698..751b698 100644
--- a/goi18n/marshal.go
+++ b/v2/goi18n/marshal.go
diff --git a/goi18n/merge_command.go b/v2/goi18n/merge_command.go
index 9765c6d..9765c6d 100644
--- a/goi18n/merge_command.go
+++ b/v2/goi18n/merge_command.go
diff --git a/goi18n/merge_command_test.go b/v2/goi18n/merge_command_test.go
index ff7c221..ff7c221 100644
--- a/goi18n/merge_command_test.go
+++ b/v2/goi18n/merge_command_test.go
diff --git a/i18n/bundle.go b/v2/i18n/bundle.go
index 62bcd43..62bcd43 100644
--- a/i18n/bundle.go
+++ b/v2/i18n/bundle.go
diff --git a/i18n/bundle_test.go b/v2/i18n/bundle_test.go
index 1237789..1237789 100644
--- a/i18n/bundle_test.go
+++ b/v2/i18n/bundle_test.go
diff --git a/i18n/doc.go b/v2/i18n/doc.go
index 73d7a06..73d7a06 100644
--- a/i18n/doc.go
+++ b/v2/i18n/doc.go
diff --git a/i18n/example_test.go b/v2/i18n/example_test.go
index 2256e63..2256e63 100644
--- a/i18n/example_test.go
+++ b/v2/i18n/example_test.go
diff --git a/i18n/language_test.go b/v2/i18n/language_test.go
index 3c4de69..3c4de69 100644
--- a/i18n/language_test.go
+++ b/v2/i18n/language_test.go
diff --git a/i18n/localizer.go b/v2/i18n/localizer.go
index 5d3b0df..5d3b0df 100644
--- a/i18n/localizer.go
+++ b/v2/i18n/localizer.go
diff --git a/i18n/localizer_test.go b/v2/i18n/localizer_test.go
index d08e970..d08e970 100644
--- a/i18n/localizer_test.go
+++ b/v2/i18n/localizer_test.go
diff --git a/i18n/message.go b/v2/i18n/message.go
index f8f789a..f8f789a 100644
--- a/i18n/message.go
+++ b/v2/i18n/message.go
diff --git a/i18n/message_template.go b/v2/i18n/message_template.go
index a1a619e..a1a619e 100644
--- a/i18n/message_template.go
+++ b/v2/i18n/message_template.go
diff --git a/i18n/message_template_test.go b/v2/i18n/message_template_test.go
index d920cd4..d920cd4 100644
--- a/i18n/message_template_test.go
+++ b/v2/i18n/message_template_test.go
diff --git a/i18n/message_test.go b/v2/i18n/message_test.go
index b37063a..b37063a 100644
--- a/i18n/message_test.go
+++ b/v2/i18n/message_test.go
diff --git a/i18n/parse.go b/v2/i18n/parse.go
index 57dd7fe..57dd7fe 100644
--- a/i18n/parse.go
+++ b/v2/i18n/parse.go
diff --git a/i18n/parse_test.go b/v2/i18n/parse_test.go
index 3272e52..3272e52 100644
--- a/i18n/parse_test.go
+++ b/v2/i18n/parse_test.go
diff --git a/internal/plural/codegen/generate.sh b/v2/internal/plural/codegen/generate.sh
index c9b71a7..c9b71a7 100644
--- a/internal/plural/codegen/generate.sh
+++ b/v2/internal/plural/codegen/generate.sh
diff --git a/internal/plural/codegen/main.go b/v2/internal/plural/codegen/main.go
index 2b58c38..2b58c38 100644
--- a/internal/plural/codegen/main.go
+++ b/v2/internal/plural/codegen/main.go
diff --git a/internal/plural/codegen/plurals.xml b/v2/internal/plural/codegen/plurals.xml
index 9bd3e70..9bd3e70 100644
--- a/internal/plural/codegen/plurals.xml
+++ b/v2/internal/plural/codegen/plurals.xml
diff --git a/internal/plural/codegen/xml.go b/v2/internal/plural/codegen/xml.go
index adcc1e2..adcc1e2 100644
--- a/internal/plural/codegen/xml.go
+++ b/v2/internal/plural/codegen/xml.go
diff --git a/internal/plural/doc.go b/v2/internal/plural/doc.go
index c2a71d5..c2a71d5 100644
--- a/internal/plural/doc.go
+++ b/v2/internal/plural/doc.go
diff --git a/internal/plural/form.go b/v2/internal/plural/form.go
index 287a87f..287a87f 100644
--- a/internal/plural/form.go
+++ b/v2/internal/plural/form.go
diff --git a/internal/plural/operands.go b/v2/internal/plural/operands.go
index 4d29726..4d29726 100644
--- a/internal/plural/operands.go
+++ b/v2/internal/plural/operands.go
diff --git a/internal/plural/operands_test.go b/v2/internal/plural/operands_test.go
index 9074e5c..9074e5c 100644
--- a/internal/plural/operands_test.go
+++ b/v2/internal/plural/operands_test.go
diff --git a/internal/plural/rule.go b/v2/internal/plural/rule.go
index 0869c84..0869c84 100644
--- a/internal/plural/rule.go
+++ b/v2/internal/plural/rule.go
diff --git a/internal/plural/rule_gen.go b/v2/internal/plural/rule_gen.go
index b089925..b089925 100644
--- a/internal/plural/rule_gen.go
+++ b/v2/internal/plural/rule_gen.go
diff --git a/internal/plural/rule_gen_test.go b/v2/internal/plural/rule_gen_test.go
index a17782c..a17782c 100644
--- a/internal/plural/rule_gen_test.go
+++ b/v2/internal/plural/rule_gen_test.go
diff --git a/internal/plural/rule_test.go b/v2/internal/plural/rule_test.go
index 85d26d9..85d26d9 100644
--- a/internal/plural/rule_test.go
+++ b/v2/internal/plural/rule_test.go
diff --git a/internal/plural/rules.go b/v2/internal/plural/rules.go
index 87eb836..87eb836 100644
--- a/internal/plural/rules.go
+++ b/v2/internal/plural/rules.go
diff --git a/internal/plural/rules_test.go b/v2/internal/plural/rules_test.go
index 759241d..759241d 100644
--- a/internal/plural/rules_test.go
+++ b/v2/internal/plural/rules_test.go
diff --git a/internal/template.go b/v2/internal/template.go
index 2fe9923..2fe9923 100644
--- a/internal/template.go
+++ b/v2/internal/template.go
diff --git a/internal/template_test.go b/v2/internal/template_test.go
index 2f5d991..2f5d991 100644
--- a/internal/template_test.go
+++ b/v2/internal/template_test.go