it looks like for the plugin i18n support, we will need to put some
metadata about models, column names and/or model namespace for plugins.
It looks like the best place would be planned feature - plugin metadata.
Therefore I would like to start conversation about what information
would you like to see in the plugin metadata.
So far, this comes to my mind:
Locale stuff (see above)
[throw in your ideas]
From the technical perspective, I am planning to crate a gem called
foreman_plugin_support that will have some i18n rake support tasks. I
can add the registry support there, so plugin devs are able to register
plugins in initializers.
Maybe it could be good idea to have the metadata in a easily parseable
format in the root of the git repositories (e.g. plugin_metadata.json)
and the initializer would load this from that file. That would allow us
to easily collect metadata via HTTP or from repositories.
Other option might be to collect metadata during Foreman Rails boot for
all available gems. I wonder if this is a bit slow (Rails boot is
already slow enough). In this case, there is no need of anything in the
support gem, but I would rather add a rake task for metadata
Does the engineer need to code this? This seems likke somehting which
rails engines should have solved already.
On 08/15/2013 06:31 AM, Lukas Zapletal wrote:
> it looks like for the plugin i18n support, we will need to put some
> metadata about models, column names and/or model namespace for plugins.
We may need plugin (engine) metadata, although I'm not sure if we need
metadata to support internationalization.
It would be pretty straightforward to support internationalization of
namespaced (not necessarily) isolated engines as we can easily lookup AR
models with a given namespace. A harder problem is to do the same for
non-namespaced engines. A possible approach could be to point
gettext_i18n_rails to the engine's model directory and subsequently produce
a list of engine's model classes by relying on Rails' naming conventions.
I don't think either/both would require a large effort to implement…
On Thu, Aug 15, 2013 at 3:34 PM, Lukas Zapletal wrote:
Does the engineer need to code this? This seems likke somehting
which rails engines should have solved already.
What you mean? Apparently it hasn’t been solved yet.