=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js 2013-10-01 16:44:42 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/account.js 2013-10-07 09:33:02 +0000 @@ -39,8 +39,19 @@ } }; + +var login = {}; +login.localeCookie = "dhis2.locale"; + $( document ).ready( function() { - + + var locale = $.cookie( login.localeCookie ); + + if ( undefined !== locale && locale ) + { + login.changeLocale( locale ); + } + Recaptcha.create( "6LcM6tcSAAAAANwYsFp--0SYtcnze_WdYn8XwMMk", "recaptchaDiv", { theme: "white" } ); @@ -84,3 +95,22 @@ { Recaptcha.reload(); } + +login.changeLocale = function( locale ) +{ + $.get( 'accountStrings.action?loc=' + locale, function( json ) { + $('#create_new_account').html( json.create_new_account ); + $('#label_firstName').html( json.name ); + $('#firstName').attr( "placeholder", json.first_name ); + $('#surname').attr( "placeholder", json.last_name ); + $('#label_username').html( json.user_name ); + $('#label_password').html( json.password ); + $('#label_retypePassword').html( json.confirm_password ); + $('#label_email').html( json.email ); + $('#label_mobile_phone').html( json.mobile_phone ); + $('#label_employer').html( json.employer ); + $('#label_recaptchaDiv').html( json.prove_not_robot ); + $('#cant_read_words').html( json.cant_read_words ); + $('#submitButton').val( json.create ); + } ); +} === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/recovery.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/recovery.js 2013-10-06 11:32:14 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/useraccount/recovery.js 2013-10-07 09:33:02 +0000 @@ -3,7 +3,14 @@ login.localeCookie = "dhis2.locale"; $( document ).ready( function() { - + + var locale = $.cookie( login.localeCookie ); + + if ( undefined !== locale && locale ) + { + login.changeLocale( locale ); + } + } ); function recoverAccount() @@ -31,3 +38,15 @@ } } ); } + + +login.changeLocale = function( locale ) +{ + $.get( 'recoveryStrings.action?loc=' + locale, function( json ) { + $('#account_recovery').html( json.account_recovery ); + $('#label_username').html( json.user_name ); + $('#recoveryButton').val( json.recover ); + $('#recoverySuccessMessage').html( json.recover_success_message ); + $('#recoveryErrorMessage').html( json.recover_error_message ); + } ); +} \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.js 2013-10-06 11:32:14 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.js 2013-10-07 09:33:02 +0000 @@ -29,13 +29,13 @@ if ( locale ) { login.changeLocale( locale ); - $.cookie( login.localeCookie, locale ); + $.cookie( login.localeCookie, locale, { expires : 356*10 } ); } } login.changeLocale = function( locale ) { - $.get( 'loginStrings.action?loc=' + locale, function( json ) { + $.get( 'loginStrings.action?keyApplication=Y&loc=' + locale, function( json ) { $( '#createAccountButton' ).html( json.create_an_account ); $( '#usernameLabel' ).html( json.login_username ); $( '#passwordLabel' ).html( json.login_password ); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm 2013-10-06 11:32:14 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/useraccount/account.vm 2013-10-07 09:33:02 +0000 @@ -21,47 +21,47 @@