[Stacomir-commits] r254 - in pkg/stacomir: R po

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 27 12:48:17 CET 2017


Author: timothee_besse
Date: 2017-01-27 12:48:16 +0100 (Fri, 27 Jan 2017)
New Revision: 254

Modified:
   pkg/stacomir/R/BilanAgedemer.r
   pkg/stacomir/R/BilanAnnuels.r
   pkg/stacomir/R/BilanArgentee.r
   pkg/stacomir/R/BilanConditionEnv.r
   pkg/stacomir/R/BilanEspeces.r
   pkg/stacomir/R/BilanFonctionnementDC.r
   pkg/stacomir/R/BilanFonctionnementDF.r
   pkg/stacomir/R/BilanMigration.r
   pkg/stacomir/R/BilanMigrationConditionEnv.r
   pkg/stacomir/R/BilanMigrationInterAnnuelle.r
   pkg/stacomir/R/BilanMigrationMult.r
   pkg/stacomir/R/BilanMigrationPar.r
   pkg/stacomir/R/Bilan_poids_moyen.r
   pkg/stacomir/R/Bilan_stades_pigm.r
   pkg/stacomir/R/PasdeTemps.r
   pkg/stacomir/R/RefDC.r
   pkg/stacomir/R/RefStades.r
   pkg/stacomir/R/RefTaxon.r
   pkg/stacomir/R/Refparqual.r
   pkg/stacomir/R/Refparquan.r
   pkg/stacomir/R/fn_EcritBilanMensuel.r
   pkg/stacomir/R/fungraph.r
   pkg/stacomir/R/fungraph_civelle.r
   pkg/stacomir/R/fungraph_env.r
   pkg/stacomir/R/funtable.r
   pkg/stacomir/R/interface_Bilan_taille.r
   pkg/stacomir/R/stacomi.r
   pkg/stacomir/po/R-stacomiR.pot
   pkg/stacomir/po/fr_FR.mo
   pkg/stacomir/po/fr_FR.po
Log:
Poursuite de la correction des messages : interface graphique, stacomir, etc. et tous les paste() en gettextf

Modified: pkg/stacomir/R/BilanAgedemer.r
===================================================================
--- pkg/stacomir/R/BilanAgedemer.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanAgedemer.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -170,8 +170,8 @@
 			# code for debug using example
 			#horodatedebut="2012-01-01";horodatefin="2013-12-31";dc=c(107,108,101);
 			#taxons='2220';	stades=c('5','11','BEC','BER','IND');par=c('1786','1785','C001');silent=FALSE
-			if (!(is.numeric(limit1hm)|is.integer(limit1hm))) funout("limit1hm should be numeric or integer",arret=TRUE)
-			if (!(is.numeric(limit2hm)|is.integer(limit2hm))) funout("limit2hm should be numeric or integer",arret=TRUE)
+			if (!(is.numeric(limit1hm)|is.integer(limit1hm))) funout(gettext("limit1hm should be numeric or integer"),arret=TRUE)
+			if (!(is.numeric(limit2hm)|is.integer(limit2hm))) funout(gettext("limit2hm should be numeric or integer"),arret=TRUE)
 			
 			bilan_adm<-object
 			bilan_adm at dc=charge(bilan_adm at dc)
@@ -211,7 +211,7 @@
 			#bilan_adm<-b_carlot
 			bilan_adm<-object
 			if(nrow(bilan_adm at data)==0) {
-				funout("you are in deep shit", arret=TRUE)
+				funout(gettext("you are in deep shit"), arret=TRUE)
 			}   
 			adm=bilan_adm at data # on recupere le data.frame
 			if (is.na(as.numeric(bilan_adm at limit1hm@label))) stop("erreur interne")
@@ -253,7 +253,7 @@
 			if (exists("bilan_adm",envir_stacomi)) {
 				bilan_adm<-get("bilan_adm",envir_stacomi)
 			} else {      
-				if (!silent) funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+				if (!silent) funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 			}
 			dat<-bilan_adm at calcdata[["data"]]
 			# cols are using viridis::inferno(6,alpha=0.9)
@@ -275,7 +275,7 @@
 						ylab("Effectif")
 				print(p)
 				assign("p",p,envir=envir_stacomi)
-				funout("The graphical object is written is env_stacomi, type p<-get('p',envir=envir_stacomi))")
+				funout(gettext("The graphical object is written is env_stacomi, type p<-get('p',envir=envir_stacomi)"))
 				
 			}
 			######################################
@@ -291,7 +291,7 @@
 						facet_grid(ope_dic_identifiant~.)
 				print(p)
 				assign("p",p,envir=envir_stacomi)
-				funout("L'objet graphique est écrit dans l'environnement stacomi, tappez p<-get('p',envir=envir_stacomi))")
+				funout(gettext("The graphical object is written is env_stacomi, type p<-get('p',envir=envir_stacomi)"))
 			}
 					
 		})
@@ -307,7 +307,7 @@
 			if (exists("bilan_adm",envir_stacomi)) {
 				bilan_adm<-get("bilan_adm",envir_stacomi)
 			} else {      
-				if (!silent) funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+				if (!silent) funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 			}
 			dat<-bilan_adm at calcdata[["data"]]		
 			ndc=unique(dat$ope_dic_identifiant)
@@ -412,7 +412,7 @@
 						
 						
 						if (!silent){
-							funout(paste(gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,annee,"\n")))
+							funout(gettextf("Writing daily summary in the database %s \n",annee))
 						}
 # si l'utilisateur accepte de remplacer les valeurs				
 #progres<-get("progres",envir=envir_stacomi)
@@ -429,10 +429,8 @@
 					if (nrow(bil at data)>0)
 					{ 
 						if (!silent){
-							choice<-gWidgets::gconfirm(paste(gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.1), # Un bilan a deja ete ecrit dans la base)
-											unique(bil at data$bjo_horodateexport),
-											gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.2)),
-									handler=hconfirm) # voulez vous le remplacer ?
+							choice<-gWidgets::gconfirm(gettextf("A summary has already been written in the database the %s : Overwrite ?",unique(bil at data$bjo_horodateexport))
+							                           ,handler=hconfirm) # voulez vous le remplacer ?
 						} else {
 							hconfirm(h=NULL)
 						}
@@ -456,7 +454,7 @@
 								))		
 #	
 						
-						if (!silent) funout(paste(gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,"\n")))
+						if (!silent) funout(gettext("Writing daily summary in the database","\n"))
 						taxon= as.character(bilanMigration at taxons@data$tax_nom_latin)
 						stade= as.character(bilanMigration at stades@data$std_libelle)
 						DC=as.numeric(bilanMigration at dc@dc_selectionne)	

Modified: pkg/stacomir/R/BilanAnnuels.r
===================================================================
--- pkg/stacomir/R/BilanAnnuels.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanAnnuels.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -380,7 +380,7 @@
 					}
 				}
 			}    else     {
-				funout("No data")
+				funout(gettext("No data"))
 			}				
 		})
 
@@ -499,7 +499,7 @@
 				}
 				
 			}    else     {
-				funout("No data")
+				funout(gettext("No data"))
 			}	
 		})
 

Modified: pkg/stacomir/R/BilanArgentee.r
===================================================================
--- pkg/stacomir/R/BilanArgentee.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanArgentee.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -111,7 +111,7 @@
 			if (exists("refStades",envir_stacomi)) {
 				object at stades<-get("refStades",envir_stacomi)
 			} else {
-				funout("You need to choose a stage, clic on validate\n"),arret=TRUE)
+				funout(gettext("You need to choose a stage, clic on validate\n"),arret=TRUE)
 			}
 			if (exists("refpar",envir_stacomi)) {
 				object at par<-get("refpar",envir_stacomi)
@@ -288,7 +288,7 @@
 			if (exists("bilanArg",envir_stacomi)) {
 				bilanArg<-get("bilanArg",envir_stacomi)
 			} else {      
-				if (!silent) funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+				if (!silent) funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 			}
 			dat<-bilanArg at calcdata
 			# cols are using viridis::inferno(6,alpha=0.9)
@@ -605,7 +605,7 @@
 			if (exists("bilanArg",envir_stacomi)) {
 				bilanArg<-get("bilanArg",envir_stacomi)
 			} else {      
-				if (!silent) funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+				if (!silent) funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 			}
 			dat<-bilanArg at calcdata
 			# cols are using viridis::inferno(6,alpha=0.9)

Modified: pkg/stacomir/R/BilanConditionEnv.r
===================================================================
--- pkg/stacomir/R/BilanConditionEnv.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanConditionEnv.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -184,5 +184,5 @@
 	}
 	path=file.path(path.expand(get("datawd",envir=envir_stacomi)),paste("env_cond.csv",sep=""),fsep ="\\")
 	write.table(dat,path,sep=';',row.names=FALSE)
-	funout(paste(gettext(get("msg",envir=envir_stacomi)$funtable.1,path,"\n")))
+	funout(gettextf("writing of %s \n",path))
 }

Modified: pkg/stacomir/R/BilanEspeces.r
===================================================================
--- pkg/stacomir/R/BilanEspeces.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanEspeces.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -131,7 +131,7 @@
 			if (exists("refliste",envir_stacomi)) {      
 				bilanEspeces at liste<-get("refliste",envir_stacomi)      
 			} else {      
-				funout(gettext(get("msg",envir_stacomi)$ref.9, arret=TRUE))             
+				funout(gettext("You need to choose a size class\n"), arret=TRUE)             
 			} 
 			bilanEspeces<-connect(bilanEspeces)
 			
@@ -245,7 +245,7 @@
 	colnames(sumEspeces)[colnames(sumEspeces)=="Freq"]<-"Effectif" # pas forcement le m nb de colonnes	
 	path=file.path(normalizePath(path.expand(get("datawd",envir=envir_stacomi))),paste("tableEspece",now,".csv",sep=""),fsep ="\\")
 	write.table(sumEspeces,path,row.names=TRUE,col.names=TRUE,sep=";",append=FALSE)
-	funout(paste(gettext(get("msg",envir=envir_stacomi)$funtable.1,path,"\n")))
+	funout(gettextf("writing of %s \n",path))
 }
 
 #' Interface for BilanEspece class

Modified: pkg/stacomir/R/BilanFonctionnementDC.r
===================================================================
--- pkg/stacomir/R/BilanFonctionnementDC.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanFonctionnementDC.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -79,7 +79,7 @@
 			if (exists("refDC",envir_stacomi)) {
 				object at dc<-get("refDC",envir_stacomi)
 			} else {
-				funout("You need to choose a counting device, clic on validate\n"),arret=TRUE)				}     
+				funout(gettext("You need to choose a counting device, clic on validate\n"),arret=TRUE)				}     
 			
 			if (exists("bilanFonctionnementDC_date_debut",envir_stacomi)) {
 				object at horodatedebut@horodate<-get("bilanFonctionnementDC_date_debut",envir_stacomi)
@@ -218,7 +218,7 @@
 				t_periodefonctdispositif_per_mois$annee=strftime(as.POSIXlt(t_periodefonctdispositif_per_mois$tempsdebut),"%Y")
 				progress_bar$setText("All done.")
 				progress_bar$setFraction(1) 
-				if (is.null(main)) main<-paste(gettext(get("msg",envir_stacomi)$BilanFonctionnementDC.12,bilanFonctionnementDC at dc@dc_selectionne))
+				if (is.null(main)) main<-gettextf("Operation of the counting device %s",bilanFonctionnementDC at dc@dc_selectionne)
 				# graphic
 					#modification of the order
 				
@@ -397,7 +397,7 @@
 				#           PLOT OF TYPE BOX (plot.type=4)
 				#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
 			} else if (plot.type=="4"){
-				if (is.null(main)) main<-paste(gettext(get("msg",envir_stacomi)$BilanFonctionnementDC.5,bilanFonctionnementDC at dc@dc_selectionne))
+				if (is.null(main)) main<-gettext("Working of the counting device",bilanFonctionnementDC at dc@dc_selectionne)
 				
 				#bilanFonctionnementDC<-bfDC; require(RGtk2); require(lubridate);require(ggplot2);main=NULL;silent=FALSE;plot.type="4"
 				t_periodefonctdispositif_per=bilanFonctionnementDC at data
@@ -554,31 +554,31 @@
 			annee=paste(unique(strftime(as.POSIXlt(t_periodefonctdispositif_per$per_date_debut),"%Y")),collapse="+")
 			path1=file.path(path.expand(get("datawd",envir=envir_stacomi)),paste("t_periodefonctdispositif_per_DC_",bilanFonctionnementDC at dc@dc_selectionne,"_",annee,".csv",sep=""),fsep ="\\")
 			write.table(t_periodefonctdispositif_per,file=path1,row.names=FALSE,col.names=TRUE,sep=";")
-			funout(paste(gettext(get("msg",envir_stacomi)$BilanFonctionnementDC.14,path1,"\n")))
+			funout(gettext("Writing of %s \n",path1))
 			path1html<-file.path(path.expand(get("datawd",envir=envir_stacomi)),paste("t_periodefonctdispositif_per_DC_",bilanFonctionnementDC at dc@dc_selectionne,"_",annee,".html",sep=""),fsep ="\\")
-			funout(paste(gettext(get("msg",envir_stacomi)$BilanFonctionnementDC.14,path1html,get("msg",envir_stacomi)$BilanFonctionnementDC.15)))
+			funout(gettextf("Writing of %s this might take a while, please be patient …\n",path1html))
 			funhtml(t_periodefonctdispositif_per,
-					caption=paste("t_periodefonctdispositif_per_DC_",bilanFonctionnementDC at dc@dc_selectionne,"_",annee,sep=""),
+					caption=gettextf("t_periodefonctdispositif_per_DC_%s_%s",bilanFonctionnementDC at dc@dc_selectionne,annee),
 					top=TRUE,
 					outfile=path1html,
 					clipboard=FALSE,
 					append=FALSE,
 					digits=2
 			)
-			print(paste("summary statistics for DC=",bilanFonctionnementDC at dc@dc_selectionne))
-			print(paste("dc_code=",bilanFonctionnementDC at dc@data[bilanFonctionnementDC at dc@data$dc==bilanFonctionnementDC at dc@dc_selectionne,"dc_code"]))
+			print(gettextf("summary statistics for CD=%s",bilanFonctionnementDC at dc@dc_selectionne))
+			print(gettextf("dc_code=%s",bilanFonctionnementDC at dc@data[bilanFonctionnementDC at dc@data$dc==bilanFonctionnementDC at dc@dc_selectionne,"dc_code"]))
 			duree<-difftime(t_periodefonctdispositif_per$per_date_fin,t_periodefonctdispositif_per$per_date_debut,units="day")
 			sommes<-tapply(duree,t_periodefonctdispositif_per$per_tar_code,sum)
 			perc<-round(100*sommes/as.numeric(sum(duree)))
 			sommes<-round(sommes,2)
-			funout(gettext(get("msg",envir=envir_stacomi)$BilanFonctionnementDF.12))
+			funout(gettext("Duration in days (operation type):"))
 			funout(paste(gettext(get("msg",envir=envir_stacomi)$BilanFonctionnementDF.11),
 							" :",
 							sommes,"(",perc,"%)",sep=""))
 			sommes<-tapply(duree,t_periodefonctdispositif_per$per_etat_fonctionnement,sum)
 			perc<-round(100*sommes/as.numeric(sum(duree)))
 			sommes<-round(sommes,2)
-			funout(gettext(get("msg",envir=envir_stacomi)$BilanFonctionnementDF.13))
+			funout(gettext("Duration in days (operation):"))
 			funout(paste(rev(gettext(get("msg",envir=envir_stacomi)$BilanFonctionnementDC.11)),
 							" :",
 							sommes,"(",perc,"%)",sep=""))

Modified: pkg/stacomir/R/BilanFonctionnementDF.r
===================================================================
--- pkg/stacomir/R/BilanFonctionnementDF.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanFonctionnementDF.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -224,7 +224,7 @@
 				t_periodefonctdispositif_per_mois$annee=strftime(as.POSIXlt(t_periodefonctdispositif_per_mois$tempsdebut),"%Y")
 				progress_bar$setText("All done.")
 				progress_bar$setFraction(1) 
-				if (is.null(main)) main<-paste(gettext(get("msg",envir_stacomi)$BilanFonctionnementDF.7,bilanFonctionnementDF at df@df_selectionne))
+				if (is.null(main)) main<-gettextf("Fishway operation %s",bilanFonctionnementDF at df@df_selectionne)
 				# graphic
 				t_periodefonctdispositif_per_mois=t_periodefonctdispositif_per_mois[order(t_periodefonctdispositif_per_mois$per_tar_code, decreasing = TRUE),]
 				
@@ -375,7 +375,7 @@
 				#           PLOT OF TYPE BOX (plot.type=4)
 				#&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
 			} else if (plot.type=="4"){
-				if (is.null(main)) main<-paste(gettext(get("msg",envir_stacomi)$BilanFonctionnementDF.7,bilanFonctionnementDF at df@df_selectionne))
+				if (is.null(main)) main<-gettextf("Fishway operation %s",bilanFonctionnementDF at df@df_selectionne)
 				
 				#bilanFonctionnementDF<-bfDF; require(RGtk2); require(lubridate);require(ggplot2);main=NULL;silent=FALSE;plot.type="4"
 				t_periodefonctdispositif_per=bilanFonctionnementDF at data
@@ -535,9 +535,9 @@
 			annee=paste(unique(strftime(as.POSIXlt(t_periodefonctdispositif_per$per_date_debut),"%Y")),collapse="+")
 			path1=file.path(path.expand(get("datawd",envir=envir_stacomi)),paste("t_periodefonctdispositif_per_DF_",bilanFonctionnementDF at df@df_selectionne,"_",annee,".csv",sep=""),fsep ="\\")
 			write.table(t_periodefonctdispositif_per,file=path1,row.names=FALSE,col.names=TRUE,sep=";")
-			if(!silent) funout(paste(gettext(get("msg",envir=envir_stacomi)$FonctionnementDC.14,path1,"\n")))
+			if(!silent) funout(gettextf("Writing of %s \n",path1))
 			path1html=file.path(path.expand(get("datawd",envir=envir_stacomi)),paste("t_periodefonctdispositif_per_DF_",bilanFonctionnementDF at df@df_selectionne,"_",annee,".html",sep=""),fsep ="\\")
-			if(!silent) funout(paste(gettext(get("msg",envir=envir_stacomi)$FonctionnementDC.14,path1html,get("msg",envir=envir_stacomi)$BilanFonctionnementDF.15)))
+			if(!silent) funout(gettextf("Writing of %s this might take a while, please be patient …\n",path1html))
 			funhtml(t_periodefonctdispositif_per,
 					caption=paste("t_periodefonctdispositif_per_DF_",bilanFonctionnementDF at df@df_selectionne,"_",annee,sep=""),
 					top=TRUE,

Modified: pkg/stacomir/R/BilanMigration.r
===================================================================
--- pkg/stacomir/R/BilanMigration.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanMigration.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -126,7 +126,7 @@
 			bilanMigration<-object
 			#bilanMigration<-bM_Arzal
 			#pour l'instant ne lancer que si les fenetre sont fermees
-			# funout("lancement updateplot \n")
+			# funout(gettext("launching updateplot \n"))
 			if (exists("refDC",envir_stacomi)) {
 				bilanMigration at dc<-get("refDC",envir_stacomi)
 				dc<-bilanMigration at dc@dc_selectionne
@@ -208,7 +208,7 @@
 			#bilanMigration<-bM_Arzal_civ
 			#negative=FALSE;silent=FALSE
 			if (!silent){
-				funout(gettext(get("msg",envir_stacomi)$BilanMigration.2))
+				funout(gettext("Starting migration summary ... be patient\n"))
 			}
 			bilanMigration<-object
 			
@@ -273,15 +273,15 @@
 				bilanMigration at calcdata<-lestableaux
 				assign("bilanMigration",bilanMigration,envir_stacomi)
 				if (!silent){
-					funout(gettext(get("msg",envir_stacomi)$BilanMigration.3))
-					funout(gettext(get("msg",envir_stacomi)$BilanMigration.4))
+					funout(gettext("\"Summary object is stocked into envir_stacomi environment : write bilanMigration=get(bilanMigration\",envir_stacomi)\"\n"))
+					funout(gettext("To access calculated data, type bilanMigration at calcdata\n"))
 				}
 				
 				
 				
 			} else {
 				# no fish...
-				funout(gettext(get("msg",envir_stacomi)$BilanMigration.10))
+				funout(gettext("There are no values for the taxa, stage and selected period\n"))
 			}
 			return(bilanMigration)
 		})
@@ -299,7 +299,7 @@
 	} 
 	else 
 	{      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigrationMult.2),arret=TRUE)
+		funout(gettext("Please select DC, taxa, and stages for a complete command\n"),arret=TRUE)
 	}
 }
 
@@ -347,7 +347,7 @@
 			if (exists("bilanMigration",envir_stacomi)) {
 				bilanMigration<-get("bilanMigration",envir_stacomi)
 			} else {      
-				funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+				funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 			}
 			################################################################
 			#                 standard plot
@@ -439,8 +439,8 @@
 					
 					p<-ggplot(grdata)+
 							geom_line(aes(x=debut_pas,y=Cumsum,colour=mois))+
-							ylab(gettext(get("msg",envir_stacomi)$BilanMigration.6))+
-							ggtitle(paste(gettext(get("msg",envir_stacomi)$BilanMigration.7," ",dis_commentaire,", ",taxon,", ",stade,", ",annee,sep=""))) + 
+							ylab(gettext("Cumulative migration"))+
+							ggtitle(gettextf("Cumulative count %s, %s, %s, %s",dis_commentaire,taxon,stade,annee)) + 
 							theme(plot.title = element_text(size=10,colour="navy"))+
 							scale_colour_manual(values=c("01"="#092360",
 											"02"="#1369A2",
@@ -457,7 +457,7 @@
 									))
 					print(p)	
 				} else {
-					funout(gettext(get("msg",envir_stacomi)$BilanMigration.8))
+					funout(gettext("Warning, this function applies for annual summaries\n"))
 				}
 			} else {
 				stop("unrecognised plot.type argument, plot.type should either be standard or step")
@@ -476,7 +476,7 @@
 	if (exists("bilanMigration",envir_stacomi)) {
 		bilanMigration<-get("bilanMigration",envir_stacomi)
 	} else {      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	plot(bilanMigration,plot.type="standard")
 	
@@ -492,7 +492,7 @@
 	if (exists("bilanMigration",envir_stacomi)) {
 		bilanMigration<-get("bilanMigration",envir_stacomi)
 	} else {      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	plot(bilanMigration,plot.type="step")
 }
@@ -510,7 +510,7 @@
 	} 
 	else 
 	{      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	summary(bilanMigration)
 	
@@ -545,14 +545,14 @@
 	if (exists("bilanMigration",envir_stacomi)) {
 		bilanMigration<-get("bilanMigration",envir_stacomi)
 	} else {      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	# ecriture du bilan journalier, ecrit aussi le bilan mensuel
 	database_expected<-get("database_expected",envir=envir_stacomi)
 	if (database_expected) {
 		write_database(bilanMigration,silent=TRUE)
 	}	else {
-		funout("no bilan written to database : database_expected argument=FALSE")
+		funout(gettext("no bilan written to database : database_expected argument=FALSE"))
 	}
 	
 }
@@ -633,7 +633,7 @@
 				
 				
 				if (!silent){
-					funout(paste(gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,annee,"\n")))
+					funout(gettextf("Writing daily summary in the database %s \n",annee))
 				}
 # si l'utilisateur accepte de remplacer les valeurs				
 #progres<-get("progres",envir=envir_stacomi)
@@ -650,10 +650,8 @@
 			if (nrow(bil at data)>0)
 			{ 
 				if (!silent){
-					choice<-gWidgets::gconfirm(paste(gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.1), # Un bilan a deja ete ecrit dans la base)
-									unique(bil at data$bjo_horodateexport),
-									gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.2)),
-							handler=hconfirm) # voulez vous le remplacer ?
+					choice<-gWidgets::gconfirm(gettextf("A summary has already been written in the database the :%s Overwrite ?",unique(bil at data$bjo_horodateexport)),
+							handler=hconfirm)
 				} else {
 					hconfirm(h=NULL)
 				}
@@ -677,7 +675,7 @@
 						))		
 #	
 				
-				if (!silent) funout(paste(gettext(get("msg",envir=envir_stacomi)$fn_EcritBilanJournalier.5,"\n")))
+				if (!silent) funout(gettext("Writing daily summary in the database"))
 				taxon= as.character(bilanMigration at taxons@data$tax_nom_latin)
 				stade= as.character(bilanMigration at stades@data$std_libelle)
 				DC=as.numeric(bilanMigration at dc@dc_selectionne)	

Modified: pkg/stacomir/R/BilanMigrationConditionEnv.r
===================================================================
--- pkg/stacomir/R/BilanMigrationConditionEnv.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanMigrationConditionEnv.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -145,11 +145,10 @@
 		for (sta in as.character(stations$stm_libelle)){
 			tableauCEst<-tableauCE[tableauCE$stm_libelle==sta,] #tableau CE d'une station
 			if (length(unique(tableauCEst$env_date_debutchar))!=length(tableauCEst$env_date_debutchar)) {
-				funout(paste(gettext(get("msg",envir=envir_stacomi)$BilanMigrationConditionEnv.7),
+				funout(gettextf("Attention, on one station :%s there are several entries for the same day :%s only the first value will be incuded in the summary\n",
 								sta,
-								gettext(get("msg",envir=envir_stacomi)$BilanMigrationConditionEnv.8),
-								paste(unique(tableauCEst$env_date_debutchar[duplicated(tableauCEst$env_date_debutchar)]),sep=""),
-								gettext(get("msg",envir=envir_stacomi)$BilanMigrationConditionEnv.9),arret=FALSE))
+								paste(unique(tableauCEst$env_date_debutchar[duplicated(tableauCEst$env_date_debutchar)]),sep="")),
+							arret=FALSE)
 				tableauCEst<-tableauCEst[induk(tableauCEst$env_date_debutchar),]
 			}
 			
@@ -172,11 +171,10 @@
 			# le merge ci dessous est l'equivalent d'une jointure gauche (LEFT JOIN)
 			tableau<-merge(tableau,tableauCEst,by.x = "time.sequencechar", by.y = "env_date_debutchar",  all.x = TRUE)
 			# les donnees sont normalement collees dans le tableau dans une nouvelle colonne et aux dates correspondantes
-			if (length(time.sequence)!=nrow(tableau)) funout(paste(gettext(get("msg",envir=envir_stacomi)$BilanMigrationConditionEnv.5),
+			if (length(time.sequence)!=nrow(tableau)) funout(gettextf("The number of lines of the environmental conditions table (%s) doesn't fit the duration of the migration summary  (%s)\n",
 								nrow(tableau),
-								gettext(get("msg",envir=envir_stacomi)$BilanMigrationConditionEnv.6),
-								length(time.sequence),
-								")\n"),arret=TRUE)
+								length(time.sequence)),
+								arret=TRUE)
 			#si la jointure e rajoute des lignes ea craint je ne sais pas comment se fera le traitement
 		} # end for
 		taxon= as.character(bilanMigrationConditionEnv at bilanMigration@taxons at data$tax_nom_latin)

Modified: pkg/stacomir/R/BilanMigrationInterAnnuelle.r
===================================================================
--- pkg/stacomir/R/BilanMigrationInterAnnuelle.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanMigrationInterAnnuelle.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -129,7 +129,7 @@
 			if (exists("refDC",envir_stacomi)) {
 				bilanMigrationInterAnnuelle at dc<-get("refDC",envir_stacomi)
 			} else {
-				funout("You need to choose a counting device, clic on validate\n"),arret=TRUE)
+				funout(gettext("You need to choose a counting device, clic on validate\n"),arret=TRUE)
 			}
 			if (exists("refTaxon",envir_stacomi)) {
 				bilanMigrationInterAnnuelle at taxons<-get("refTaxon",envir_stacomi)

Modified: pkg/stacomir/R/BilanMigrationMult.r
===================================================================
--- pkg/stacomir/R/BilanMigrationMult.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanMigrationMult.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -248,8 +248,8 @@
 			bilanMigrationMult at calcdata<-lestableaux
 			assign("bilanMigrationMult",bilanMigrationMult,envir_stacomi)
 			if (!silent){
-				funout(gettext(get("msg",envir_stacomi)$BilanMigrationMult.3))
-				funout(gettext(get("msg",envir_stacomi)$BilanMigrationMult.4))
+				funout(gettext("\"The summary object is stored in environment envir_stacomi, write bilanMigrationMult=get('bilanMigrationMult',envir_stacomi)\\n\"\"\n"))
+				funout(gettext("Raw data are stored in bilanMigrationMult at data, processed data in bilanMigrationMult at calcdata\\n\n"))
 			}
 			return(bilanMigrationMult)
 		})
@@ -354,7 +354,7 @@
 	if (exists("bilanMigrationMult",envir_stacomi)) {
 		bilanMigrationMult<-get("bilanMigrationMult",envir_stacomi)
 	} else {      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	plot(x=bilanMigrationMult,plot.type="standard")
 }
@@ -518,7 +518,7 @@
 				
 				p<-ggplot(grdata_without_hole)+
 						geom_step(aes(x=debut_pas,y=cumsum,colour=mois))+
-						ylab(gettext(get("msg",envir_stacomi)$BilanMigration.6))+
+						ylab(gettext("Cumulative migration"))+
 						theme(plot.title=element_text(size=10,colour="deepskyblue"))+
 						xlab("mois")+
 						scale_colour_manual(values=c("01"="#092360",
@@ -534,7 +534,7 @@
 										"11"="#912E0F",
 										"12"="#33004B"
 								))+
-						ggtitle(paste(gettext(get("msg",envir_stacomi)$BilanMigration.7,"dc=",dis_commentaire,", tax=",lestaxons,", srd=",lesstades,", ",annee,sep="") ))  
+						ggtitle(gettextf("Cumulative count %s, %s, %s, %s",dis_commentaire,lestaxons,lesstades,annee))  
 				print(p)	
 			}
 #==========================type=3=============================
@@ -618,7 +618,7 @@
 	if (exists("bilanMigrationMult",envir_stacomi)) {
 		bilanMigrationMult<-get("bilanMigrationMult",envir_stacomi)
 	} else {      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	plot(bilanMigrationMult,plot.type="step")
 }
@@ -634,7 +634,7 @@
 	if (exists("bilanMigrationMult",envir_stacomi)) {
 		bilanMigrationMult<-get("bilanMigrationMult",envir_stacomi)
 	} else {      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	plot(bilanMigrationMult,plot.type="multiple")
 }
@@ -656,7 +656,7 @@
 	} 
 	else 
 	{      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigration.5),arret=TRUE)
+		funout(gettext("You need to launch computation first, clic on calc\n"),arret=TRUE)
 	}
 	summary(bilanMigrationMult)
 }
@@ -737,7 +737,7 @@
 	} 
 	else 
 	{      
-		funout(gettext(get("msg",envir_stacomi)$BilanMigrationMult.2),arret=TRUE)
+		funout(gettext("Please select DC, taxa, and stages for a complete command\n"),arret=TRUE)
 	}
 }
 

Modified: pkg/stacomir/R/BilanMigrationPar.r
===================================================================
--- pkg/stacomir/R/BilanMigrationPar.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/BilanMigrationPar.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -140,7 +140,7 @@
 			bilanMigrationPar at valeurs_possibles<-res[[2]]   # definitions des niveaux de parametres qualitatifs rencontres.
 			# funout("\n")
 			#	assign("data",data,envir_stacomi)
-			#funout("la table bilan migration est stockee dans l'environnement envir_stacomi\n")
+			#funout(gettext("the migration summary table is stored in envir_stacomi\n"))
 			#data<-get("data",envir_stacomi)
 			# chargement des donnees suivant le format chargement_donnees1  
 			bilanMigrationPar at time.sequence=seq.POSIXt(from=min(data$debut_pas),to=max(data$debut_pas),by=as.numeric(bilanMigrationPar at pasDeTemps@stepDuration)) # il peut y avoir des lignes repetees poids effectif
@@ -253,10 +253,10 @@
 				annee=unique(strftime(as.POSIXlt(bilanMigrationPar at time.sequence),"%Y"))
 				path1=file.path(path.expand(get("datawd",envir=envir_stacomi)),paste(nmvarqan,"_mensuel_",nomdc,"_",bilanMigrationPar at taxons@data$tax_nom_commun,"_",bilanMigrationPar at stades@data$std_libelle,"_",annee,".csv",sep=""),fsep ="\\")
 				write.table(table,file=path1,row.names=FALSE,col.names=TRUE,sep=";")
-				funout(paste(gettext(get("msg",envir=envir_stacomi)$BilanMigrationPar.7,path1,"\n")) )
+				funout(gettextf("Writing of %s",path1))
 				path1=file.path(path.expand(get("datawd",envir=envir_stacomi)),paste(nmvarqan,"_journalier_",nomdc,"_",bilanMigrationPar at taxons@data$tax_nom_commun,"_",bilanMigrationPar at stades@data$std_libelle,"_",annee,".csv",sep=""),fsep ="\\")
 				write.table(bilanMigrationPar at data,file=path1,row.names=FALSE,col.names=TRUE,sep=";")
-				funout(paste(gettext(get("msg",envir=envir_stacomi)$BilanMigrationPar.7,path1,"\n")))
+				funout(gettextf("Writing of %s",path1))
 			} # end plot.type summary 
 		})
 

Modified: pkg/stacomir/R/Bilan_poids_moyen.r
===================================================================
--- pkg/stacomir/R/Bilan_poids_moyen.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/Bilan_poids_moyen.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -194,7 +194,7 @@
 							"duree","datemoy"),
 					c("lot","date","date_fin","effectif","poids","w","time.sequence","date"))
 			# correction de manques d'effectifs dans la base
-			if (sum(is.na(donnees$effectif))>0) warnings(paste(gettext("size is missing, lots", paste(unique(donnees$lot[is.na(donnees$effectif)]),collapse=" "))))
+			if (sum(is.na(donnees$effectif))>0) warnings(gettextf("size is missing, lots %s",paste(unique(donnees$lot[is.na(donnees$effectif)]),collapse=" ")))
 			bilPM at calcdata[["data"]]<-donnees[,c(8,6,4,1)]
 			bilPM at calcdata[["coe"]]<-coeff[order(coeff$date),c(10,9)]
 			assign("bilan_poids_moyen",bilPM,envir=envir_stacomi)
@@ -364,12 +364,12 @@
 				
 				print(p)
 				assign("p", p,envir=envir_stacomi)	
-				if (!silent) funout("ggplot object p assigned to envir_stacomi")
+				if (!silent) funout(gettext("ggplot object p assigned to envir_stacomi"))
 				
 				
 				#fm <- stats::nls(formula=w ~ a*cos(2*pi*(doy-T)/365)+b ,data=don,start=list(a=0.1,T=73,b=0.3))
 				#pred<-stats::predict(fm, newdata=newcoe)
-				#com=paste(gettext(get("msg",envir_stacomi)$Bilan_poids_moyen.13),paste("a=",round(coef(fm),2)[1],"T=",round(coef(fm),2)[2],"b=",round(coef(fm),2)[3],collapse=""))
+				#com=gettextf("sinusoidal model, a.cos(2.pi.(jour-T)/365)+b a=%s t=%s b=%s",round(coef(fm),2)[1],round(coef(fm),2)[2],round(coef(fm),2)[3])
 				#plot(bilPM,plot.type=2)
 				#points(as.POSIXct(newcoe$date),pred, col="magenta")
 				#legend("topright",c("Obs.", "Coeff base","Mod"), col=c("black","cyan","magenta"),pch="o",cex = 0.8)
@@ -484,7 +484,7 @@
 hexp=function(h,...){
 	# export d'un tableau que l'on peut ecrire dans la base
 	gWidgets::gconfirm(gettext("Do you want to write data in the database ?"),
-			title=gettext("Attention!"),
+			title=gettext("Warning!"),
 			handler=hreg,action="export")
 	bilPM<-get("bilan_poids_moyen",envir=envir_stacomi)
 	write_database(bilPM)

Modified: pkg/stacomir/R/Bilan_stades_pigm.r
===================================================================
--- pkg/stacomir/R/Bilan_stades_pigm.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/Bilan_stades_pigm.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -492,13 +492,12 @@
 	}
 	funout(gettext("Loading data from database"))
 	dates<-bilan_stades_pigm at dates
-	bilan_stades_pigm at labelgraphstades<-paste(gettext("Pigmentation stages"),
+	bilan_stades_pigm at labelgraphstades<-gettextf("Pigmentation stages %s and incoming dates in estuary",
 			if(strftime(as.POSIXlt(dates[1]),"%Y")==
 							strftime(as.POSIXlt(dates[length(dates)]),"%Y")) {
 						strftime(as.POSIXlt(dates[1]),"%Y")} else { paste(
 								strftime(as.POSIXlt(dates[1]),"%Y"),"-",
-								strftime(as.POSIXlt(dates[length(dates)]),"%Y"))},
-			gettext("and incoming dates in estuary"))
+								strftime(as.POSIXlt(dates[length(dates)]),"%Y"))})
 	bilan_stades_pigm at labelretro=gettext("incoming dates in estuary")
 	enabled(toolbarlist[["SetTitle"]])<-TRUE
 	enabled(toolbarlist[["Graph"]])<-TRUE

Modified: pkg/stacomir/R/PasdeTemps.r
===================================================================
--- pkg/stacomir/R/PasdeTemps.r	2017-01-27 08:35:25 UTC (rev 253)
+++ pkg/stacomir/R/PasdeTemps.r	2017-01-27 11:48:16 UTC (rev 254)
@@ -317,7 +317,7 @@
 							object at stepDuration<<-as.numeric(LesPasDeTemps$ValeurPasDeTemps[LesPasDeTemps$LabelPasDeTemps%in%pas])
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/stacomir -r 254


More information about the Stacomir-commits mailing list