Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move code to v2 subfolder for greater compatibility #187

Merged
merged 5 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ output/
*.test
*.swp

example/example
goi18n/goi18n
v2/example/example
v2/goi18n/goi18n

dist/
v2/dist/
6 changes: 3 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# https://github.com/golangci/golangci/wiki/Configuration

service:
prepare:
- go get -t ./...
# service:
# prepare:
# - go get -t ./...
linters:
enable:
- gofmt
7 changes: 2 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ 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)

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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/`
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.