diff --git a/mf/bundle.go b/mf/bundle.go index ef507ba..702318b 100644 --- a/mf/bundle.go +++ b/mf/bundle.go @@ -83,7 +83,7 @@ func (b *bundle) LoadDir(dir fs.FS) error { return nil } - if path.Ext(f.Name()) != ".yaml" { + if path.Ext(f.Name()) != ".yaml" && path.Ext(f.Name()) != ".yml" { return nil } diff --git a/mf/bundle_test.go b/mf/bundle_test.go index 8dc7ffa..7eab3b0 100644 --- a/mf/bundle_test.go +++ b/mf/bundle_test.go @@ -125,9 +125,11 @@ func TestBundle_LoadDir(t *testing.T) { require.NoError(t, b.LoadDir(fstest.MapFS{ "messages.en.yaml": {Data: []byte("foo: bar")}, "messages.es.yaml": {Data: []byte("foo: bar")}, + "messages.ru.yml": {Data: []byte("foo: bar")}, }), "no error on normal yaml files") assert.NotNil(t, b.dictionaries[language.English]) assert.NotNil(t, b.dictionaries[language.Spanish]) + assert.NotNil(t, b.dictionaries[language.Russian]) } func TestBundle_Translator(t *testing.T) {