phraser: move the fallbacks onto the deck (V-502)
This commit is contained in:
@@ -13,16 +13,7 @@ import (
|
||||
// fallbacks_ru_v1.json break Go tests, which is the coupling this file removed.
|
||||
func isFallback(t *testing.T, key, sources, got string) bool {
|
||||
t.Helper()
|
||||
e, ok := DefaultFallbacks().file.Entries[key]
|
||||
if !ok {
|
||||
t.Fatalf("no fallback entry %q", key)
|
||||
}
|
||||
for _, v := range e.Variants {
|
||||
if strings.ReplaceAll(v, "{sources}", sources) == got {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
return DefaultFallbacks().deck().matches(key, map[string]string{"sources": sources}, got)
|
||||
}
|
||||
|
||||
// A dead server must be distinguishable from bad phrasing. Both PhraseChat and
|
||||
|
||||
Reference in New Issue
Block a user