From f95ce7a5fe9d492eb6f8d165d149d2af994dda89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Fri, 24 Sep 2021 19:20:15 +0200 Subject: [PATCH 01/16] feature/Bump Lift version to 3.4.1 and Scala to 2.12.10 --- pom.xml | 44 ++------------------- src/main/scala/bootstrap/liftweb/Boot.scala | 6 +-- src/main/scala/code/lib/ObpAPI.scala | 4 +- src/main/scala/code/snippet/Comments.scala | 4 +- 4 files changed, 9 insertions(+), 49 deletions(-) diff --git a/pom.xml b/pom.xml index 7ef1116a..9f5ccff8 100644 --- a/pom.xml +++ b/pom.xml @@ -11,9 +11,9 @@ Social Finance 2011 - 2.11 - 2.11.8 - 2.6.3 + 2.12 + 2.12.10 + 3.4.1 9.4.12.v20180830 UTF-8 @@ -61,26 +61,6 @@ lift-mapper_${scala.version} ${lift.version} - - net.liftmodules - widgets_2.6_${scala.version} - 1.4-SNAPSHOT - - - net.databinder - dispatch-http_${scala.version} - 0.8.10 - - - net.databinder - dispatch-oauth_${scala.version} - 0.8.10 - - - net.databinder.dispatch - dispatch-lift-json_${scala.version} - 0.11.3 - javax.servlet javax.servlet-api @@ -96,7 +76,7 @@ org.scalatest scalatest_${scala.version} - 2.2.6 + 3.0.8 test @@ -341,20 +321,4 @@ - - - - org.scala-tools - maven-scala-plugin - 3.2.2 - - ${project.build.sourceEncoding} - - -Xmx1024m - -DpackageLinkDefs=file://${project.build.directory}/packageLinkDefs.properties - - - - - diff --git a/src/main/scala/bootstrap/liftweb/Boot.scala b/src/main/scala/bootstrap/liftweb/Boot.scala index ab19b89f..fce796a5 100755 --- a/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/src/main/scala/bootstrap/liftweb/Boot.scala @@ -35,12 +35,10 @@ import java.io.{File, FileInputStream} import code.Constant._ import code.lib.ObpJson._ -import code.lib.{OAuthClient, ObpAPI, ObpGet, ObpJson} +import code.lib.{OAuthClient, ObpAPI, ObpGet} import code.snippet._ import code.util.Helper.MdcLoggable import code.util.{Helper, MyExceptionLogger} -import net.liftmodules.widgets.tablesorter.TableSorter -import net.liftweb._ import net.liftweb.common._ import net.liftweb.http._ import net.liftweb.sitemap.Loc._ @@ -455,8 +453,6 @@ class Boot extends MdcLoggable{ LiftRules.explicitlyParsedSuffixes = Helpers.knownSuffixes &~ (Set("com")) - TableSorter.init - LiftRules.exceptionHandler.prepend{ case MyExceptionLogger(_, _, t) => throw t // this will never happen } diff --git a/src/main/scala/code/lib/ObpAPI.scala b/src/main/scala/code/lib/ObpAPI.scala index 0b42904f..c435db0a 100644 --- a/src/main/scala/code/lib/ObpAPI.scala +++ b/src/main/scala/code/lib/ObpAPI.scala @@ -329,7 +329,7 @@ object OBPRequest extends MdcLoggable { if(jsonBody.isDefined) { val output = request.getOutputStream() val writer = new BufferedWriter(new OutputStreamWriter(output, "UTF-8")) - writer.write(compact(render(jsonBody.get)).toString) + writer.write(compactRender(jsonBody.get)) writer.flush() writer.close() } @@ -391,7 +391,7 @@ object OBPInternalRequest extends MdcLoggable { //Set the request body if(jsonBody.isDefined) { val output = request.getOutputStream() - val body = compact(render(jsonBody.get)).getBytes() + val body = compactRender(jsonBody.get).getBytes() output.write(body) output.flush() output.close() diff --git a/src/main/scala/code/snippet/Comments.scala b/src/main/scala/code/snippet/Comments.scala index 9ea60e6d..826bd25e 100644 --- a/src/main/scala/code/snippet/Comments.scala +++ b/src/main/scala/code/snippet/Comments.scala @@ -263,7 +263,7 @@ class Comments(params : (TransactionJson, AccountJson, CommentsURLParams)) exten ) ) ~ ("template_id" -> addImageTemplate) - compact(render(json)).toString + compactRender(json) //Utility.escape(compact(render(json)), new StringBuilder).toString } @@ -272,7 +272,7 @@ class Comments(params : (TransactionJson, AccountJson, CommentsURLParams)) exten val addedImage = for { transloadit <- S.param("transloadit") ?~! "No transloadit data received" json <- tryo{parse(transloadit)} ?~! "Could not parse transloadit data as json" - imageUrl <- tryo{val JString(a) = json \ "results" \\ "ssl_url"; a} ?~! {"Could not extract url string from json: " + compact(render(json))} + imageUrl <- tryo{val JString(a) = json \ "results" \ "ssl_url"; a} ?~! {"Could not extract url string from json: " + compactRender(json)} addedImage <- ObpAPI.addImage(urlParams.bankId, urlParams.accountId, urlParams.viewId, urlParams.transactionId, imageUrl, description) } yield addedImage From 04b06e139d088a4eacd9d849663ca4a9d67ca8fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 27 Sep 2021 10:27:44 +0200 Subject: [PATCH 02/16] feature/Enable Sofit basic screens for i18n --- src/main/resources/i18n/lift-core.properties | 375 ++++++++++++++++++ .../resources/i18n/lift-core_it.properties | 367 +++++++++++++++++ src/main/scala/bootstrap/liftweb/Boot.scala | 13 + .../scala/code/snippet/AccountsOverview.scala | 10 +- src/main/webapp/index.html | 10 +- src/main/webapp/templates-hidden/default.html | 10 +- 6 files changed, 771 insertions(+), 14 deletions(-) create mode 100644 src/main/resources/i18n/lift-core.properties create mode 100644 src/main/resources/i18n/lift-core_it.properties diff --git a/src/main/resources/i18n/lift-core.properties b/src/main/resources/i18n/lift-core.properties new file mode 100644 index 00000000..39e46f15 --- /dev/null +++ b/src/main/resources/i18n/lift-core.properties @@ -0,0 +1,375 @@ +invalid.email.address = Invalid email address +password.must.be.set = Password must be set +password.too.short = Password too short +passwords.do.not.match = Passwords do not match +number.required = A numeric value must be provided +ajax.error=The server cannot be contacted at this time +invalid.zip.code = Invalid ZIP code +invalid.postal.code = Invalid postal code +unique.email.address = The email address must be unique +must.be.logged.in = You must be logged in +already.logged.in = already logged in. Please logout first. +login = Login +logout = Logout +log.in = Log In +log.out = Log Out +sign.up = Sign Up +logged.in = Logged In +logout.first = Please logout first. +lost.password = Lost Password +reset.password = Reset Password +change.password = Change Password +password.changed = Password Changed +edit.user = Edit User +validate.user = Validate User +edit.profile = Edit Profile +sign.up.confirmation = Sign up confirmation +sign.up.message = You have signed up. A validation email message will be sent to you. +sign.up.validation.link=Click on this link to complete signup: +welcome = Welcome +account.validated = Account Validated +invalid.validation.link = Validation link invalid +account.validation.error = Your account has not been validated. Please check your email for a validation link. +invalid.credentials = Invalid Username/Password +enter.email = Enter your email address and we'll email you a link to reset your password +email.address = Email Address +reset.password.confirmation = Reset Password Confirmation +dear = Dear +click.reset.link = Click on this link to reset your password +thank.you = Thank you +reset.password.request = Reset Password Request +password.reset.email.sent = Password Reset Email sent +account.validation.resent = Account Validation Re-sent +email.address.not.found = Email address not found +send.it = Send It +reset.your.password = Reset your password +enter.your.new.password = Enter your new password +repeat.your.new.password = Enter your new password (repeat) +set.password = Set Password +password.link.invalid = Password reset link invalid +wrong.old.password = Wrong old password +old.password = Old password +new.password = New password +repeat.password = New password (repeat) +repeat = Repeat +edit = Edit +cancel = Cancel +ok = OK +change = Change +password = Password +recover.password = Recover Password +profile.updated = You have updated your profile +male = Male +female = Female +first.name = First Name +last.name = Last Name +locale = Locale +time.zone = Time Zone +msg.notice = Notice +msg.warning = Warning +msg.error = Error +crudify.menu.view.displayName=View %s +crudify.menu.edit.displayName=Edit %s +crudify.menu.delete.displayName=Delete %s +paginator.norecords = There are no records to display +paginator.displayingrecords = Displaying %s-%s of %s +# Country names +country_1 = United States +country_2 = Afghanistan +country_3 = Albania +country_4 = Algeria +country_5 = Andorra +country_6 = Angola +country_7 = Antigua and Barbuda +country_8 = Argentina +country_9 = Armenia +country_10 = Australia +country_11 = Austria +country_12 = Azerbaijan +country_13 = Bahamas, The +country_14 = Bahrain +country_15 = Bangladesh +country_16 = Barbados +country_17 = Belarus +country_18 = Belgium +country_19 = Belize +country_20 = Benin +country_21 = Bhutan +country_22 = Bolivia +country_23 = Bosnia and Herzegovina +country_24 = Botswana +country_25 = Brazil +country_26 = Brunei +country_27 = Bulgaria +country_28 = Burkina Faso +country_29 = Burundi +country_30 = Cambodia +country_31 = Cameroon +country_32 = Canada +country_33 = Cape Verde +country_34 = Central African Republic +country_35 = Chad +country_36 = Chile +country_37 = China, People's Republic of +country_38 = Colombia +country_39 = Comoros +country_40 = Congo, Democratic Republic of the (Congo Kinshasa) +country_41 = Congo, Republic of the (Congo Brazzaville) +country_42 = Costa Rica +country_43 = Cote d'Ivoire (Ivory Coast) +country_44 = Croatia +country_45 = Cuba +country_46 = Cyprus +country_47 = Czech Republic +country_48 = Denmark +country_49 = Djibouti +country_50 = Dominica +country_51 = Dominican Republic +country_52 = Ecuador +country_53 = Egypt +country_54 = El Salvador +country_55 = Equatorial Guinea +country_56 = Eritrea +country_57 = Estonia +country_58 = Ethiopia +country_59 = Fiji +country_60 = Finland +country_61 = France +country_62 = Gabon +country_63 = Gambia, The +country_64 = Georgia +country_65 = Germany +country_66 = Ghana +country_67 = Greece +country_68 = Grenada +country_69 = Guatemala +country_70 = Guinea +country_71 = Guinea-Bissau +country_72 = Guyana +country_73 = Haiti +country_74 = Honduras +country_75 = Hungary +country_76 = Iceland +country_77 = India +country_78 = Indonesia +country_79 = Iran +country_80 = Iraq +country_81 = Ireland +country_82 = Israel +country_83 = Italy +country_84 = Jamaica +country_85 = Japan +country_86 = Jordan +country_87 = Kazakhstan +country_88 = Kenya +country_89 = Kiribati +country_90 = Korea, Democratic People's Republic of (North Korea) +country_91 = Korea, Republic of (South Korea) +country_92 = Kuwait +country_93 = Kyrgyzstan +country_94 = Laos +country_95 = Latvia +country_96 = Lebanon +country_97 = Lesotho +country_98 = Liberia +country_99 = Libya +country_100 = Liechtenstein +country_101 = Lithuania +country_102 = Luxembourg +country_103 = Macedonia +country_104 = Madagascar +country_105 = Malawi +country_106 = Malaysia +country_107 = Maldives +country_108 = Mali +country_109 = Malta +country_110 = Marshall Islands +country_111 = Mauritania +country_112 = Mauritius +country_113 = Mexico +country_114 = Micronesia +country_115 = Moldova +country_116 = Monaco +country_117 = Mongolia +country_118 = Montenegro +country_119 = Morocco +country_120 = Mozambique +country_121 = Myanmar (Burma) +country_122 = Namibia +country_123 = Nauru +country_124 = Nepal +country_125 = Netherlands +country_126 = New Zealand +country_127 = Nicaragua +country_128 = Niger +country_129 = Nigeria +country_130 = Norway +country_131 = Oman +country_132 = Pakistan +country_133 = Palau +country_134 = Panama +country_135 = Papua New Guinea +country_136 = Paraguay +country_137 = Peru +country_138 = Philippines +country_139 = Poland +country_140 = Portugal +country_141 = Qatar +country_142 = Romania +country_143 = Russia +country_144 = Rwanda +country_145 = Saint Kitts and Nevis +country_146 = Saint Lucia +country_147 = Saint Vincent and the Grenadines +country_148 = Samoa +country_149 = San Marino +country_150 = Sao Tome and Principe +country_151 = Saudi Arabia +country_152 = Senegal +country_153 = Serbia +country_154 = Seychelles +country_155 = Sierra Leone +country_156 = Singapore +country_157 = Slovakia +country_158 = Slovenia +country_159 = Solomon Islands +country_160 = Somalia +country_161 = South Africa +country_162 = Spain +country_163 = Sri Lanka +country_164 = Sudan +country_165 = Suriname +country_166 = Swaziland +country_167 = Sweden +country_168 = Switzerland +country_169 = Syria +country_170 = Tajikistan +country_171 = Tanzania +country_172 = Thailand +country_173 = Timor-Leste (East Timor) +country_174 = Togo +country_175 = Tonga +country_176 = Trinidad and Tobago +country_177 = Tunisia +country_178 = Turkey +country_179 = Turkmenistan +country_180 = Tuvalu +country_181 = Uganda +country_182 = Ukraine +country_183 = United Arab Emirates +country_184 = United Kingdom +country_185 = Uruguay +country_186 = Uzbekistan +country_187 = Vanuatu +country_188 = Vatican City +country_189 = Venezuela +country_190 = Vietnam +country_191 = Yemen +country_192 = Zambia +country_193 = Zimbabwe +country_194 = Abkhazia +country_195 = China, Republic of (Taiwan) +country_196 = Nagorno-Karabakh +country_197 = Northern Cyprus +country_198 = Pridnestrovie (Transnistria) +country_199 = Somaliland +country_200 = South Ossetia +country_201 = Ashmore and Cartier Islands +country_202 = Christmas Island +country_203 = Cocos (Keeling) Islands +country_204 = Coral Sea Islands +country_205 = Heard Island and McDonald Islands +country_206 = Norfolk Island +country_207 = New Caledonia +country_208 = French Polynesia +country_209 = Mayotte +country_210 = Saint Barthelemy +country_211 = Saint Martin +country_212 = Saint Pierre and Miquelon +country_213 = Wallis and Futuna +country_214 = French Southern and Antarctic Lands +country_215 = Clipperton Island +country_216 = Bouvet Island +country_217 = Cook Islands +country_218 = Niue +country_219 = Tokelau +country_220 = Guernsey +country_221 = Isle of Man +country_222 = Jersey +country_223 = Anguilla +country_224 = Bermuda +country_225 = British Indian Ocean Territory +country_226 = British Sovereign Base Areas +country_227 = British Virgin Islands +country_228 = Cayman Islands +country_229 = Falkland Islands (Islas Malvinas) +country_230 = Gibraltar +country_231 = Montserrat +country_232 = Pitcairn Islands +country_233 = Saint Helena +country_234 = South Georgia and the South Sandwich Islands +country_235 = Turks and Caicos Islands +country_236 = Northern Mariana Islands +country_237 = Puerto Rico +country_238 = American Samoa +country_239 = Baker Island +country_240 = Guam +country_241 = Howland Island +country_242 = Jarvis Island +country_243 = Johnston Atoll +country_244 = Kingman Reef +country_245 = Midway Islands +country_246 = Navassa Island +country_247 = Palmyra Atoll +country_248 = U.S. Virgin Islands +country_249 = Wake Island +country_250 = Hong Kong +country_251 = Macau +country_252 = Faroe Islands +country_253 = Greenland +country_254 = French Guiana +country_255 = Guadeloupe +country_256 = Martinique +country_257 = Reunion +country_258 = Aland +country_259 = Aruba +country_260 = Netherlands Antilles +country_261 = Svalbard +country_262 = Ascension +country_263 = Tristan da Cunha +country_264 = Antarctica +country_265 = Kosovo +country_266 = Palestinian Territories (Gaza Strip and West Bank) +country_267 = Western Sahara +country_268 = Australian Antarctic Territory +country_269 = Ross Dependency +country_270 = Peter I Island +country_271 = Queen Maud Land +country_272 = British Antarctic Territory +# LiftScreen + Wizard +Next = Next +Previous = Previous +Finish = Finish +Cancel = Cancel + +# Crudify +Create = Create +Save = Save +Edit = Edit +Delete = Delete +delete = delete +View = View +List = List %s +Created = Created +Edited = Edited +Deleted = Deleted + + +# Sofit custom props +sign_in_as = Sign in as +views = Views +private_accounts = Private accounts +public_accounts = Public accounts +my_accounts = My accounts +account_name = Account Name +you_are_logged_out = You are logged out. No authorised accounts available. \ No newline at end of file diff --git a/src/main/resources/i18n/lift-core_it.properties b/src/main/resources/i18n/lift-core_it.properties new file mode 100644 index 00000000..89b85652 --- /dev/null +++ b/src/main/resources/i18n/lift-core_it.properties @@ -0,0 +1,367 @@ +invalid.email.address = Indirizzo email non valido +password.must.be.set = E' necessario impostare una password +password.too.short = La password è troppo corta +passwords.do.not.match = Le password non coincidono +number.required = Inserire un valore numerico +ajax.error= Il server non è al momento contattabile +invalid.zip.code = Codice di Avviamento Postale non valido +invalid.postal.code = Codice postale non valido +unique.email.address = L'indirizzo email deve essere unico +must.be.logged.in = Devi essere loggato +already.logged.in = Hai già effettuato l'accesso. Si prega di uscire prima. +login = Accedi +logout = Esci +log.in = Accedi +log.out = Esci +sign.up = Registrati +logged.in = Collegati +logout.first = Si prega di uscire prima. +lost.password = Hai perso la password +reset.password = Reset Password +change.password = Modifica Password +password.changed = Password Cambiata +edit.user = Modifica Utente +validate.user = Valida Utente +edit.profile = Modifica Profilo +sign.up.confirmation = Iscrizione confermata +sign.up.message = Sei registrato. Un messaggio email di validazione ti è stato inviato. +welcome = Benvenuto +account.validated = Account Validato +invalid.validation.link = Link di validazione invalido +account.validation.error = Il tuo account non è stato validato. Controlla la tua email per il link di validazione. +invalid.credentials = Username/Password errati +enter.email = Inserisci il tuo indirizzo email e ti invieremo il link per resettare la password +email.address = Indirizzo Email +reset.password.confirmation = Conferma Password Resettata +dear = Caro +click.reset.link = Clicca questo link per resettare la password +thank.you = Grazie +reset.password.request = Richiesta Reset Password +password.reset.email.sent = Email per il Reset della Password inviata +account.validation.resent = Convalida Account reinviata +email.address.not.found = Indirizzo email non trovato +send.it = Inviala +reset.your.password = Resetta la tua password +enter.your.new.password = Inserisci la tua nuova password +repeat.your.new.password = Inserisci la tua nuova password (ripeti) +set.password = Imposta Password +password.link.invalid = Link di reset della password invalido +wrong.old.password = Vecchia password errata +old.password = Vecchia password +new.password = Nuova password +repeat.password = Nuova password (ripeti) +edit = Modifica +change = Cambia +password = Password +recover.password = Recupero Password +profile.updated = Hai aggiornato il tuo profilo +male = Maschio +female = Femmina +first.name = Nome +last.name = Cognome +locale = Località +time.zone = Fuso Orario +msg.notice = Info +msg.warning = Attenzione +msg.error = Errore +country_1 = Stati Uniti +country_2 = Afghanistan +country_3 = Albania +country_4 = Algeria +country_5 = Andorra +country_6 = Angola +country_7 = Antigua e Barbuda +country_8 = Argentina +country_9 = Armenia +country_10 = Australia +country_11 = Austria +country_12 = Azerbaijan +country_13 = Bahamas +country_14 = Bahrain +country_15 = Bangladesh +country_16 = Barbados +country_17 = Belarus +country_18 = Belgio +country_19 = Belize +country_20 = Benin +country_21 = Bhutan +country_22 = Bolivia +country_23 = Bosnia-Erzegovina +country_24 = Botswana +country_25 = Brasile +country_26 = Brunei +country_27 = Bulgaria +country_28 = Burkina Faso +country_29 = Burundi +country_30 = Cambodia +country_31 = Camerun +country_32 = Canada +country_33 = Capo Verde +country_34 = Repubblica Centrale Africana +country_35 = Chad +country_36 = Cile +country_37 = Cina, Repubblica Popolare della +country_38 = Colombia +country_39 = Comoros +country_40 = Congo, Repubblica Democratica del (Congo Kinshasa) +country_41 = Congo, Repubblica del (Congo Brazzaville) +country_42 = Costa Rica +country_43 = Cote d'Ivoire (Costa D'Avorio) +country_44 = Croazia +country_45 = Cuba +country_46 = Cipro +country_47 = Repubblica Ceca +country_48 = Danimarca +country_49 = Gibuti +country_50 = Dominica +country_51 = Repubblica Dominicana +country_52 = Ecuador +country_53 = Egitto +country_54 = El Salvador +country_55 = Guinea Equatoriale +country_56 = Eritrea +country_57 = Estonia +country_58 = Etiopia +country_59 = Fiji +country_60 = Finlandia +country_61 = Francia +country_62 = Gabon +country_63 = Gambia +country_64 = Georgia +country_65 = Germania +country_66 = Ghana +country_67 = Grecia +country_68 = Grenada +country_69 = Guatemala +country_70 = Guinea +country_71 = Guinea-Bissau +country_72 = Guyana +country_73 = Haiti +country_74 = Honduras +country_75 = Ungheria +country_76 = Islanda +country_77 = India +country_78 = Indonesia +country_79 = Iran +country_80 = Iraq +country_81 = Irlanda +country_82 = Israele +country_83 = Italia +country_84 = Jamaica +country_85 = Giappone +country_86 = Giordania +country_87 = Kazakhstan +country_88 = Kenya +country_89 = Kiribati +country_90 = Korea, Repubblica popolare democatrica della (Korea del Nord) +country_91 = Korea, Repubblica della (Korea del Sud) +country_92 = Kuwait +country_93 = Kyrgyzstan +country_94 = Laos +country_95 = Latvia +country_96 = Lebanon +country_97 = Lesotho +country_98 = Liberia +country_99 = Libia +country_100 = Liechtenstein +country_101 = Lituania +country_102 = Lussemburgo +country_103 = Macedonia +country_104 = Madagascar +country_105 = Malawi +country_106 = Malaysia +country_107 = Maldive +country_108 = Mali +country_109 = Malta +country_110 = Isole Marshall +country_111 = Mauritania +country_112 = Mauritius +country_113 = Mexico +country_114 = Micronesia +country_115 = Moldova +country_116 = Monaco +country_117 = Mongolia +country_118 = Montenegro +country_119 = Morocco +country_120 = Mozambico +country_121 = Myanmar (Burma) +country_122 = Namibia +country_123 = Nauru +country_124 = Nepal +country_125 = Olanda +country_126 = Nuova Zelanda +country_127 = Nicaragua +country_128 = Niger +country_129 = Nigeria +country_130 = Norway +country_131 = Oman +country_132 = Pakistan +country_133 = Palau +country_134 = Panama +country_135 = Papua Nuova Guinea +country_136 = Paraguay +country_137 = Peru +country_138 = Filippine +country_139 = Polonia +country_140 = Portogallo +country_141 = Qatar +country_142 = Romania +country_143 = Russia +country_144 = Rwanda +country_145 = Saint Kitts e Nevis +country_146 = Santa Lucia +country_147 = Saint Vincent e Grenadines +country_148 = Samoa +country_149 = San Marino +country_150 = Sao Tome e Principe +country_151 = Arabia Saudita +country_152 = Senegal +country_153 = Serbia +country_154 = Seychelles +country_155 = Sierra Leone +country_156 = Singapore +country_157 = Slovakia +country_158 = Slovenia +country_159 = Isole Solomone +country_160 = Somalia +country_161 = Sud Africa +country_162 = Spagna +country_163 = Sri Lanka +country_164 = Sudan +country_165 = Suriname +country_166 = Swaziland +country_167 = Svezia +country_168 = Svizzera +country_169 = Siria +country_170 = Tajikistan +country_171 = Tanzania +country_172 = Thailandia +country_173 = Timor-Leste (Timor Est) +country_174 = Togo +country_175 = Tonga +country_176 = Trinidad e Tobago +country_177 = Tunisia +country_178 = Turkey +country_179 = Turkmenistan +country_180 = Tuvalu +country_181 = Uganda +country_182 = Ucraina +country_183 = Emirati Arabi Uniti +country_184 = United Kingdom +country_185 = Uruguay +country_186 = Uzbekistan +country_187 = Vanuatu +country_188 = Città del Vaticano +country_189 = Venezuela +country_190 = Vietnam +country_191 = Yemen +country_192 = Zambia +country_193 = Zimbabwe +country_194 = Abkhazia +country_195 = Cina, Repubblica di (Taiwan) +country_196 = Nagorno-Karabakh +country_197 = Northern Cyprus +country_198 = Pridnestrovie (Transnistria) +country_199 = Somaliland +country_200 = Ossezia del Sud +country_201 = Isole Ashmore e Cartier +country_202 = Isola di Natale +country_203 = Isole Cocos (Keeling) +country_204 = Isole del Mar dei Coralli +country_205 = Isola Heard e Isole McDonald +country_206 = Isola Norfolk Island +country_207 = Nuova Caledonia +country_208 = Polinesia Francese +country_209 = Mayotte +country_210 = Saint Barthelemy +country_211 = San Martino +country_212 = Saint Pierre e Miquelon +country_213 = Wallis e Futuna +country_214 = Terre australi e antartiche +country_215 = Isola Clipperto +country_216 = Isola Bouvet +country_217 = Isole Cook +country_218 = Niue +country_219 = Tokelau +country_220 = Guernsey +country_221 = Isle of Man +country_222 = Jersey +country_223 = Anguilla +country_224 = Bermuda +country_225 = Territori Britannici dell'Oceano Indiano +country_226 = British Sovereign Base Areas +country_227 = Isole Vergini Britanniche +country_228 = Isole Cayman +country_229 = Isole Falkland (Islas Malvinas) +country_230 = Gibilterra +country_231 = Montserrat +country_232 = Isole Pitcairn +country_233 = Santa Elena +country_234 = Georgia del Sud e Isole Sandwich meridionali +country_235 = Isole Turks e Caicos +country_236 = Isole Marianne del Nord +country_237 = Puerto Rico +country_238 = Samoa Americane +country_239 = Isola Baker +country_240 = Guam +country_241 = Isola Howland +country_242 = Isola Jarvis +country_243 = Johnston Atoll +country_244 = Kingman Reef +country_245 = Isole Midway +country_246 = Isola Navassa +country_247 = Palmyra Atoll +country_248 = U.S. Isole Vergini +country_249 = Isola Wake +country_250 = Hong Kong +country_251 = Macau +country_252 = Isole Faroe +country_253 = Groenlandia +country_254 = Guiana francese +country_255 = Guadeloupe +country_256 = Martinica +country_257 = Reunion +country_258 = Aland +country_259 = Aruba +country_260 = Antille Olandesi +country_261 = Svalbard +country_262 = Ascension +country_263 = Tristan da Cunha +country_264 = Antartide +country_265 = Kosovo +country_266 = Territori palestinesi (Striscia di Gaza e Cisgiordania) +country_267 = Sahara Occidentale +country_268 = Territorio Antartico Australiano +country_269 = Ross Dependency +country_270 = Isola Peter I +country_271 = Terra della Regina Maud +country_272 = Territorio Antarcico Inglese + +# LiftScreen + Wizard +Next = Prossimo +Previous = Precedente +Finish = Finisci +Cancel = Annulla + +# Crudify +Create = Crea +Save = Salva + +Edit = Modifica +Delete = Cancella +delete = cancella + +View = Vista +List = Lista %s +Created = Creato +Edited = Modificato +Deleted = Cancellato + +# Sofit custom props +sign_in_as = Accedi come +views = Visualizzazioni +private_accounts = Conti privati +public_accounts = Conti pubblici +my_accounts = I miei account +account_name = Nome utente +you_are_logged_out = Sei disconnesso. Nessun account autorizzato disponibile. \ No newline at end of file diff --git a/src/main/scala/bootstrap/liftweb/Boot.scala b/src/main/scala/bootstrap/liftweb/Boot.scala index fce796a5..4dfd704f 100755 --- a/src/main/scala/bootstrap/liftweb/Boot.scala +++ b/src/main/scala/bootstrap/liftweb/Boot.scala @@ -32,6 +32,7 @@ Berlin 13359, Germany package bootstrap.liftweb import java.io.{File, FileInputStream} +import java.util.Locale import code.Constant._ import code.lib.ObpJson._ @@ -447,6 +448,18 @@ class Boot extends MdcLoggable{ // Force the request to be UTF-8 LiftRules.early.append(_.setCharacterEncoding("UTF-8")) + //set base localization to english (instead of computer default) + Locale.setDefault(Locale.ITALIAN) + logger.info("Current Project Locale is :" +Locale.getDefault) + + //override locale calculated from client request with default (until we have translations) + LiftRules.localeCalculator = { + case fullReq @ Full(req) => Locale.ITALIAN + case _ => Locale.ITALIAN + } + + // LiftRules.resourceNames = "i18n.lift-core" :: Nil + // Use HTML5 for rendering LiftRules.htmlProperties.default.set((r: Req) => new Html5Properties(r.userAgent)) diff --git a/src/main/scala/code/snippet/AccountsOverview.scala b/src/main/scala/code/snippet/AccountsOverview.scala index c36c8ef8..c029163e 100644 --- a/src/main/scala/code/snippet/AccountsOverview.scala +++ b/src/main/scala/code/snippet/AccountsOverview.scala @@ -35,7 +35,7 @@ package code.snippet import code.lib.{OAuthClient, ObpAPI} import code.lib.ObpJson._ import code.util.Helper.MdcLoggable -import net.liftweb.http.SHtml +import net.liftweb.http.{S, SHtml} import net.liftweb.http.js.JE.JsRaw import net.liftweb.http.js.JsCmds.Noop import net.liftweb.util.Helpers._ @@ -154,8 +154,8 @@ class AccountsOverview extends MdcLoggable { } def loggedOutSnippet = { - // ".accountItem" #> SHtml.span(Text("You are logged out. No authorised accounts available."), Noop,("id","accountsMsg")) - ".accName *" #> "You are logged out. No authorised accounts available." & + // ".accountItem" #> SHtml.span(Text("S.?("you_are_logged_out")"), Noop,("id","accountsMsg")) + ".accName *" #> S.?("you_are_logged_out") & ".accLink" #> "" } @@ -190,7 +190,7 @@ class AccountsOverview extends MdcLoggable { } } def loggedOutSnippet = { - ".accountList" #> SHtml.span(Text("You are logged out. No authorised accounts available."), Noop,("id","accountsMsg")) + ".accountList" #> SHtml.span(Text(S.?("you_are_logged_out")), Noop,("id","accountsMsg")) } if(OAuthClient.loggedIn) loggedInSnippet @@ -218,7 +218,7 @@ class AccountsOverview extends MdcLoggable { } def loggedOutSnippet = { - ".accountList" #> SHtml.span(Text("You are logged out. No authorised accounts available."), Noop,("id","accountsMsg")) + ".accountList" #> SHtml.span(Text(S.?("you_are_logged_out")), Noop,("id","accountsMsg")) } if(OAuthClient.loggedIn) loggedInSnippet diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index ba7f8016..1105d403 100755 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -33,7 +33,7 @@
-

Public & Private accounts

+

Private accounts

@@ -43,13 +43,13 @@

Public & Private accounts