diff --git a/obp-api/src/main/scala/code/snippet/Login.scala b/obp-api/src/main/scala/code/snippet/Login.scala
index 9fb6c9fe2..0ce1da97c 100644
--- a/obp-api/src/main/scala/code/snippet/Login.scala
+++ b/obp-api/src/main/scala/code/snippet/Login.scala
@@ -31,7 +31,6 @@ import code.api.OpenIdConnectConfig
import code.api.util.{APIUtil, CustomJsonFormats}
import code.model.dataAccess.{Admin, AuthUser}
import code.snippet.OpenidConnectInvoke.openIDConnect1IsNotSet
-import code.util.Helper
import net.liftweb.http.{S, SHtml}
import net.liftweb.util.Helpers._
import net.liftweb.util.CssSel
@@ -63,7 +62,6 @@ class Login {
if(AuthUser.loggedIn_?){
"*" #> NodeSeq.Empty
} else {
- "#logon *" #> scala.xml.Unparsed(Helper.i18n("logon", Some("Log on"))) &
".login [href]" #> AuthUser.loginPageURL &
".forgot [href]" #> {
val href = for {
diff --git a/obp-api/src/main/scala/code/snippet/WebUI.scala b/obp-api/src/main/scala/code/snippet/WebUI.scala
index 46d3e1690..2c4a0862a 100644
--- a/obp-api/src/main/scala/code/snippet/WebUI.scala
+++ b/obp-api/src/main/scala/code/snippet/WebUI.scala
@@ -35,7 +35,6 @@ import code.api.util.APIUtil.{activeBrand, getRemoteIpAddress, getServerUrl}
import code.api.util.ApiRole.CanReadGlossary
import code.api.util.{APIUtil, ApiRole, CustomJsonFormats, ErrorMessages, I18NUtil, PegdownOptions}
import code.model.dataAccess.AuthUser
-import code.util.Helper
import code.util.Helper.MdcLoggable
import net.liftweb.http.{LiftRules, S, SessionVar}
import net.liftweb.util.Helpers._
@@ -465,8 +464,7 @@ class WebUI extends MdcLoggable{
"@for-banks [style]" #> s"display: $displayForBanks"
}
def userIsLoggedIn: CssSel = {
- "#register-link [href]" #> scala.xml.Unparsed(s"/already-logged-in") &
- "#register-link *" #> scala.xml.Unparsed(Helper.i18n("register", Some("Register")))
+ "#register-link [href]" #> scala.xml.Unparsed(s"/already-logged-in")
}
def alreadyLoggedIn: CssSel = {
diff --git a/obp-api/src/main/scala/code/snippet/WebUiTranslation.scala b/obp-api/src/main/scala/code/snippet/WebUiTranslation.scala
deleted file mode 100644
index badcabb4a..000000000
--- a/obp-api/src/main/scala/code/snippet/WebUiTranslation.scala
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
-Open Bank Project - API
-Copyright (C) 2011-2019, TESOBE GmbH
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU Affero General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU Affero General Public License for more details.
-
-You should have received a copy of the GNU Affero General Public License
-along with this program. If not, see .
-
-Email: contact@tesobe.com
-TESOBE GmbH
-Osloerstrasse 16/17
-Berlin 13359, Germany
-
- This product includes software developed at
- TESOBE (http://www.tesobe.com/)
-
-
-*/
-
-package code.snippet
-
-import code.api.util.APIUtil
-import code.util.Helper
-import code.util.Helper.MdcLoggable
-import net.liftweb.http.S
-import net.liftweb.util.CssSel
-import net.liftweb.util.Helpers._
-
-
-class WebUiTranslation extends MdcLoggable {
-
- @transient protected val log = logger //Logger(this.getClass)
-
- def apiExplorer: CssSel = {
- "#api_explorer *" #> scala.xml.Unparsed(Helper.i18n("api_explorer", Some("API Explorer")))
- }
- def introduction: CssSel = {
- "#introduction *" #> scala.xml.Unparsed(Helper.i18n("introduction", Some("Introduction")))
- }
- def support: CssSel = {
- "#support *" #> scala.xml.Unparsed(Helper.i18n("support", Some("Support")))
- }
- def apiHost: CssSel = {
- "#api_host *" #> scala.xml.Unparsed(Helper.i18n("api_host", Some("This API Host")))
- }
- def openBankProjectIs: CssSel = {
- val year = APIUtil.currentYear
- val text = s"${Helper.i18n("open_bank_project_is", Some("Open Bank Project is ©2011 - "))} $year"
- "#open_bank_project_is *" #> scala.xml.Unparsed(text)
- }
- def andCommercialLicenses: CssSel = {
- "#and_commercial_licenses *" #> scala.xml.Unparsed(Helper.i18n("and_commercial_licenses", Some("TESOBE and distributed under the AGPL and commercial licenses. ")))
- }
- def termsConditions: CssSel = {
- "#terms_conditions *" #> scala.xml.Unparsed(Helper.i18n("terms_conditions", Some("Terms and Conditions")))
- }
- def privacyPolicy: CssSel = {
- "#privacy_policy *" #> scala.xml.Unparsed(Helper.i18n("privacy_policy", Some("Privacy Policy")))
- }
- def apiDocumentation: CssSel = {
- "#api_documentation *" #> scala.xml.Unparsed(Helper.i18n("api_documentation", Some("Privacy Policy")))
- }
- def register: CssSel = {
- "#register *" #> scala.xml.Unparsed(Helper.i18n("register", Some("Register")))
- }
-
-}
diff --git a/obp-api/src/main/scala/code/util/Helper.scala b/obp-api/src/main/scala/code/util/Helper.scala
index 881fd6329..562649bd4 100644
--- a/obp-api/src/main/scala/code/util/Helper.scala
+++ b/obp-api/src/main/scala/code/util/Helper.scala
@@ -381,8 +381,7 @@ object Helper{
}
def i18n(message: String, default: Option[String] = None): String = {
- val translatedMessage = S.?(message)
- if(translatedMessage==message) {
+ if(S.?(message)==message) {
val words = message.split('.').toList match {
case x :: Nil => Helpers.capify(x) :: Nil
case x :: xs => Helpers.capify(x) :: xs
@@ -390,7 +389,7 @@ object Helper{
}
default.getOrElse(words.mkString(" ") + ".")
}
- else translatedMessage
+ else S.?(message)
}
/**
diff --git a/obp-api/src/main/webapp/templates-hidden/default.html b/obp-api/src/main/webapp/templates-hidden/default.html
index de55eafaf..8ef1fb3ac 100644
--- a/obp-api/src/main/webapp/templates-hidden/default.html
+++ b/obp-api/src/main/webapp/templates-hidden/default.html
@@ -114,7 +114,7 @@ Berlin 13359, Germany
- API Explorer
+ API Explorer
@@ -122,12 +122,12 @@ Berlin 13359, Germany
- Introduction
+ Introduction
- Support
+ Support
@@ -136,7 +136,7 @@ Berlin 13359, Germany
- RegisterLog on
+ RegisterLog on
@@ -170,9 +170,7 @@ Berlin 13359, Germany
-
-
@@ -182,15 +180,13 @@ Berlin 13359, Germany
-
-
-
@@ -212,13 +208,11 @@ Berlin 13359, Germany
@@ -253,7 +244,7 @@ Berlin 13359, Germany
ES