Skip to content

Commit b280125

Browse files
committed
Revert "change package"
This reverts commit b5ee509.
1 parent b5ee509 commit b280125

31 files changed

+73
-73
lines changed

CHANGELOG.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Major version changes are documented in the changelog.
44

5-
To see the documentation for minor or patch version, [view the release notes](https://github.com/nicksnyder/test/releases).
5+
To see the documentation for minor or patch version, [view the release notes](https://github.com/nicksnyder/go-i18n/releases).
66

77
## v2
88

@@ -12,28 +12,28 @@ The first commit to this project was January 2012 (go1 had not yet been released
1212
This project has evolved with the Go ecosystem since then in a backwards compatible way,
1313
but there is a growing list of issues and warts that cannot be addressed without breaking compatiblity.
1414

15-
v2 is rewrite of the API from first principals to make it more idiomatic Go, and to resolve a backlog of issues: https://github.com/nicksnyder/test/milestone/1
15+
v2 is rewrite of the API from first principals to make it more idiomatic Go, and to resolve a backlog of issues: https://github.com/nicksnyder/go-i18n/milestone/1
1616

1717
### Improvements
1818

19-
- Use `golang.org/x/text/language` to get standardized behavior for language matching (https://github.com/nicksnyder/test/issues/30, https://github.com/nicksnyder/test/issues/44, https://github.com/nicksnyder/test/issues/76)
20-
- Remove global state so that the race detector does not complain when downstream projects run tests that depend on go-i18n in parallel (https://github.com/nicksnyder/test/issues/82)
21-
- Automatically extract messages from Go source code (https://github.com/nicksnyder/test/issues/64)
22-
- Provide clearer documentation and examples (https://github.com/nicksnyder/test/issues/27)
23-
- Reduce complexity of file format for simple translations (https://github.com/nicksnyder/test/issues/85)
24-
- Support descriptions for messages (https://github.com/nicksnyder/test/issues/8)
25-
- Support custom template delimiters (https://github.com/nicksnyder/test/issues/88)
19+
* Use `golang.org/x/text/language` to get standardized behavior for language matching (https://github.com/nicksnyder/go-i18n/issues/30, https://github.com/nicksnyder/go-i18n/issues/44, https://github.com/nicksnyder/go-i18n/issues/76)
20+
* Remove global state so that the race detector does not complain when downstream projects run tests that depend on go-i18n in parallel (https://github.com/nicksnyder/go-i18n/issues/82)
21+
* Automatically extract messages from Go source code (https://github.com/nicksnyder/go-i18n/issues/64)
22+
* Provide clearer documentation and examples (https://github.com/nicksnyder/go-i18n/issues/27)
23+
* Reduce complexity of file format for simple translations (https://github.com/nicksnyder/go-i18n/issues/85)
24+
* Support descriptions for messages (https://github.com/nicksnyder/go-i18n/issues/8)
25+
* Support custom template delimiters (https://github.com/nicksnyder/go-i18n/issues/88)
2626

2727
### Upgrading from v1
2828

2929
The i18n package in v2 is completely different than v1.
30-
Refer to the [documentation](https://godoc.org/github.com/nicksnyder/test/v2/i18n) and [README](https://github.com/nicksnyder/test/blob/master/README.md) for guidance.
30+
Refer to the [documentation](https://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n) and [README](https://github.com/nicksnyder/go-i18n/blob/master/README.md) for guidance.
3131

3232
The goi18n command has similarities and differences:
3333

34-
- `goi18n merge` has a new implementation but accomplishes the same task.
35-
- `goi18n extract` extracts messages from Go source files.
36-
- `goi18n constants` no longer exists. Prefer to extract messages directly from Go source files.
34+
* `goi18n merge` has a new implementation but accomplishes the same task.
35+
* `goi18n extract` extracts messages from Go source files.
36+
* `goi18n constants` no longer exists. Prefer to extract messages directly from Go source files.
3737

3838
v2 makes changes to the canonical message file format, but you can use v1 message files with v2. Message files will be converted to the new format the first time they are processed by the new `goi18n merge` command.
3939

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
# go-i18n [![Build Status](https://travis-ci.org/nicksnyder/test.svg?branch=master)](http://travis-ci.org/nicksnyder/test) [![Report card](https://goreportcard.com/badge/github.com/nicksnyder/test)](https://goreportcard.com/report/github.com/nicksnyder/test) [![Sourcegraph](https://sourcegraph.com/github.com/nicksnyder/test/-/badge.svg)](https://sourcegraph.com/github.com/nicksnyder/test?badge)
1+
# go-i18n [![Build Status](https://travis-ci.org/nicksnyder/go-i18n.svg?branch=master)](http://travis-ci.org/nicksnyder/go-i18n) [![Report card](https://goreportcard.com/badge/github.com/nicksnyder/go-i18n)](https://goreportcard.com/report/github.com/nicksnyder/go-i18n) [![Sourcegraph](https://sourcegraph.com/github.com/nicksnyder/go-i18n/-/badge.svg)](https://sourcegraph.com/github.com/nicksnyder/go-i18n?badge)
22

33
go-i18n is a Go [package](#package-i18n) and a [command](#command-goi18n) that helps you translate Go programs into multiple languages.
44

55
- Supports [pluralized strings](http://cldr.unicode.org/index/cldr-spec/plural-rules) for all 200+ languages in the [Unicode Common Locale Data Repository (CLDR)](http://www.unicode.org/cldr/charts/28/supplemental/language_plural_rules.html).
6-
- Code and tests are [automatically generated](https://github.com/nicksnyder/test/tree/master/i18n/language/codegen) from [CLDR data](http://cldr.unicode.org/index/downloads).
6+
- Code and tests are [automatically generated](https://github.com/nicksnyder/go-i18n/tree/master/i18n/language/codegen) from [CLDR data](http://cldr.unicode.org/index/downloads).
77
- Supports strings with named variables using [text/template](http://golang.org/pkg/text/template/) syntax.
88
- Supports message files of any format (e.g. JSON, TOML, YAML, etc.).
9-
- [Documented](http://godoc.org/github.com/nicksnyder/test) and [tested](https://travis-ci.org/nicksnyder/test)!
9+
- [Documented](http://godoc.org/github.com/nicksnyder/go-i18n) and [tested](https://travis-ci.org/nicksnyder/go-i18n)!
1010

11-
## Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/test?status.svg)](http://godoc.org/github.com/nicksnyder/test/v2/i18n)
11+
## Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n)
1212

1313
The i18n package provides support for looking up messages according to a set of locale preferences.
1414

1515
```go
16-
import "github.com/nicksnyder/test/v2/i18n"
16+
import "github.com/nicksnyder/go-i18n/v2/i18n"
1717
```
1818

1919
Create a Bundle to use for the lifetime of your application.
@@ -56,12 +56,12 @@ localizer.Localize(&i18n.LocalizeConfig{
5656
}) // Nick has 2 cats.
5757
```
5858

59-
## Command goi18n [![GoDoc](http://godoc.org/github.com/nicksnyder/test?status.svg)](http://godoc.org/github.com/nicksnyder/test/v2/goi18n)
59+
## Command goi18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/v2/goi18n)
6060

6161
The goi18n command manages message files used by the i18n package.
6262

6363
```
64-
go get -u github.com/nicksnyder/test/v2/goi18n
64+
go get -u github.com/nicksnyder/go-i18n/v2/goi18n
6565
goi18n -help
6666
```
6767

@@ -116,9 +116,9 @@ If you have added new messages to your program:
116116

117117
## For more information and examples:
118118

119-
- Read the [documentation](http://godoc.org/github.com/nicksnyder/test/v2/i18n).
120-
- Look at the [code examples](https://github.com/nicksnyder/test/blob/master/v2/i18n/example_test.go) and [tests](https://github.com/nicksnyder/test/blob/master/v2/i18n/localizer_test.go).
121-
- Look at an example [application](https://github.com/nicksnyder/test/tree/master/v2/example).
119+
- Read the [documentation](http://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n).
120+
- 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/v2/i18n/localizer_test.go).
121+
- Look at an example [application](https://github.com/nicksnyder/go-i18n/tree/master/v2/example).
122122

123123
## License
124124

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/nicksnyder/test
1+
module github.com/nicksnyder/go-i18n
22

33
require (
44
github.com/pelletier/go-toml v1.2.0

goi18n/constants_command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import (
1313
"text/template"
1414
"unicode"
1515

16-
"github.com/nicksnyder/test/i18n/bundle"
17-
"github.com/nicksnyder/test/i18n/language"
18-
"github.com/nicksnyder/test/i18n/translation"
16+
"github.com/nicksnyder/go-i18n/i18n/bundle"
17+
"github.com/nicksnyder/go-i18n/i18n/language"
18+
"github.com/nicksnyder/go-i18n/i18n/translation"
1919
)
2020

2121
type constantsCommand struct {

goi18n/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// The goi18n command formats and merges translation files.
22
//
3-
// go get -u github.com/nicksnyder/test/goi18n
3+
// go get -u github.com/nicksnyder/go-i18n/goi18n
44
// goi18n -help
55
//
66
// Help documentation:

goi18n/gendoc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
go install
22
echo "// The goi18n command formats and merges translation files." > doc.go
33
echo "//" >> doc.go
4-
echo "// go get -u github.com/nicksnyder/test/goi18n" >> doc.go
4+
echo "// go get -u github.com/nicksnyder/go-i18n/goi18n" >> doc.go
55
echo "// goi18n -help" >> doc.go
66
echo "//" >> doc.go
77
echo "// Help documentation:" >> doc.go

goi18n/merge_command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111

1212
"gopkg.in/yaml.v2"
1313

14-
"github.com/nicksnyder/test/i18n/bundle"
15-
"github.com/nicksnyder/test/i18n/language"
16-
"github.com/nicksnyder/test/i18n/translation"
14+
"github.com/nicksnyder/go-i18n/i18n/bundle"
15+
"github.com/nicksnyder/go-i18n/i18n/language"
16+
"github.com/nicksnyder/go-i18n/i18n/translation"
1717
toml "github.com/pelletier/go-toml"
1818
)
1919

i18n/bundle/bundle.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"sync"
1212
"unicode"
1313

14-
"github.com/nicksnyder/test/i18n/language"
15-
"github.com/nicksnyder/test/i18n/translation"
14+
"github.com/nicksnyder/go-i18n/i18n/language"
15+
"github.com/nicksnyder/go-i18n/i18n/translation"
1616
toml "github.com/pelletier/go-toml"
1717
"gopkg.in/yaml.v2"
1818
)

i18n/bundle/bundle_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"reflect"
1010
"sort"
1111

12-
"github.com/nicksnyder/test/i18n/language"
13-
"github.com/nicksnyder/test/i18n/translation"
12+
"github.com/nicksnyder/go-i18n/i18n/language"
13+
"github.com/nicksnyder/go-i18n/i18n/translation"
1414
)
1515

1616
func TestMustLoadTranslationFile(t *testing.T) {

i18n/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package i18n_test
33
import (
44
"fmt"
55

6-
"github.com/nicksnyder/test/i18n"
6+
"github.com/nicksnyder/go-i18n/i18n"
77
)
88

99
func Example() {

0 commit comments

Comments
 (0)