Skip to content

Commit

Permalink
Remove v2 directory (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksnyder authored Jan 31, 2024
1 parent 62e3978 commit f0cd8fa
Show file tree
Hide file tree
Showing 59 changed files with 19 additions and 25 deletions.
14 changes: 7 additions & 7 deletions .github/README.zh-Hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go-i18n 是一个帮助您将 Go 程序翻译成多种语言的 Go [包](#packag

- 支持 [Unicode Common Locale Data Repository (CLDR)](https://www.unicode.org/cldr/charts/28/supplemental/language_plural_rules.html)
中所有 200 多种语言的[复数字符串](http://cldr.unicode.org/index/cldr-spec/plural-rules)
- 代码和测试是基于 [CLDR 数据](http://cldr.unicode.org/index/downloads)[自动生成](https://github.com/nicksnyder/go-i18n/tree/main/v2/internal/plural/codegen)的。
- 代码和测试是基于 [CLDR 数据](http://cldr.unicode.org/index/downloads)[自动生成](https://github.com/nicksnyder/go-i18n/tree/main/internal/plural/codegen)的。
- 使用 [text/template](http://golang.org/pkg/text/template/) 语法支持带有命名变量的字符串。
- 支持所有格式的消息文件(例如:JSON、TOML、YAML)。

Expand All @@ -18,7 +18,7 @@ go-i18n 是一个帮助您将 Go 程序翻译成多种语言的 Go [包](#packag

## i18n 包

[![GoDoc](https://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](https://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n)
[![GoDoc](https://pkg.go.dev/github.com/nicksnyder/go-i18n?status.svg)](https://pkg.go.dev/github.com/nicksnyder/go-i18n/v2/i18n)

i18n 包支持根据一组语言环境首选项来查找消息。

Expand Down Expand Up @@ -77,7 +77,7 @@ localizer.Localize(&i18n.LocalizeConfig{

## goi18n 命令

[![GoDoc](https://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](https://godoc.org/github.com/nicksnyder/go-i18n/v2/goi18n)
[![GoDoc](https://pkg.go.dev/github.com/nicksnyder/go-i18n?status.svg)](https://pkg.go.dev/github.com/nicksnyder/go-i18n/v2/goi18n)

goi18n 命令管理 i18n 包所使用的消息文件。

Expand Down Expand Up @@ -138,10 +138,10 @@ other = "{{.Name}} has {{.Count}} cats."

## 进一步的信息和示例:

- 阅读[文档](https://godoc.org/github.com/nicksnyder/go-i18n/v2)。
- 查看[代码示例](https://github.com/nicksnyder/go-i18n/blob/main/v2/i18n/example_test.go)和
[测试](https://github.com/nicksnyder/go-i18n/blob/main/v2/i18n/localizer_test.go)。
- 查看示例[程序](https://github.com/nicksnyder/go-i18n/tree/main/v2/example)。
- 阅读[文档](https://pkg.go.dev/github.com/nicksnyder/go-i18n/v2)。
- 查看[代码示例](https://github.com/nicksnyder/go-i18n/blob/main/i18n/example_test.go)和
[测试](https://github.com/nicksnyder/go-i18n/blob/main/i18n/localizer_test.go)。
- 查看示例[程序](https://github.com/nicksnyder/go-i18n/tree/main/example)。

## 许可证

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ jobs:
with:
version: latest
args: release --rm-dist --snapshot
workdir: v2
- name: Test
working-directory: v2
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v3
Expand All @@ -37,7 +35,6 @@ jobs:
- name: Git checkout
uses: actions/checkout@v3
- name: Build and test
working-directory: v2
run: |
go get ./...
go test -race ./...
1 change: 0 additions & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
working-directory: v2
1 change: 0 additions & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
with:
version: latest
args: release --rm-dist
workdir: v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

3 changes: 1 addition & 2 deletions .github/workflows/lsif-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
- uses: actions/checkout@v1
- name: Generate LSIF data
run: lsif-go
working-directory: v2
- name: Upload LSIF data to Sourcegraph.com
run: src lsif upload -github-token=${{ secrets.GITHUB_TOKEN }} -ignore-upload-failure
working-directory: v2

8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ output/
*.test
*.swp

v2/example/example
v2/goi18n/goi18n
v2/dist/
v2/coverage.txt
example/example
goi18n/goi18n
dist/
coverage.txt
File renamed without changes.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ v2 is rewrite of the API from first principals to make it more idiomatic Go, and
### Upgrading from v1

The i18n package in v2 is completely different than v1.
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.
Refer to the [documentation](https://pkg.go.dev/github.com/nicksnyder/go-i18n/v2/i18n) and [README](https://github.com/nicksnyder/go-i18n/blob/master/README.md) for guidance.

The goi18n command has similarities and differences:

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
go-i18n is a Go [package](#package-i18n) and a [command](#command-goi18n) that helps you translate Go programs into multiple languages.

- Supports [pluralized strings](http://cldr.unicode.org/index/cldr-spec/plural-rules) for all 200+ languages in the [Unicode Common Locale Data Repository (CLDR)](https://www.unicode.org/cldr/charts/28/supplemental/language_plural_rules.html).
- Code and tests are [automatically generated](https://github.com/nicksnyder/go-i18n/tree/main/v2/internal/plural/codegen) from [CLDR data](http://cldr.unicode.org/index/downloads).
- Code and tests are [automatically generated](https://github.com/nicksnyder/go-i18n/tree/main/internal/plural/codegen) from [CLDR data](http://cldr.unicode.org/index/downloads).
- 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).

Expand All @@ -16,7 +16,7 @@ go-i18n is a Go [package](#package-i18n) and a [command](#command-goi18n) that h
</strong>

## Package i18n
[![GoDoc](https://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](https://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n)
[![GoDoc](https://pkg.go.dev/github.com/nicksnyder/go-i18n?status.svg)](https://pkg.go.dev/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 @@ -74,7 +74,7 @@ localizer.Localize(&i18n.LocalizeConfig{
```

## Command goi18n
[![GoDoc](https://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](https://godoc.org/github.com/nicksnyder/go-i18n/v2/goi18n)
[![GoDoc](https://pkg.go.dev/github.com/nicksnyder/go-i18n?status.svg)](https://pkg.go.dev/github.com/nicksnyder/go-i18n/v2/goi18n)

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

Expand Down Expand Up @@ -134,9 +134,9 @@ If you have added new messages to your program:

## For more information and examples:

- Read the [documentation](https://godoc.org/github.com/nicksnyder/go-i18n/v2).
- Look at the [code examples](https://github.com/nicksnyder/go-i18n/blob/main/v2/i18n/example_test.go) and [tests](https://github.com/nicksnyder/go-i18n/blob/main/v2/i18n/localizer_test.go).
- Look at an example [application](https://github.com/nicksnyder/go-i18n/tree/main/v2/example).
- Read the [documentation](https://pkg.go.dev/github.com/nicksnyder/go-i18n/v2).
- Look at the [code examples](https://github.com/nicksnyder/go-i18n/blob/main/i18n/example_test.go) and [tests](https://github.com/nicksnyder/go-i18n/blob/main/i18n/localizer_test.go).
- Look at an example [application](https://github.com/nicksnyder/go-i18n/tree/main/example).

## License

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

0 comments on commit f0cd8fa

Please sign in to comment.