diff options
author | Nick Snyder <nickdsnyder@gmail.com> | 2019-05-11 00:23:14 +0300 |
---|---|---|
committer | Nick Snyder <nickdsnyder@gmail.com> | 2019-05-11 00:23:14 +0300 |
commit | b5ee509d2c808b19a8bdd0cd241fae0a69185980 (patch) | |
tree | d91cda28639309e4a30b9cc08c2591e374e98373 | |
parent | 6d605d058e31a71473af9699e17434e85568f659 (diff) |
change package
31 files changed, 73 insertions, 73 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d51c18..bc5aa12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Major version changes are documented in the changelog. -To see the documentation for minor or patch version, [view the release notes](https://github.com/nicksnyder/go-i18n/releases). +To see the documentation for minor or patch version, [view the release notes](https://github.com/nicksnyder/test/releases). ## v2 @@ -12,28 +12,28 @@ The first commit to this project was January 2012 (go1 had not yet been released This project has evolved with the Go ecosystem since then in a backwards compatible way, but there is a growing list of issues and warts that cannot be addressed without breaking compatiblity. -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 +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 ### Improvements -* 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) -* 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) -* Automatically extract messages from Go source code (https://github.com/nicksnyder/go-i18n/issues/64) -* Provide clearer documentation and examples (https://github.com/nicksnyder/go-i18n/issues/27) -* Reduce complexity of file format for simple translations (https://github.com/nicksnyder/go-i18n/issues/85) -* Support descriptions for messages (https://github.com/nicksnyder/go-i18n/issues/8) -* Support custom template delimiters (https://github.com/nicksnyder/go-i18n/issues/88) +- 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) +- 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) +- Automatically extract messages from Go source code (https://github.com/nicksnyder/test/issues/64) +- Provide clearer documentation and examples (https://github.com/nicksnyder/test/issues/27) +- Reduce complexity of file format for simple translations (https://github.com/nicksnyder/test/issues/85) +- Support descriptions for messages (https://github.com/nicksnyder/test/issues/8) +- Support custom template delimiters (https://github.com/nicksnyder/test/issues/88) ### 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://godoc.org/github.com/nicksnyder/test/v2/i18n) and [README](https://github.com/nicksnyder/test/blob/master/README.md) for guidance. The goi18n command has similarities and differences: -* `goi18n merge` has a new implementation but accomplishes the same task. -* `goi18n extract` extracts messages from Go source files. -* `goi18n constants` no longer exists. Prefer to extract messages directly from Go source files. +- `goi18n merge` has a new implementation but accomplishes the same task. +- `goi18n extract` extracts messages from Go source files. +- `goi18n constants` no longer exists. Prefer to extract messages directly from Go source files. 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. @@ -1,19 +1,19 @@ -# 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) +# 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) 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)](http://www.unicode.org/cldr/charts/28/supplemental/language_plural_rules.html). - - 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). + - 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). - 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, etc.). -- [Documented](http://godoc.org/github.com/nicksnyder/go-i18n) and [tested](https://travis-ci.org/nicksnyder/go-i18n)! +- [Documented](http://godoc.org/github.com/nicksnyder/test) and [tested](https://travis-ci.org/nicksnyder/test)! -## Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/go-i18n?status.svg)](http://godoc.org/github.com/nicksnyder/go-i18n/v2/i18n) +## Package i18n [![GoDoc](http://godoc.org/github.com/nicksnyder/test?status.svg)](http://godoc.org/github.com/nicksnyder/test/v2/i18n) The i18n package provides support for looking up messages according to a set of locale preferences. ```go -import "github.com/nicksnyder/go-i18n/v2/i18n" +import "github.com/nicksnyder/test/v2/i18n" ``` Create a Bundle to use for the lifetime of your application. @@ -56,12 +56,12 @@ 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/v2/goi18n) +## Command goi18n [![GoDoc](http://godoc.org/github.com/nicksnyder/test?status.svg)](http://godoc.org/github.com/nicksnyder/test/v2/goi18n) The goi18n command manages message files used by the i18n package. ``` -go get -u github.com/nicksnyder/go-i18n/v2/goi18n +go get -u github.com/nicksnyder/test/v2/goi18n goi18n -help ``` @@ -116,9 +116,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/v2/i18n). -- 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). -- Look at an example [application](https://github.com/nicksnyder/go-i18n/tree/master/v2/example). +- Read the [documentation](http://godoc.org/github.com/nicksnyder/test/v2/i18n). +- 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). +- Look at an example [application](https://github.com/nicksnyder/test/tree/master/v2/example). ## License @@ -1,4 +1,4 @@ -module github.com/nicksnyder/go-i18n +module github.com/nicksnyder/test require ( github.com/pelletier/go-toml v1.2.0 diff --git a/goi18n/constants_command.go b/goi18n/constants_command.go index d877add..05ec344 100644 --- a/goi18n/constants_command.go +++ b/goi18n/constants_command.go @@ -13,9 +13,9 @@ import ( "text/template" "unicode" - "github.com/nicksnyder/go-i18n/i18n/bundle" - "github.com/nicksnyder/go-i18n/i18n/language" - "github.com/nicksnyder/go-i18n/i18n/translation" + "github.com/nicksnyder/test/i18n/bundle" + "github.com/nicksnyder/test/i18n/language" + "github.com/nicksnyder/test/i18n/translation" ) type constantsCommand struct { diff --git a/goi18n/doc.go b/goi18n/doc.go index 97c7a7f..43c69da 100644 --- a/goi18n/doc.go +++ b/goi18n/doc.go @@ -1,6 +1,6 @@ // The goi18n command formats and merges translation files. // -// go get -u github.com/nicksnyder/go-i18n/goi18n +// go get -u github.com/nicksnyder/test/goi18n // goi18n -help // // Help documentation: diff --git a/goi18n/gendoc.sh b/goi18n/gendoc.sh index f30df34..84ee7cc 100644 --- a/goi18n/gendoc.sh +++ b/goi18n/gendoc.sh @@ -1,7 +1,7 @@ go install echo "// The goi18n command formats and merges translation files." > doc.go echo "//" >> doc.go -echo "// go get -u github.com/nicksnyder/go-i18n/goi18n" >> doc.go +echo "// go get -u github.com/nicksnyder/test/goi18n" >> doc.go echo "// goi18n -help" >> doc.go echo "//" >> doc.go echo "// Help documentation:" >> doc.go diff --git a/goi18n/merge_command.go b/goi18n/merge_command.go index 1b9d04f..f9adcaa 100644 --- a/goi18n/merge_command.go +++ b/goi18n/merge_command.go @@ -11,9 +11,9 @@ import ( "gopkg.in/yaml.v2" - "github.com/nicksnyder/go-i18n/i18n/bundle" - "github.com/nicksnyder/go-i18n/i18n/language" - "github.com/nicksnyder/go-i18n/i18n/translation" + "github.com/nicksnyder/test/i18n/bundle" + "github.com/nicksnyder/test/i18n/language" + "github.com/nicksnyder/test/i18n/translation" toml "github.com/pelletier/go-toml" ) diff --git a/i18n/bundle/bundle.go b/i18n/bundle/bundle.go index 6376146..797f39e 100644 --- a/i18n/bundle/bundle.go +++ b/i18n/bundle/bundle.go @@ -11,8 +11,8 @@ import ( "sync" "unicode" - "github.com/nicksnyder/go-i18n/i18n/language" - "github.com/nicksnyder/go-i18n/i18n/translation" + "github.com/nicksnyder/test/i18n/language" + "github.com/nicksnyder/test/i18n/translation" toml "github.com/pelletier/go-toml" "gopkg.in/yaml.v2" ) diff --git a/i18n/bundle/bundle_test.go b/i18n/bundle/bundle_test.go index da3830a..9c8848e 100644 --- a/i18n/bundle/bundle_test.go +++ b/i18n/bundle/bundle_test.go @@ -9,8 +9,8 @@ import ( "reflect" "sort" - "github.com/nicksnyder/go-i18n/i18n/language" - "github.com/nicksnyder/go-i18n/i18n/translation" + "github.com/nicksnyder/test/i18n/language" + "github.com/nicksnyder/test/i18n/translation" ) func TestMustLoadTranslationFile(t *testing.T) { diff --git a/i18n/example_test.go b/i18n/example_test.go index 305c5b3..a41f833 100644 --- a/i18n/example_test.go +++ b/i18n/example_test.go @@ -3,7 +3,7 @@ package i18n_test import ( "fmt" - "github.com/nicksnyder/go-i18n/i18n" + "github.com/nicksnyder/test/i18n" ) func Example() { diff --git a/i18n/exampletemplate_test.go b/i18n/exampletemplate_test.go index 3648bd1..bae86d9 100644 --- a/i18n/exampletemplate_test.go +++ b/i18n/exampletemplate_test.go @@ -4,7 +4,7 @@ import ( "os" "text/template" - "github.com/nicksnyder/go-i18n/i18n" + "github.com/nicksnyder/test/i18n" ) var funcMap = map[string]interface{}{ diff --git a/i18n/exampleyaml_test.go b/i18n/exampleyaml_test.go index a38dcfc..02f2647 100644 --- a/i18n/exampleyaml_test.go +++ b/i18n/exampleyaml_test.go @@ -3,7 +3,7 @@ package i18n_test import ( "fmt" - "github.com/nicksnyder/go-i18n/i18n" + "github.com/nicksnyder/test/i18n" ) func Example_yaml() { diff --git a/i18n/i18n.go b/i18n/i18n.go index c478ff6..856e1cc 100644 --- a/i18n/i18n.go +++ b/i18n/i18n.go @@ -56,9 +56,9 @@ package i18n import ( - "github.com/nicksnyder/go-i18n/i18n/bundle" - "github.com/nicksnyder/go-i18n/i18n/language" - "github.com/nicksnyder/go-i18n/i18n/translation" + "github.com/nicksnyder/test/i18n/bundle" + "github.com/nicksnyder/test/i18n/language" + "github.com/nicksnyder/test/i18n/translation" ) // TranslateFunc returns the translation of the string identified by translationID. diff --git a/i18n/translation/plural_translation.go b/i18n/translation/plural_translation.go index 17c3260..fa2855f 100644 --- a/i18n/translation/plural_translation.go +++ b/i18n/translation/plural_translation.go @@ -1,7 +1,7 @@ package translation import ( - "github.com/nicksnyder/go-i18n/i18n/language" + "github.com/nicksnyder/test/i18n/language" ) type pluralTranslation struct { diff --git a/i18n/translation/plural_translation_test.go b/i18n/translation/plural_translation_test.go index ea7de7f..188bd9b 100644 --- a/i18n/translation/plural_translation_test.go +++ b/i18n/translation/plural_translation_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/nicksnyder/go-i18n/i18n/language" + "github.com/nicksnyder/test/i18n/language" ) func mustTemplate(t *testing.T, src string) *template { diff --git a/i18n/translation/single_translation.go b/i18n/translation/single_translation.go index a76c8c9..949fdc9 100644 --- a/i18n/translation/single_translation.go +++ b/i18n/translation/single_translation.go @@ -1,7 +1,7 @@ package translation import ( - "github.com/nicksnyder/go-i18n/i18n/language" + "github.com/nicksnyder/test/i18n/language" ) type singleTranslation struct { diff --git a/i18n/translation/translation.go b/i18n/translation/translation.go index 93f87f6..aa38b12 100644 --- a/i18n/translation/translation.go +++ b/i18n/translation/translation.go @@ -4,7 +4,7 @@ package translation import ( "fmt" - "github.com/nicksnyder/go-i18n/i18n/language" + "github.com/nicksnyder/test/i18n/language" ) // Translation is the interface that represents a translated string. diff --git a/i18n/translations_test.go b/i18n/translations_test.go index ba1a21b..b859c59 100644 --- a/i18n/translations_test.go +++ b/i18n/translations_test.go @@ -3,7 +3,7 @@ package i18n import ( "testing" - "github.com/nicksnyder/go-i18n/i18n/bundle" + "github.com/nicksnyder/test/i18n/bundle" ) var bobMap = map[string]interface{}{"Person": "Bob"} diff --git a/v2/example/main.go b/v2/example/main.go index 838e145..b69f4af 100644 --- a/v2/example/main.go +++ b/v2/example/main.go @@ -9,7 +9,7 @@ import ( "strconv" "github.com/BurntSushi/toml" - "github.com/nicksnyder/go-i18n/v2/i18n" + "github.com/nicksnyder/test/v2/i18n" "golang.org/x/text/language" ) @@ -1,4 +1,4 @@ -module github.com/nicksnyder/go-i18n/v2 +module github.com/nicksnyder/test/v2 require ( github.com/BurntSushi/toml v0.3.0 diff --git a/v2/goi18n/extract_command.go b/v2/goi18n/extract_command.go index b7bee37..9e8e465 100644 --- a/v2/goi18n/extract_command.go +++ b/v2/goi18n/extract_command.go @@ -11,7 +11,7 @@ import ( "path/filepath" "strings" - "github.com/nicksnyder/go-i18n/v2/i18n" + "github.com/nicksnyder/test/v2/i18n" ) func usageExtract() { @@ -262,7 +262,7 @@ func extractStringLiteral(expr ast.Expr) (string, bool) { func i18nPackageName(file *ast.File) string { for _, i := range file.Imports { - if i.Path.Kind == token.STRING && i.Path.Value == `"github.com/nicksnyder/go-i18n/v2/i18n"` { + if i.Path.Kind == token.STRING && i.Path.Value == `"github.com/nicksnyder/test/v2/i18n"` { if i.Name == nil { return "i18n" } diff --git a/v2/goi18n/extract_command_test.go b/v2/goi18n/extract_command_test.go index 4aacafa..97f2138 100644 --- a/v2/goi18n/extract_command_test.go +++ b/v2/goi18n/extract_command_test.go @@ -26,7 +26,7 @@ func TestExtract(t *testing.T) { fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" var m = &i18n.Message{ ID: "Plural ID", @@ -38,7 +38,7 @@ func TestExtract(t *testing.T) { fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" var a = &i18n.Message{ ID: "a", @@ -58,7 +58,7 @@ b = "a \" b" fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" var a = []*i18n.Message{ { @@ -80,7 +80,7 @@ b = "b" fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" var a = map[string]*i18n.Message{ "a": { @@ -102,7 +102,7 @@ b = "b" fileName: "file_test.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" func main() { bundle := i18n.NewBundle(language.English) @@ -116,7 +116,7 @@ b = "b" fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" func main() { bundle := i18n.NewBundle(language.English) @@ -130,7 +130,7 @@ b = "b" fileName: "file.go", file: `package main - import bar "github.com/nicksnyder/go-i18n/v2/i18n" + import bar "github.com/nicksnyder/test/v2/i18n" func main() { _ := &bar.Message{ @@ -144,7 +144,7 @@ b = "b" fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" func main() { _ := &i18n.Message{ @@ -174,7 +174,7 @@ zero = "Zero translation" fileName: "file.go", file: `package main - import "github.com/nicksnyder/go-i18n/v2/i18n" + import "github.com/nicksnyder/test/v2/i18n" func main() { _ := &i18n.Message{ diff --git a/v2/goi18n/main.go b/v2/goi18n/main.go index 03e9240..61cece3 100644 --- a/v2/goi18n/main.go +++ b/v2/goi18n/main.go @@ -1,6 +1,6 @@ // Command goi18n manages message files used by the i18n package. // -// go get -u github.com/nicksnyder/go-i18n/v2/goi18n +// go get -u github.com/nicksnyder/test/v2/goi18n // goi18n -help // // Use `goi18n extract` to create a message file that contains the messages defined in your Go source files. diff --git a/v2/goi18n/marshal.go b/v2/goi18n/marshal.go index 751b698..6ab9bbb 100644 --- a/v2/goi18n/marshal.go +++ b/v2/goi18n/marshal.go @@ -7,8 +7,8 @@ import ( "path/filepath" "github.com/BurntSushi/toml" - "github.com/nicksnyder/go-i18n/v2/i18n" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/i18n" + "github.com/nicksnyder/test/v2/internal/plural" "golang.org/x/text/language" yaml "gopkg.in/yaml.v2" ) diff --git a/v2/goi18n/merge_command.go b/v2/goi18n/merge_command.go index 6e6041f..9e9dbe0 100644 --- a/v2/goi18n/merge_command.go +++ b/v2/goi18n/merge_command.go @@ -10,9 +10,9 @@ import ( "os" "github.com/BurntSushi/toml" - "github.com/nicksnyder/go-i18n/v2/i18n" - "github.com/nicksnyder/go-i18n/v2/internal" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/i18n" + "github.com/nicksnyder/test/v2/internal" + "github.com/nicksnyder/test/v2/internal/plural" "golang.org/x/text/language" yaml "gopkg.in/yaml.v2" ) diff --git a/v2/i18n/bundle.go b/v2/i18n/bundle.go index 62bcd43..9cd68f6 100644 --- a/v2/i18n/bundle.go +++ b/v2/i18n/bundle.go @@ -4,7 +4,7 @@ import ( "fmt" "io/ioutil" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/internal/plural" "golang.org/x/text/language" ) diff --git a/v2/i18n/example_test.go b/v2/i18n/example_test.go index 2256e63..149057c 100644 --- a/v2/i18n/example_test.go +++ b/v2/i18n/example_test.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/BurntSushi/toml" - "github.com/nicksnyder/go-i18n/v2/i18n" + "github.com/nicksnyder/test/v2/i18n" "golang.org/x/text/language" ) diff --git a/v2/i18n/localizer.go b/v2/i18n/localizer.go index 5d3b0df..609dd93 100644 --- a/v2/i18n/localizer.go +++ b/v2/i18n/localizer.go @@ -5,7 +5,7 @@ import ( "text/template" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/internal/plural" "golang.org/x/text/language" ) diff --git a/v2/i18n/localizer_test.go b/v2/i18n/localizer_test.go index d08e970..672bee0 100644 --- a/v2/i18n/localizer_test.go +++ b/v2/i18n/localizer_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/internal/plural" "golang.org/x/text/language" ) diff --git a/v2/i18n/message_template.go b/v2/i18n/message_template.go index 65a16cb..004b65d 100644 --- a/v2/i18n/message_template.go +++ b/v2/i18n/message_template.go @@ -6,8 +6,8 @@ import ( "text/template" - "github.com/nicksnyder/go-i18n/v2/internal" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/internal" + "github.com/nicksnyder/test/v2/internal/plural" ) // MessageTemplate is an executable template for a message. diff --git a/v2/i18n/message_template_test.go b/v2/i18n/message_template_test.go index d920cd4..a00741b 100644 --- a/v2/i18n/message_template_test.go +++ b/v2/i18n/message_template_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/nicksnyder/go-i18n/v2/internal/plural" + "github.com/nicksnyder/test/v2/internal/plural" ) func TestMessageTemplate(t *testing.T) { |