Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Use plain string if provided

Oliver Günther0de092b8586e
diff --git a/app/helpers/tabs_helper.rb b/app/helpers/tabs_helper.rb
index 4d63a41b02d..3361afa0e25 100644
--- a/app/helpers/tabs_helper.rb
+++ b/app/helpers/tabs_helper.rb
@@ -50,12 +50,20 @@ module TabsHelper
if feature && !EnterpriseToken.allows_to?(feature)
t.with_icon(icon: :"op-enterprise-addons", classes: "upsell-colored")
end
- t.with_text { I18n.t(tab[:label]) }
+ t.with_text { tab_label(tab) }
end
end
end
end
+ def tab_label(tab)
+ if tab[:label].is_a?(String)
+ tab[:label]
+ else
+ I18n.t(tab[:label])
+ end
+ end
+
def selected_tab(tabs)
tabs.detect { |t| t[:name].to_s == params[:tab].to_s } || tabs.first
end