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

Set language from I18n.locale

Oliver Günther8f17051fd006
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb
index 1ee5eb64101..5c02a12d2f9 100644
--- a/app/views/layouts/base.html.erb
+++ b/app/views/layouts/base.html.erb
@@ -50,8 +50,7 @@ See docs/COPYRIGHT.rdoc for more details.
<meta name="current_user"
data-name="<%= User.current.name %>"
data-mail="<%= User.current.mail %>"
- data-id="<%= User.current.id %>"
- data-lang="<%= User.current.language %>"/>
+ data-id="<%= User.current.id %>" />
<% end %>
<% if OpenProject::Configuration.frontend_sentry? %>
diff --git a/frontend/src/app/components/user/current-user.service.ts b/frontend/src/app/components/user/current-user.service.ts
index 4ac1831446b..e84bb265376 100644
--- a/frontend/src/app/components/user/current-user.service.ts
+++ b/frontend/src/app/components/user/current-user.service.ts
@@ -47,7 +47,7 @@ export class CurrentUserService {
}
public get language() {
- return this.userMeta.data('lang');
+ return I18n.locale || 'en';
}
private get userMeta():JQuery {