Closed xabbuh closed 10 years ago
I modified the config tree so that you're able to use the following forms to configure the resources:
locale with a list of message domains:
asm_translation_loader:
resources:
fr: [ foo, bar ]
locale with a single message domain (is converted into an one element array internally):
asm_translation_loader:
resources:
fr: foo
locale without a message domain (the resource is added with null
as the message domain which means that the default domain messages
is used):
asm_translation_loader:
resources:
fr: ~
That now means that we only need a few tests before this can be merged I guess.
Added tests, fixed some minor bugs, the Travis build passes.
This is a proposal to solve issue #6. The drawback of this solution is that you have to configure the locales and message domains handled by the
DatabaseLoader
in your app configuration.Another possible solution I can think of would be to extend the
Translator
service and use theDatabaseLoader
as some kind of fallback translator. Don't know if I like that better. Seems a bit hacky.