-
Notifications
You must be signed in to change notification settings - Fork 357
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
page_title - don't require leading ": " in @page_title #3965
Conversation
updates productized_title to join the provided title with ": " automatically so that we don't have to randomly `@page_title = ": #{_('Migration')}"` in v2v
Checked commits https://github.com/himdel/manageiq-ui-classic/compare/dd61f523966f62a871c0dc34ae135f5f770b16c8~...ebce29876f7b72926cc3517214d04db00abba84f with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@@ -1,119 +1,122 @@ | |||
module ApplicationHelper | |||
module Title | |||
def productized_title(title) | |||
product_title + title | |||
if title.present? | |||
"%{product}: %{title}" % {:product => product_title, :title => title} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to i18n this string (the :
basically), @mzazrivec ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say no for now. We can fix this later, should that be a problem in some locales.
@mzazrivec : are we getting updated translations for the Gaprindashvili releases? If not, we will need for this one. |
page_title - don't require leading ": " in @page_title (cherry picked from commit 7eafd55)
Gaprindashvili backport details:
|
Setting
@page_title
is a mechanism to provide custom<title>
value.For most of ops ui, this is computed from the current
@layout
, but that is not really pluggable and does not make sense for plugins.So, we have
@page_title
and end up doingproduct_title + title
- and calling it asproductized_title(_(": Login"))
.This updates
productized_title
to join the provided title with ": " automatically - so that we don't have to randomly@page_title = ": #{_('Migration')}"
in v2v.Instead, the line will be
@page_title = _('Migration')
.#3963: gaprindashvili yes because we need this for v2v to be able to use manageiq layouts instead of creating its own
Cc @mzazrivec , @martinpovolny