Change to dashboard/config/locales/en.yml

We have some local customizations we would like to make to /var/www/ood/apps/sys/dashboard/config/locales/en.yml, but we would rather not modify that file from it’s RPM original but, instead, just override the few text fields we would like to change.

Is that possible to do from /etc/ood/config/apps/dashboard? I tried putting en.yml there and putting it under /etc/ood/config/apps/dashboard/config/locales, but neither succeeded.

Here’s a short, tongue-in-cheek example of what we would like to override, if that helps any.

en:
  dashboard:
    welcome_html: |
      %{logo_img_tag}
      <p class="lead">OnDemand provides much grooviness.</p>

Thanks!

I think you may be able to do this just by changing the path you used.

Instead of /etc/ood/config/apps/dashboard/config/locales for the location of your en.custom.yml try /etc/ood/config/locales.

Be sure it’s /etc/ood/config/locales/en.yml. I think the filename is important, i.e., en is the English locale you’re using (as a pose to fr or de). I dont’ think it’d like en.custom.yml.

Yes, and super cool! Creating /etc/ood/config/locales/en.yml and putting in the override elements seems to work. I had to restart both apache and nginx, so if anyone else tries this and it doesn’t work, try that.

One last question related to this. There is an entry in the en.yml file for OnDemand 2,

shell_app_title: "%{cluster_title} Shell Access"

In which file in /etc/ood/config should that be set? The cluster_name.yml file? We have

v2:
  metadata:
    title: "greatlakes"

in ours, but that doesn’t seem to be right.

I hope that last made sense, and thanks, as always, for the great help!

I gave it a try on and it does look like you can name that file en.custom.yml and the overrides work in case any future users want to partition the overrides with various names. What is important is the yaml stanzas in the file itself so that it is applied correctly to the language and namespace.

As @bennet pointed out, a restart is needed as well so thanks for pointing that out!

For the #{cluster_title} you need the cluster config file in /etc/ood/config/clusters.d/ with the appropriate cluster name and .yml extension.

Then, add the cluster_name.yml under /etc/ood/config/clusters.d as well and this should pick up the title correctly.

Travis,

We have an /etc/ood/config/clusters.d/greatlakes.yml, and in it we have in it

v2:
  metadata:
    title: "greatlakes"

Is that what you meant? The above will set %{cluster_title} to ‘greatlakes’.

Or is there supposed to be an entry in that file that explicitly sets %{cluster_title}?

Sorry for the confusion.

I think that should work.

The main point is to have a file preferably with the cluster name in /etc/ood/config/clusters.d/ and the title inside of that file is what should get picked up by #{cluster_title}.

One note, I don’t think the name will be picked up without the login also being provided as well.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.