PolymerElements / app-localize-behavior

Polymer behaviour to help internationalize your application
48 stars 55 forks source link

Missing string when no locale in the resources #123

Open a-katsarov opened 6 years ago

a-katsarov commented 6 years ago

Description

When trying to translate a string of a locale that is missing in the resources it returns no string even if useKeyIfMissing is used. For example, if we set the language to bg and the resources contains {"en":{},"fr":{}} it returns no string.

Expected outcome

The translation key if useKeyIfMissing is set to true

Actual outcome

undefined/no string

Steps to reproduce

  1. Check your resources for supported locales
  2. Set the language to some locale that is not in the resources
  3. The result will be undefined

Browsers Affected

All