Hey guys, I've been working on a KeyValue backend for I18n. The implementation is quite straightforward and works with different data stores (as TokyoCabinet and Redis). Most of the base work was already ported to the I18n master branch but before merging the KeyValue backend, I need to make all tests pass. Currently, there is just one test failing: http://github.com/svenfuchs/i18n/blob/master/test/... The test fails because it's finding the absolute key instead of the relative. I could make it pass but there are two issues: 1) The current test does not make sense at all to me. If the test pass, it means that the following expression evaluates to *false*: I18n.t("foo.link") == I18n.t("link", :scope => :foo) 2) The behavior described in the test (to give preference to relative key) makes impossible to link to the absolute key if I have a key with the same name in the relative scope In my opinion, we should observe exactly the opposite behavior: it should always reference to the absolute key. So, what do you guys think? Does anyone actually have a use case for the *current* behavior?
on 2010-04-28 21:25
on 2010-04-29 19:19
Hi, I don't use links in translations at all. I think your reasons to change it are reason enough to change it. I18n is a tricky library to understand, so consistency should a be very important goal. Iain
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.