From 26532ab3bee811ec2e222f3d98c03fd3279b8401 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Feb 22 2019 21:29:32 +0000 Subject: Initial import (#1678682). --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..721b029 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/go-i18n-1.10.0.tar.gz diff --git a/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch b/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch new file mode 100644 index 0000000..db88019 --- /dev/null +++ b/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch @@ -0,0 +1,41 @@ +From dcabc04bafa409ece9c72bd55b1233fd01f7e06b Mon Sep 17 00:00:00 2001 +From: jcajka +Date: Mon, 5 Feb 2018 16:45:55 +0100 +Subject: [PATCH] Make tests pass with go1.10 avoiding following failures: + (#86) + +i18n/translations_test.go:66: Error call has possible formatting directive %v +FAIL _/root/go-i18n/i18n [build failed] +i18n/language/pluralspec_test.go:73: Errorf format %q has arg spec of wrong type *language.PluralSpec +FAIL _/root/go-i18n/i18n/language [build failed] +--- + i18n/language/pluralspec_test.go | 2 +- + i18n/translations_test.go | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/i18n/language/pluralspec_test.go b/i18n/language/pluralspec_test.go +index 51c1685..e31cfb7 100644 +--- a/i18n/language/pluralspec_test.go ++++ b/i18n/language/pluralspec_test.go +@@ -70,7 +70,7 @@ func TestGetPluralSpec(t *testing.T) { + for _, test := range tests { + spec := GetPluralSpec(test.src) + if spec != test.spec { +- t.Errorf("getPluralSpec(%q) = %q expected %q", test.src, spec, test.spec) ++ t.Errorf("getPluralSpec(%v) = %v expected %v", test.src, spec, test.spec) + } + } + } +diff --git a/i18n/translations_test.go b/i18n/translations_test.go +index 86c5808..ba1a21b 100644 +--- a/i18n/translations_test.go ++++ b/i18n/translations_test.go +@@ -63,7 +63,7 @@ func testFile(t *testing.T, path string) { + + got := T(tc.id, args...) + if got != tc.want { +- t.Error("got: %v; want: %v", got, tc.want) ++ t.Errorf("got: %v; want: %v", got, tc.want) + } + } + } diff --git a/golang-github-nicksnyder-i18n.spec b/golang-github-nicksnyder-i18n.spec new file mode 100644 index 0000000..aa00947 --- /dev/null +++ b/golang-github-nicksnyder-i18n.spec @@ -0,0 +1,52 @@ +%global goipath github.com/nicksnyder/go-i18n +Version: 1.10.0 + +%gometa + +Name: %{goname} +Release: 1%{?dist} +Summary: Translate your Go program into multiple languages +License: MIT +URL: %{gourl} +Source0: %{gosource} +Patch0001: https://github.com/nicksnyder/go-i18n/commit/dcabc04bafa409ece9c72bd55b1233fd01f7e06b.patch + +%description +%{summary} + + +%package devel +Summary: %{summary} +BuildArch: noarch + +BuildRequires: golang(github.com/pelletier/go-toml) +BuildRequires: golang(golang.org/x/text/language) +BuildRequires: golang(gopkg.in/yaml.v2) + +%description devel +%{summary} + +This package contains library source intended for building other packages which +use import path with %{goipath} prefix. + + +%prep +%forgeautosetup -p1 + + +%install +%goinstall + + +%check +%gochecks + + +%files devel -f devel.file-list +%doc README.md CHANGELOG +%license LICENSE + + +%changelog +* Tue Feb 19 2019 Elliott Sales de Andrade - 1.10.0-1 +- First package for Fedora diff --git a/sources b/sources new file mode 100644 index 0000000..e9ad265 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (go-i18n-1.10.0.tar.gz) = b9dd6f64066cd2184dcbd9d5795b8c7e8c296cb889bd264580bfc5981e9e11fe9b91189991c3c7a005c957bbe1ab1e8c8ef52a00fab24bd25d8056d467e41cae