← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5236: [mydatamart] prepared fro French translation

 

------------------------------------------------------------
revno: 5236
committer: Bob Jolliffe bobjolliffe@xxxxxxxxx
branch nick: dhis2
timestamp: Tue 2011-11-29 14:24:25 +0000
message:
  [mydatamart] prepared fro French translation
added:
  tools/datamart/mydatamart.vfs/msgs/strings.fr
  tools/datamart/translate.tcl
modified:
  tools/datamart/mydatamart.vfs/appinit.tcl
  tools/datamart/mydatamart.vfs/msgs/fr.msg
  tools/datamart/mydatamart.vfs/stats.tcl


--
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 'tools/datamart/mydatamart.vfs/appinit.tcl'
--- tools/datamart/mydatamart.vfs/appinit.tcl	2011-08-31 14:17:36 +0000
+++ tools/datamart/mydatamart.vfs/appinit.tcl	2011-11-29 14:24:25 +0000
@@ -1,10 +1,12 @@
-set ::dhis(version) "1.0 2011-Aug-03"
+set ::dhis(version) "1.0 2011-Nov-29"
 
 #load tcl core extensions
 package require msgcat
 
 # bring msgcat commands into scope for localizing strings
 namespace import msgcat::*
+# load LOCALE specific message file
+mcload [file join $starkit::topdir msgs]
 
 package require logger 0.3
 package require dhisweb

=== modified file 'tools/datamart/mydatamart.vfs/msgs/fr.msg'
--- tools/datamart/mydatamart.vfs/msgs/fr.msg	2011-08-02 19:21:56 +0000
+++ tools/datamart/mydatamart.vfs/msgs/fr.msg	2011-11-29 14:24:25 +0000
@@ -1,6 +1,11 @@
 namespace import -force msgcat::mcset
 
 set lang fr
-
-mcset $lang {File} {le File}
-mcset $lang  {Exit} {Exeet}
+set stringsFile [open [file join $starkit::topdir msgs/strings.fr]]
+
+set strings [read $stringsFile]
+
+foreach {en fr} $strings {
+    mcset $lang $en $fr
+}
+close $stringsFile

=== added file 'tools/datamart/mydatamart.vfs/msgs/strings.fr'
--- tools/datamart/mydatamart.vfs/msgs/strings.fr	1970-01-01 00:00:00 +0000
+++ tools/datamart/mydatamart.vfs/msgs/strings.fr	2011-11-29 14:24:25 +0000
@@ -0,0 +1,88 @@
+"Zip file is not a dxf export file" "Zip file is not a dxf export file"
+"Transform metadata done" "Transform metadata done"
+"Importing metadata" "Importing metadata"
+"Generating views" "Generating views"
+"Metadata import done" "Metadata import done"
+"Problem importing metadata\n$err" "Problem importing metadata\n$err"
+"Metadata import" "Metadata import"
+"Select views for workbook" "Select views for workbook"
+"Available views" "Available views"
+"Included views" "Included views"
+"Create Excel workbook" "Create Excel workbook"
+"Create new excel file" "Create new excel file"
+"Aggregated datavalues" "Aggregated datavalues"
+"Aggregated indicator values" "Aggregated indicator values"
+"Update from remote dhis" "Update from remote dhis"
+"Period type" "Period type"
+"Count" "Count"
+"Earliest" "Earliest"
+"Latest" "Latest"
+"Update" "Update"
+"Weekly" "Weekly"
+"Monthly" "Monthly"
+"Quarterly" "Quarterly"
+"Yearly" "Yearly"
+"Weekly" "Weekly"
+"Monthly" "Monthly"
+"Quarterly" "Quarterly"
+"Yearly" "Yearly"
+"From" "From"
+"To" "To"
+"Download %s data for %s" "Download %s data for %s"
+"Download %s data from peers" "Download %s data from peers"
+"Delete local data for period" "Delete local data for period"
+"Downloading aggregate data" "Downloading aggregate data"
+"Failed to connect to server" "Failed to connect to server"
+"Login failure" "Login failure"
+"Download finished" "Download finished"
+"Download failed - see console for detailed error" "Download failed - see console for detailed error"
+"DHIS2 connection" "DHIS2 connection"
+"Orgunit settings" "Orgunit settings"
+"URL:" "URL:"
+"Username:" "Username:"
+"Password:" "Password:"
+"Login" "Login"
+"No orgunit data - you need to download metadata" "No orgunit data - you need to download metadata"
+"Logged in" "Logged in"
+"Log in failed - check username/password" "Log in failed - check username/password"
+"Couldn't connect to host - check URL" "Couldn't connect to host - check URL"
+"Timeout trying to login" "Timeout trying to login"
+"Login unknown status" "Login unknown status"
+"File" "File"
+"DataMart" "DataMart"
+"Reports" "Reports"
+"Help" "Help"
+"New" "New"
+"Open..." "Open..."
+"Exit" "Exit"
+"Settings" "Settings"
+"Update aggregate data" "Update aggregate data"
+"Load Metadata from file" "Load Metadata from file"
+"Load Metadata from dhis" "Load Metadata from dhis"
+"Import sql from file" "Import sql from file"
+"Connect to existing excel file" "Connect to existing excel file"
+"New excel file" "New excel file"
+"Excel Data" "Excel Data"
+"CSV" "CSV"
+"Html" "Html"
+"SDMX-HD" "SDMX-HD"
+"Console (F2)" "Console (F2)"
+"About" "About"
+"Create a new local datamart" "Create a new local datamart"
+"Open an existing local datamart" "Open an existing local datamart"
+"Modify datamart settings\nand login details" "Modify datamart settings\nand login details"
+"Update metadata from DHIS" "Update metadata from DHIS"
+"Update aggregate data from DHIS" "Update aggregate data from DHIS"
+"Connect to existing excel file" "Connect to existing excel file"
+"Exit application" "Exit application"
+"Create new datamart file" "Create new datamart file"
+"New datamart created at $dbfile" "New datamart created at $dbfile"
+"Are you sure?" "Are you sure?"
+"Warning: This operation can take some minutes" "Warning: This operation can take some minutes"
+"Failed to connect to host" "Failed to connect to host"
+"Problem downloading metadata\n$error" "Problem downloading metadata\n$error"
+"Transforming metadata" "Transforming metadata"
+"Error importing file" "Error importing file"
+"$excelFile has no connections defined" "$excelFile has no connections defined"
+"New excel file" "New excel file"
+"Remote DHIS datamart synch program\nversion $::dhis(version)" "Remote DHIS datamart synch program\nversion $::dhis(version)"

=== modified file 'tools/datamart/mydatamart.vfs/stats.tcl'
--- tools/datamart/mydatamart.vfs/stats.tcl	2011-08-02 19:21:56 +0000
+++ tools/datamart/mydatamart.vfs/stats.tcl	2011-11-29 14:24:25 +0000
@@ -163,6 +163,14 @@
 	      -command [list synchData [dhisdb::getParentOrgUnit db $::dhis(myorgunitid)] [::dhisdb::getLevelByOrgunit db $::dhis(myorgunitid)] ] ] \
 	-column 0 -row 4 -columnspan 3 -sticky new
     
+    grid [ttk::button $synchframe.deletedata -text [mc "Delete local data for period" ]]] \
+	-column 0 -row 4 -columnspan 3 -sticky new \
+        -command {
+           set reply [tk_dialog .foo "Are you sure?" "This will delete all data for the selected period." \
+             questhead 0 Yes No ]
+           if {reply==1} return
+        }
+    
     
     grid $synchframe -row 0 -column 1 -rowspan 2 -padx 20 -pady 20 -sticky nsew
     grid $dvframe -row 0 -column 0 -padx 20 -pady 10
@@ -248,4 +256,4 @@
 	    $::dhis($downloadtype,image) configure -image img::fail
 	}
     }
-}
\ No newline at end of file
+}

=== added file 'tools/datamart/translate.tcl'
--- tools/datamart/translate.tcl	1970-01-01 00:00:00 +0000
+++ tools/datamart/translate.tcl	2011-11-29 14:24:25 +0000
@@ -0,0 +1,23 @@
+#!/usr/bin/tclsh
+
+# extract all translatable strings from tcl files
+
+set files [exec find ./mydatamart.vfs -iname *.tcl]
+
+list strings
+
+foreach f $files {
+    # puts stderr "processing $f"
+    set fd [open $f] 
+    set contents [read $fd] 
+    set match ""
+    set str ""
+    foreach {match msg} [regexp -inline -all {\[mc ("[^"]*")} $contents ] {
+      lappend ::strings $msg 
+    }  
+    close $fd
+}
+
+foreach msg $strings {
+  puts "$msg $msg"
+}