Skip to content

Commit a2ba22b

Browse files
committed
debian: fix fuzz in debian patch
The 0007-i18n-use-dummy-localizations-to-avoid-dependencies patch has some lines "fuzzy" when applied, and that makes fail at least one test (Tests / Package debian-sid-64 / build-deb). This patch fixes it.
1 parent c2e5074 commit a2ba22b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packaging/debian-sid/patches/0007-i18n-use-dummy-localizations-to-avoid-dependencies.patch

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
1717
2 files changed, 11 insertions(+), 201 deletions(-)
1818

1919
diff --git a/i18n/i18n.go b/i18n/i18n.go
20-
index 352e9a65d3..12885f7149 100644
20+
index 02a65905c5..92b19e1d59 100644
2121
--- a/i18n/i18n.go
2222
+++ b/i18n/i18n.go
2323
@@ -19,76 +19,11 @@
@@ -97,7 +97,7 @@ index 352e9a65d3..12885f7149 100644
9797
func simplifyLocale(loc string) string {
9898
// de_DE.UTF-8, de_DE@euro all need to get simplified
9999
loc = strings.Split(loc, "@")[0]
100-
@@ -106,30 +41,20 @@ func localeFromEnv() string {
100+
@@ -106,32 +41,22 @@ func localeFromEnv() string {
101101
return loc
102102
}
103103

@@ -134,6 +134,8 @@ index 352e9a65d3..12885f7149 100644
134134
+ return msgidPlural
135135
+ }
136136
}
137+
138+
func MockLocale(l gettext.Catalog) (restore func()) {
137139
diff --git a/i18n/i18n_test.go b/i18n/i18n_test.go
138140
index b8b0b1ea57..86b59f3b43 100644
139141
--- a/i18n/i18n_test.go
@@ -286,6 +288,3 @@ index b8b0b1ea57..86b59f3b43 100644
286288
+ c.Assert(NGtest("plural_1", "plural_2", 1), Equals, "plural_1")
287289
+ c.Assert(NGtest("plural_1", "plural_2", 2), Equals, "plural_2")
288290
}
289-
--
290-
2.31.1
291-

0 commit comments

Comments
 (0)