Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gettext catalog to ManageIQ::Providers::Amazon plugin #28

Conversation

mzazrivec
Copy link
Contributor

Changes:

  • added a gettext catalog to the ManageIQ::Providers::Amazon provider plugin. The catalog was
    generated automatically by invoking the following rake task in the ManageIQ git checkout:
    rake locale:plugin:find[ManageIQ::Providers::Amazon]
  • The ManageIQ::Providers::Amazon plugin now registers its own catalog with the main ManageIQ
    rails app. This way the provider plugin makes the fast_gettext engine aware of the plugin's gettext catalog.

@durandom
Copy link
Member

@mzazrivec can we do without the colon : in the filename? It was that on osx that it wouldnt be allowed, although that is no more

@@ -3,6 +3,12 @@ module Providers
module Amazon
class Engine < ::Rails::Engine
isolate_namespace ManageIQ::Providers::Amazon

config.to_prepare do
Vmdb::Gettext::Domains.add_domain('ManageIQ::Providers::Amazon',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to an initializer?

@mzazrivec
Copy link
Contributor Author

mzazrivec commented Aug 16, 2016

@durandom You mean the file names like ManageIQ::Providers::Amazon.pot ?

Yes, when we create the catalog, we can replace :: with for example _. If this is an issue, I can
change that, though I have to change the rake task in the main ManageIQ git first.

@mzazrivec mzazrivec force-pushed the add_gettext_catalog_to_manageiq_providers_amazon branch from 5dd6032 to 1bf5b95 Compare August 16, 2016 14:54
@durandom
Copy link
Member

In case we already have colons in files on miq side, its ok.
But in case not, I would try to avoid them, I think on windows they are still not allowed
Maybe with underscore or tableize inflections?

@mzazrivec
Copy link
Contributor Author

mzazrivec commented Aug 16, 2016

@durandom We don't have :: in files in ManageIQ. I can change things to create file names
with underscores, rather than :: (will do that change in ManageIQ git).

I also moved the initialization code into initializer (gettext.rb) as you suggested.

@mzazrivec mzazrivec changed the title Add gettext catalog to ManageIQ::Providers::Amazon plugin [WIP] Add gettext catalog to ManageIQ::Providers::Amazon plugin Aug 16, 2016
…lugin

The catalog was generated automatically by invoking the following rake
task in the ManageIQ git checkout:

    rake locale:plugin:find[ManageIQ::Providers::Amazon]
This way the provider plugin makes the fast_gettext engine aware
of the plugin's gettext catalog.
@mzazrivec mzazrivec force-pushed the add_gettext_catalog_to_manageiq_providers_amazon branch from 1bf5b95 to df89a26 Compare August 30, 2016 13:00
@mzazrivec mzazrivec changed the title [WIP] Add gettext catalog to ManageIQ::Providers::Amazon plugin Add gettext catalog to ManageIQ::Providers::Amazon plugin Aug 30, 2016
@mzazrivec
Copy link
Contributor Author

@durandom I fixed both the thing with initialization and the file paths.

@miq-bot
Copy link
Member

miq-bot commented Aug 30, 2016

Checked commits mzazrivec/manageiq-providers-amazon@4de7a0f~...df89a26 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
1 file checked, 2 offenses detected

config/initializers/gettext.rb

@durandom durandom merged commit 87bcab1 into ManageIQ:master Aug 30, 2016
@mzazrivec mzazrivec deleted the add_gettext_catalog_to_manageiq_providers_amazon branch August 31, 2016 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants