=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.js 2009-11-08 20:18:11 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/i18n.js 2010-03-09 08:30:08 +0000 @@ -1,3 +1,12 @@ +//---------------------------------------------------------- +// Regular Expression using for checking shortname' value +//---------------------------------------------------------- + +regexShortName = /^[\w][\w\d]+$/; + +//---------------------------------------------------------- + + function updateTranslation() { var id = document.getElementById("id").value; @@ -137,3 +146,36 @@ document.getElementById('message').style.display = 'block'; } + +function applyingPatternForShortName( shortNameValue ) +{ + return shortNameValue.match( regexShortName ); +} + +function validateAddTranslation() +{ + var shortNameField = byId( 'shortName' ); + var shortNameVal = shortNameField.value; + + if ( shortNameVal.length > 0 ) + { + if ( applyingPatternForShortName( shortNameVal ) == null ) + { + setMessage( shortname_invalidated ); + shortNameField.select(); + return false; + } + else if ( shortNameVal.length > 25 ) + { + setMessage( shortname_length ); + shortNameField.select(); + return false; + } + else + { + return true; + } + } + + return true; +} === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/translate.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/translate.vm 2010-03-08 14:50:40 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/i18n/translate.vm 2010-03-09 08:30:08 +0000 @@ -1,6 +1,6 @@ -
+ -

$i18n.getString( "translation_translate" ) #openHelp( "translation" )

+

$i18n.getString( "translation_translate" )

@@ -49,7 +49,7 @@ -

$i18n.getString( "translation_addlocale")

+

$i18n.getString( "translation_addlocale") #openHelp( "dhis-web-commons.locale" )

@@ -72,6 +72,7 @@ \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2010-03-08 14:50:40 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2010-03-09 08:30:08 +0000 @@ -186,6 +186,8 @@ translation_country_must_be_two_chars = Country must be two characters translation_variant_must_be_specified = Variant must be specified translation_locale_already_exists = Locale already exists +translation_shortname_wellformed = Please verify Letters, Numbers and Underscore for short name only +translation_shortname_length = Shortname's maximum length of 25 charaters #-- About ----------------------------------------------------------------------# === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties' --- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties 2010-01-22 03:15:07 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global_vi_VN.properties 2010-03-09 08:30:08 +0000 @@ -173,6 +173,8 @@ translation_country_must_be_two_chars = M\u00e3 qu\u1ed1c gia ph\u1ea3i c\u00f3 2 k\u00fd t\u1ef1 translation_variant_must_be_specified = Bi\u1ebfn kh\u00f4ng \u0111\u01b0\u1ee3c b\u1ecf tr\u1ed1ng translation_locale_already_exists = V\u00f9ng n\u00e0y \u0111\u00e3 t\u1ed3n t\u1ea1i +translation_shortname_wellformed = T\u00ean vi\u1ebft t\u1eaft ch\u1ec9 ch\u1ee9a c\u00e1c k\u00fd t\u1ef1 Alphabet(a-z), s\u1ed1(0-9) v\u00e0 d\u1ea5u g\u1ea1ch d\u01b0\u1edbi(_) +translation_shortname_length = \u0110\u1ed9 d\u00e0i t\u1ed1i \u0111a c\u1ee7a t\u00ean vi\u1ebft t\u1eaft l\u00e0 25 k\u00fd t\u1ef1 #-- About ----------------------------------------------------------------------# === modified file 'dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.js' --- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.js 2010-03-04 09:44:37 +0000 +++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/webapp/dhis-web-excel-reporting/javascript/exceltemplate.js 2010-03-09 08:30:08 +0000 @@ -72,7 +72,7 @@ ( '' + i18n_filename_wellformed + '' ); break; }
Details