← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4342: Data entry i18n

 

------------------------------------------------------------
revno: 4342
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2011-08-18 09:04:26 +0200
message:
  Data entry i18n
modified:
  dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js
  dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2011-08-16 13:16:34 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/resources/org/hisp/dhis/de/i18n_module.properties	2011-08-18 07:04:26 +0000
@@ -127,4 +127,7 @@
 value								= Value
 no_response_from_server				= No response from server. Please check connectivity and try again.
 save_comment						= Save comment
-operation_not_available_offline		= This operation is not available in off-line mode
\ No newline at end of file
+operation_not_available_offline		= This operation is not available in off-line mode
+online_notification					= You are online
+offline_notification				= You are offline - data will be stored locally
+uploading_data_notification			= Uploading locally stored data to the server

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2011-08-17 13:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/entry.js	2011-08-18 07:04:26 +0000
@@ -83,8 +83,9 @@
 
         var value = $( fieldId ) && $( fieldId ).val() ? $( fieldId ).val() : '0';
 
-        expression = expression.replace( match, value ); // TODO signed
-        // numbers
+        expression = expression.replace( match, value ); 
+        
+        // TODO signed numbers
     }
 
     return expression;
@@ -212,11 +213,11 @@
 function ValueSaver( dataElementId_, optionComboId_, organisationUnitId_, periodId_, value_, resultColor_ )
 {
     var dataValue = {
-        "dataElementId" : dataElementId_,
-        "optionComboId" : optionComboId_,
-        "organisationUnitId" : organisationUnitId_,
-        "periodId" : periodId_,
-        "value" : value_,
+        'dataElementId' : dataElementId_,
+        'optionComboId' : optionComboId_,
+        'organisationUnitId' : organisationUnitId_,
+        'periodId' : periodId_,
+        'value' : value_,
     };
 
     var resultColor = resultColor_;
@@ -252,7 +253,7 @@
 
     function handleError( jqXHR, textStatus, errorThrown )
     {
-        setHeaderMessage( "You are offline. Data will be stored locally." );
+        setHeaderMessage( i18n_offline_notification );
         markValue( resultColor );
     }
 

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-17 15:22:50 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/javascript/form.js	2011-08-18 07:04:26 +0000
@@ -67,9 +67,9 @@
     $( document ).bind( 'dhis2.online', function( event, loggedIn ) {
         if( loggedIn ) {
             if( isHeaderMessageVisible() ) {
-                updateHeaderMessage( 'You are online' );
+                updateHeaderMessage( i18n_online_notification );
             } else {
-                setHeaderMessage( 'You are online' );
+                setHeaderMessage( i18n_online_notification );
             }
         } 
         else {
@@ -85,9 +85,9 @@
 
     $( document ).bind( 'dhis2.offline', function() {
         if( isHeaderMessageVisible() ) {
-            updateHeaderMessage( 'You are offline. Data will be stored locally.' );
+            updateHeaderMessage( i18n_offline_notification );
         } else {
-            setHeaderMessage( 'You are offline. Data will be stored locally.' );
+            setHeaderMessage( i18n_offline_notification );
         }
     } );
 
@@ -115,19 +115,19 @@
     var completeDataSets = getCompleteDataSetsLocalVariable();
 
     var oldHeaderMessage = getHeaderMessage();
-    setHeaderWaitMessage("Syncing local data with server");
+    setHeaderWaitMessage( i18n_uploading_data_notification );
 
     for ( var dataValueKey in dataValues ) 
     {
         var dataValue = dataValues[dataValueKey];
 
         $.ajax( {
-            url : 'saveValue.action',
-            data : dataValue,
-            dataType : 'json',
+            url: 'saveValue.action',
+            data: dataValue,
+            dataType: 'json',
             dataValue: dataValue,
             async: false,
-            success : function( data, textStatus, jqXHR ) {
+            success: function( data, textStatus, jqXHR ) {
                 storageManager.clearDataValueJSON( this.dataValue );
                 console.log( 'Successfully saved data value with value: ' + this.dataValue );
             }
@@ -151,7 +151,7 @@
         });
     }
 
-    if(oldHeaderMessage.length > 0) {
+    if ( oldHeaderMessage.length > 0 ) {
         setHeaderMessage(oldHeaderMessage);
     } else {
         hideHeaderMessage();
@@ -949,9 +949,9 @@
 	var MAX_SIZE_FORMS = new Number( 1600000 );
 	var MAX_SIZE_DATA_VALUES = new Number( 500000 );
 
-	var KEY_FORM_PREFIX = "form-";
-	var KEY_FORM_VERSIONS = "formversions";
-	var KEY_DATAVALUES = "datavalues";
+	var KEY_FORM_PREFIX = 'form-';
+	var KEY_FORM_VERSIONS = 'formversions';
+	var KEY_DATAVALUES = 'datavalues';
 
 	/**
 	 * Returns the total number of characters currently in the local storage.

=== modified file 'dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm'
--- dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2011-08-17 13:41:04 +0000
+++ dhis-2/dhis-web/dhis-web-dataentry/src/main/webapp/dhis-web-dataentry/select.vm	2011-08-18 07:04:26 +0000
@@ -18,12 +18,14 @@
 var i18n_confirm_complete = '$encoder.jsEscape( $i18n.getString( "confirm_complete" ) , "'")';
 var i18n_confirm_undo = '$encoder.jsEscape( $i18n.getString( "confirm_undo" ) , "'")';
 var i18n_no_response_from_server = '$encoder.jsEscape( $i18n.getString( "no_response_from_server" ) , "'")';
-var i18n_operation_not_available_offline = '$encoder.jsEscape( $i18n.getString( "operation_not_available_offline" ) , "'")';
-
 var i18n_enter_digits = '$encoder.jsEscape( $i18n.getString( "enter_digits" ) , "'")';
 var i18n_max_must_be_greater_than_min = '$encoder.jsEscape( $i18n.getString( "max_must_be_greater_than_min" ) , "'")';
 var i18n_mark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "mark_value_for_followup" ) , "'")';
 var i18n_unmark_value_for_followup = '$encoder.jsEscape( $i18n.getString( "unmark_value_for_followup" ) , "'")';
+var i18n_operation_not_available_offline = '$encoder.jsEscape( $i18n.getString( "operation_not_available_offline" ) , "'")';
+var i18n_online_notification = '$encoder.jsEscape( $i18n.getString( "online_notification" ) , "'")';
+var i18n_offline_notification = '$encoder.jsEscape( $i18n.getString( "offline_notification" ) , "'")';
+var i18n_uploading_data_notification = '$encoder.jsEscape( $i18n.getString( "uploading_data_notification" ) , "'")';
 
 </script>