wyona / yanel

http://www.yanel.org
Apache License 2.0
10 stars 5 forks source link

Realms should not conflict each other when using the same i18n keys or same i18n config file names #13

Open michaelwechner opened 12 years ago

michaelwechner commented 12 years ago

It seems that if two realms are using the same i18n file name, e.g. yanelrepo:/app/i18n.xml and the same keys, e.g.

but with different text/message, then it can create conflicts in the sense that both realms show the same text/message instead each realm shows its own text/message. Also it seems that if two different realms are using the same i18n file name, e.g. yanelrepo:/app/i18n.xml inside their realm configuration, but no keys are the same, then it seems that Yanel is overwriting the keys of the realm which is loaded first by the keys which is loaded second, which means we get error messages like for example WARN org.wyona.yanel.core.i18n.XMLMessageProvider.lookupText():86 - No such key: foobar ERROR org.wyona.yanel.core.transformation.I18nTransformer3.getMessage():215 - Cannot find message for key 'foobar' and locale 'de' I guess that Yanel somehow mixes these things up internally by not using the realm ID and making it unique. Need to dig a bit in order to better understand.