i18n for buildpacks

48 views
Skip to first unread message

Brian DePradine

unread,
Sep 15, 2014, 5:03:32 PM9/15/14
to vcap...@cloudfoundry.org
Hi,

I have been looking at how we can support for i18n to the Liberty buildpack, based on the i18n gem, and one issue I hit is making the gem available for use by the buildpack. I added the gem to our gemfile, but it appears that file is not used when the buildpack is invoked. I noticed that that the cloud_contoller_ng component also uses the i18n gem for adding this support so I expect that it must be possible to use it within cloud foundry. What would be the best way to make thei18n gem available to buildpacks that need to make use of it?

Brian

邢舟

unread,
Sep 16, 2014, 12:32:33 AM9/16/14
to vcap...@cloudfoundry.org
Hi Brian,

    Now the Cloud Controller is using ruby-i18n to support internationalization, and also there is an PR at present to support some composite message in CC. You can take it as an example, I wonder what detail scenario you want to use i18n in build pack?

Tom, IBM CDL


--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/2bbd0574-30fe-4a29-bae5-ffe359329180%40cloudfoundry.org.

To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.

Brian DePradine

unread,
Sep 16, 2014, 8:34:14 AM9/16/14
to vcap...@cloudfoundry.org
Hi Tom,

We would like to move all of our messages into separate message files that could be easily translated. This effort is currently based on the i18n gem, however, when I add this to the buildpack I get the following error during staging:

2014-09-16T13:30:02.77+0100 [API]     OUT Created app with guid c105ce75-d3d1-42bf-9166-6f4510c09a78
2014-09-16T13:30:04.79+0100 [API]     OUT Updated app with guid c105ce75-d3d1-42bf-9166-6f4510c09a78 ({"route"=>"9fdb26f3-8b90-418e-8b58-92f98d5dad38"})
2014-09-16T13:30:16.60+0100 [DEA]     OUT Got staging request for app with id c105ce75-d3d1-42bf-9166-6f4510c09a78
2014-09-16T13:30:17.86+0100 [API]     OUT Updated app with guid c105ce75-d3d1-42bf-9166-6f4510c09a78 ({"state"=>"STARTED"})
2014-09-16T13:30:18.11+0100 [STG]     OUT -----> Downloaded app package (8.0K)
2014-09-16T13:30:18.21+0100 [STG]     ERR     Cloning into '/tmp/buildpacks/ibm-websphere-liberty-buildpack'...
2014-09-16T13:30:20.09+0100 [STG]     ERR /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- i18n (LoadError)
2014-09-16T13:30:20.09+0100 [STG]     ERR       from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
...

Brian

Ben Hale

unread,
Sep 17, 2014, 3:54:10 AM9/17/14
to vcap...@cloudfoundry.org
Brian,

You'll notice that the buildpack has no (runtime) dependencies whatsoever.  This isn't a stylistic choice, but one driven by the difficulty in getting bundler run as part of the buildpack lifecycle.  After the recent meetings I had with the IBM team working in the IBM Hursley labs, I was under the impression that the Java Buildpack would be providing a built-in i18n mechanism that could be used by both it and downstream forks.  At this level i18n isn't difficult to implement directly (no gem) which would solve the problem.  That offer is still open, we just haven't gotten any further communication about priority or requirements and so haven't progressed with the work.


-Ben Hale
Cloud Foundry Java Experience

Brian DePradine

unread,
Sep 17, 2014, 1:01:50 PM9/17/14
to vcap...@cloudfoundry.org
Hi Ben,

Thanks for the response. I appreciate the desire to not have runtime dependencies in the buildpack, and I was wandering originally if it might be possible to modify the ruby environment to include the i18n gem during the setup of the DEA instance, in order to avoid such dependencies. That being said, if it may be easier to simply implement the support within the buildpack itself then that may be the way to go.

Brian

Brian DePradine

unread,
Sep 18, 2014, 10:41:04 AM9/18/14
to vcap...@cloudfoundry.org
Hi Ben,

Is there a work item covering the work to implement i18n support in the java buildpack?

Brian

Ben Hale

unread,
Sep 22, 2014, 6:57:18 AM9/22/14
to vcap...@cloudfoundry.org
Brian,

There isn't yet, but I'm happy to work closely with you to get into done.  Why don't you open an issue in the Java Buildpack repo and we'll start design discussions there.


-Ben Hale
Cloud Foundry Java Experience

Brian DePradine

unread,
Sep 23, 2014, 8:09:13 AM9/23/14
to vcap...@cloudfoundry.org
Thanks Ben,

I have open the following issue to track this, https://github.com/cloudfoundry/java-buildpack/issues/100

Brian


On Monday, September 22, 2014 11:57:18 AM UTC+1, Ben Hale wrote:
Brian,

Reply all
Reply to author
Forward
0 new messages