diff options
author | Frédéric Guillot <fred@miniflux.net> | 2017-12-16 11:25:18 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2017-12-16 11:25:18 -0800 |
commit | 27196589fbd36f5f840e51b59bd6253d0f865db3 (patch) | |
tree | 4896268c735528045e4064ace92a2a75280585b8 /vendor/golang.org/x/text/message/catalog.go | |
parent | 231ebf2daa9c024fbe99277f57935444946824bd (diff) |
Add FeedIcon API call and update dependencies
Diffstat (limited to 'vendor/golang.org/x/text/message/catalog.go')
-rw-r--r-- | vendor/golang.org/x/text/message/catalog.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/vendor/golang.org/x/text/message/catalog.go b/vendor/golang.org/x/text/message/catalog.go index 2f65b4b..068271d 100644 --- a/vendor/golang.org/x/text/message/catalog.go +++ b/vendor/golang.org/x/text/message/catalog.go @@ -12,10 +12,18 @@ import ( "golang.org/x/text/message/catalog" ) +// MatchLanguage reports the matched tag obtained from language.MatchStrings for +// the Matcher of the DefaultCatalog. +func MatchLanguage(preferred ...string) language.Tag { + c := DefaultCatalog + tag, _ := language.MatchStrings(c.Matcher(), preferred...) + return tag +} + // DefaultCatalog is used by SetString. -var DefaultCatalog *catalog.Catalog = defaultCatalog +var DefaultCatalog catalog.Catalog = defaultCatalog -var defaultCatalog = catalog.New() +var defaultCatalog = catalog.NewBuilder() // SetString calls SetString on the initial default Catalog. func SetString(tag language.Tag, key string, msg string) error { |