[Stacomir-commits] r259 - in pkg: stacomir/R stacomir/inst stacomir/inst/config stacomir/inst/examples stacomir/inst/po stacomir/inst/po/fr stacomir/inst/po/fr/LC_MESSAGES stacomir/inst/tests/testthat stacomir/man stacomir/po stacomirtools/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jan 31 09:19:06 CET 2017


Author: briand
Date: 2017-01-31 09:19:06 +0100 (Tue, 31 Jan 2017)
New Revision: 259

Added:
   pkg/stacomir/inst/po/
   pkg/stacomir/inst/po/fr/
   pkg/stacomir/inst/po/fr/LC_MESSAGES/
   pkg/stacomir/inst/po/fr/LC_MESSAGES/R-stacomiR.mo
   pkg/stacomir/inst/po/fr/LC_MESSAGES/R-stacomiR_fr_FR.mo
   pkg/stacomir/inst/tests/testthat/test-08BilanArgentee.R
   pkg/stacomir/man/model-Bilan_poids_moyen-method.Rd
   pkg/stacomir/po/R-stacomiR_fr_FR.mo
   pkg/stacomir/po/R-stacomiR_fr_FR.po
Removed:
   pkg/stacomir/inst/po/R-stacomiR.pot
   pkg/stacomir/inst/po/fr_FR.mo
   pkg/stacomir/inst/po/fr_FR.po
   pkg/stacomir/man/model-BilanAnnuels-method.Rd
   pkg/stacomir/po/fr_FR.mo
   pkg/stacomir/po/fr_FR.po
Modified:
   pkg/stacomir/R/BilanAgedemer.r
   pkg/stacomir/R/BilanAnnuels.r
   pkg/stacomir/R/BilanEspeces.r
   pkg/stacomir/R/BilanFonctionnementDC.r
   pkg/stacomir/R/BilanFonctionnementDF.r
   pkg/stacomir/R/BilanMigrationInterAnnuelle.r
   pkg/stacomir/R/BilanMigrationMult.r
   pkg/stacomir/R/Bilan_carlot.r
   pkg/stacomir/R/PasDeTempsJournalier.r
   pkg/stacomir/R/PasdeTemps.r
   pkg/stacomir/R/RefAnnee.r
   pkg/stacomir/R/RefDC.r
   pkg/stacomir/R/RefDF.r
   pkg/stacomir/R/RefStades.r
   pkg/stacomir/R/RefStationMesure.r
   pkg/stacomir/R/RefTaxon.r
   pkg/stacomir/R/Refpar.r
   pkg/stacomir/R/Refparqual.r
   pkg/stacomir/R/create_generic.r
   pkg/stacomir/R/fungraph.r
   pkg/stacomir/R/funtable.r
   pkg/stacomir/R/interface_BilanMigrationConditionEnv.r
   pkg/stacomir/R/interface_BilanMigrationInterannuelle.r
   pkg/stacomir/R/interface_BilanMigrationMult.r
   pkg/stacomir/R/interface_BilanMigrationPar.r
   pkg/stacomir/R/stacomi.r
   pkg/stacomir/inst/config/testthat.R
   pkg/stacomir/inst/examples/bilanMigrationInterannuelle_example.R
   pkg/stacomir/inst/examples/bilancarlot_example.R
   pkg/stacomir/inst/tests/testthat/test-00stacomir.R
   pkg/stacomir/inst/tests/testthat/test-00zRefclasses.R
   pkg/stacomir/inst/tests/testthat/test-01BilanMigrationMult.R
   pkg/stacomir/inst/tests/testthat/test-02BilanMigration.R
   pkg/stacomir/inst/tests/testthat/test-05Bilan_carlot.R
   pkg/stacomir/inst/tests/testthat/test-06Bilan_MigrationInterAnnuelle.R
   pkg/stacomir/inst/tests/testthat/test-07BilanAgedemer.R
   pkg/stacomir/man/BilanAgedemer-class.Rd
   pkg/stacomir/man/BilanMigrationInterAnnuelle-class.Rd
   pkg/stacomir/man/Bilan_carlot-class.Rd
   pkg/stacomir/man/RefTextBox-class.Rd
   pkg/stacomir/man/calcule-Bilan_carlot-method.Rd
   pkg/stacomir/man/calcule.Rd
   pkg/stacomir/man/charge-RefTextBox-method.Rd
   pkg/stacomir/man/charge.Rd
   pkg/stacomir/man/charge_avec_filtre.Rd
   pkg/stacomir/man/charge_complement.Rd
   pkg/stacomir/man/choice-RefAnnee-method.Rd
   pkg/stacomir/man/choice-RefStationMesure-method.Rd
   pkg/stacomir/man/choice-RefTextBox-method.Rd
   pkg/stacomir/man/choice.Rd
   pkg/stacomir/man/choice_c-RefAnnee-method.Rd
   pkg/stacomir/man/choice_c-RefTextBox-method.Rd
   pkg/stacomir/man/choice_c.Rd
   pkg/stacomir/man/choicemult.Rd
   pkg/stacomir/man/createmessage.Rd
   pkg/stacomir/man/envir_stacomi.Rd
   pkg/stacomir/man/getvalue.Rd
   pkg/stacomir/man/model.Rd
   pkg/stacomir/man/out.Rd
   pkg/stacomir/man/supprime.Rd
   pkg/stacomir/man/write_database.Rd
   pkg/stacomir/po/R-stacomiR.pot
   pkg/stacomirtools/R/ConnectionODBC.r
   pkg/stacomirtools/R/RequeteODBC.r
Log:


Modified: pkg/stacomir/R/BilanAgedemer.r
===================================================================
--- pkg/stacomir/R/BilanAgedemer.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanAgedemer.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -182,7 +182,7 @@
 			bilan_adm at taxons<-charge_avec_filtre(object=bilan_adm at taxons,bilan_adm at dc@dc_selectionne)			
 			bilan_adm at taxons<-choice_c(bilan_adm at taxons,taxons)
 			bilan_adm at stades<-charge_avec_filtre(object=bilan_adm at stades,bilan_adm at dc@dc_selectionne,bilan_adm at taxons@data$tax_code)	
-			bilan_adm at stades<-choice_c(bilan_adm at stades,stades)
+			bilan_adm at stades<-choice_c(bilan_adm at stades,stades,silent=silent)
 			bilan_adm at par<-charge_avec_filtre(object=bilan_adm at par,bilan_adm at dc@dc_selectionne,bilan_adm at taxons@data$tax_code,bilan_adm at stades@data$std_code)	
 			bilan_adm at par<-choice_c(bilan_adm at par,par,silent=silent)
 			bilan_adm at horodatedebut<-choice_c(object=bilan_adm at horodatedebut,

Modified: pkg/stacomir/R/BilanAnnuels.r
===================================================================
--- pkg/stacomir/R/BilanAnnuels.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanAnnuels.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -67,7 +67,7 @@
 				funout(gettext("You need to choose the ending year\n"),arret=TRUE)
 			}
 			assign("bilanAnnuels",bilA,envir_stacomi)
-			funout(gettext("\"The object BilanAnnuels is stored in the stacomi environment, type bilA <-get(\"bilanAnnuels\",envir_stacomi)\"")
+			funout(gettext("The object BilanAnnuels is stored in the stacomi environment, type bilA <-get('bilanAnnuels',envir_stacomi)"))
 			return(bilA)
 			
 			

Modified: pkg/stacomir/R/BilanEspeces.r
===================================================================
--- pkg/stacomir/R/BilanEspeces.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanEspeces.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -109,7 +109,7 @@
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 #' @export
 setMethod("charge",signature=signature("BilanEspeces"),definition=function(object){
-			funout(gettext("Checking objects and launching query\n")
+			funout(gettext("Checking objects and launching query\n"))
 			bilanEspeces<-object
 			if (exists("refDC",envir_stacomi)) {
 				bilanEspeces at dc<-get("refDC",envir_stacomi)

Modified: pkg/stacomir/R/BilanFonctionnementDC.r
===================================================================
--- pkg/stacomir/R/BilanFonctionnementDC.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanFonctionnementDC.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -230,7 +230,7 @@
 						ylab(gettext("duration"))+
 						xlab(gettext("month"))+						
 						geom_bar(stat='identity')+
-						scale_fill_manual(gettext("type_oper.",values = c("#FF6700","#EE1874", "#9E0142","#76BEBE","#999999")))+
+						scale_fill_manual(gettext("type_oper."),values = c("#FF6700","#EE1874", "#9E0142","#76BEBE","#999999"))+
 						theme(
 								plot.background = element_rect(fill ="white"),
 								panel.background = element_rect(fill="white"),
@@ -253,7 +253,7 @@
 						ylab(gettext("duration"))+
 						xlab(gettext("month"))+									
 						geom_bar(stat='identity',aes(fill=per_etat_fonctionnement))+
-						scale_fill_manual(gettext("operation",values = c("#0F313A","#CEB99A")   )) +
+						scale_fill_manual(gettext("operation"),values = c("#0F313A","#CEB99A"))+
 						theme(
 								plot.background = element_rect(fill ="white"),
 								panel.background = element_rect(fill="white"),

Modified: pkg/stacomir/R/BilanFonctionnementDF.r
===================================================================
--- pkg/stacomir/R/BilanFonctionnementDF.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanFonctionnementDF.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -246,7 +246,7 @@
 						xlab(gettext("month"))+						
 						ggtitle(main)+
 						geom_bar(stat='identity',aes(fill=per_etat_fonctionnement))+
-						scale_fill_manual(gettext("operation",values = c("#E41A1C","#4DAF4A"))) 
+						scale_fill_manual(gettext("operation"),values = c("#E41A1C","#4DAF4A")) 
 				
 				if (plot.type=="1")
 					print(g)

Modified: pkg/stacomir/R/BilanMigrationInterAnnuelle.r
===================================================================
--- pkg/stacomir/R/BilanMigrationInterAnnuelle.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanMigrationInterAnnuelle.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -256,7 +256,7 @@
 							scale_x_datetime(name="date")
 					print(g)
 					assign("g",g,envir=envir_stacomi)
-					funout(gettext("\"Writing the graphical object into envir_stacomi environment : write g=get(g\",envir_stacomi)\"\n"))
+					if (!silent) funout(gettext("\"Writing the graphical object into envir_stacomi environment : write g=get(g\",envir_stacomi)\"\n"))
 					#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 				} else if (plot.type=="standard"){
 					dat=bilanMigrationInterAnnuelle at data
@@ -300,7 +300,7 @@
 						g<-g+theme_bw()+ theme(legend.key = element_blank())
 						print(g, vp=vplayout(1,1)) 
 						assign(paste("g",1,sep=""),g,envir_stacomi)
-						funout(gettextf("Writing the graphical object into envir_stacomi environment : write g=get(gi\",envir_stacomi) with i=%s",paste(1:length(the_choice),collapse=",")))
+						if (!silent) funout(gettextf("Writing the graphical object into envir_stacomi environment : write g=get(gi\",envir_stacomi) with i=%s",paste(1:length(the_choice),collapse=",")))
 						
 						
 					} # end if					
@@ -339,7 +339,7 @@
 					tmp<-dat[as.numeric(as.character(dat$annee))==as.numeric(the_choice),]
 					g <- g+geom_step(aes(col=annee,size=total_annuel))
 					g <- g+geom_step(data=tmp,col="black",lty=2)
-					g<-g+labs(title=gettextf("%s %s, Cumulated numbers %s"bilanMigrationInterAnnuelle at taxons@data$tax_nom_latin,bilanMigrationInterAnnuelle at stades@data$std_libelle,amplitude))
+					g<-g+labs(title=gettextf("%s %s, Cumulated numbers %s",bilanMigrationInterAnnuelle at taxons@data$tax_nom_latin,bilanMigrationInterAnnuelle at stades@data$std_libelle,amplitude))
 					g<-g+scale_y_continuous(name=gettext("Annual migration percentage"))
 					g<-g+scale_x_date(name=gettext("date"),date_breaks="months", 
 							date_minor_breaks="weeks", 
@@ -348,7 +348,7 @@
 					g<-g+scale_colour_hue(name=gettext("year"),l=70, c=150)# annee
 					print(g) 
 					assign("g",g,envir_stacomi)
-					funout(gettext("\"Writing the graphical object into envir_stacomi environment : write g=get(g\",envir_stacomi)\"\n"))	
+					if (!silent) funout(gettext("\"Writing the graphical object into envir_stacomi environment : write g=get(g\",envir_stacomi)\"\n"))	
 					#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 				} else if (plot.type=="barchart"){	
 					dat=bilanMigrationInterAnnuelle at data
@@ -434,7 +434,7 @@
 						g<-g+ theme_minimal() 
 						print(g, vp=vplayout(1,1)) 
 						assign(paste("g",1,sep=""),g,envir_stacomi)
-						funout(gettextf("\"Writing the graphical object into envir_stacomi environment : write g=get(gi\",envir_stacomi) with \" i=%s",paste(1:length(the_choice),collapse=",")))
+						if (!silent) funout(gettextf("\"Writing the graphical object into envir_stacomi environment : write g=get(gi\",envir_stacomi) with \" i=%s",paste(1:length(the_choice),collapse=",")))
 						
 					} # end if
 					
@@ -509,7 +509,7 @@
 						g<-g+ theme_minimal() 
 						print(g, vp=vplayout(1,1)) 
 						assign(paste("g",1,sep=""),g,envir_stacomi)
-						funout(gettextf("\"Writing the graphical object into envir_stacomi environment : write g=get(gi\",envir_stacomi) with \" i=%s",paste(1:length(the_choice),collapse=",")))
+						if (!silent) funout(gettextf("\"Writing the graphical object into envir_stacomi environment : write g=get(gi\",envir_stacomi) with \" i=%s",paste(1:length(the_choice),collapse=",")))
 						
 					} # end if
 					#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -557,10 +557,10 @@
 						g<-g+ theme_minimal() 
 						print(g)
 						assign(paste("g",sep=""),g,envir_stacomi)
-						funout(gettext("\"Writing the graphical object into envir_stacomi environment : write g=get(g\",envir_stacomi)\"\n"))
+						if (!silent) funout(gettext("\"Writing the graphical object into envir_stacomi environment : write g=get(g\",envir_stacomi)\"\n"))
 						
 					}    else     {
-						funout(gettext("Warning : you have to complete a migration summary for at least one of the selected year before launching a inter-annual summary"))
+						if (!silent) funout(gettext("Warning : you have to complete a migration summary for at least one of the selected year before launching a inter-annual summary"))
 					}
 					
 				} 	 else {
@@ -568,7 +568,7 @@
 				}
 				
 			}    else     {
-				funout(gettext("Attention : you have to complete a migration summary for at least one of the selected year before launching a inter-annual summary"))
+				if (!silent) funout(gettext("Attention : you have to complete a migration summary for at least one of the selected year before launching a inter-annual summary"))
 			}
 			
 		})			
@@ -730,9 +730,9 @@
 		}
 		# calcul des valeurs min et max et moyenne en fonction de la coupure (jour, semaine,quinzaine, mois)
 		
-		maxdat<-tapply(dat$valeur,as.character(dat[,timesplit]),max,na.rm=TRUE)
-		mindat<-tapply(dat$valeur,as.character(dat[,timesplit]),min,na.rm=TRUE)
-		meandat<-tapply(dat$valeur,as.character(dat[,timesplit]),mean,na.rm=TRUE)
+		maxdat<-suppressWarnings(tapply(dat$valeur,as.character(dat[,timesplit]),max,na.rm=TRUE))
+		mindat<-suppressWarnings(tapply(dat$valeur,as.character(dat[,timesplit]),min,na.rm=TRUE))
+		meandat<-suppressWarnings(tapply(dat$valeur,as.character(dat[,timesplit]),mean,na.rm=TRUE))
 		datsummary<-data.frame("maxtab"=maxdat,"mintab"=mindat,"moyenne"=meandat)
 		datsummary<-datsummary[!is.infinite(datsummary$maxtab),]# the minimum and max of empty set are -Inf and Inf respectively
 		datsummary[,timesplit]<-names(maxdat)[!is.infinite(maxdat)]
@@ -772,6 +772,7 @@
 setMethod("summary",signature=signature(object="BilanMigrationInterAnnuelle"),definition=function(object,silent=FALSE,...){
 			# table generated with funtable
 			# TODO traitement des poids
+			#object<-bmi
 			dat=object at data
 			dat<-dat[dat$bjo_labelquantite=="Effectif_total",]
 			dat<-stacomirtools::chnames(dat,c("bjo_dis_identifiant","bjo_tax_code","bjo_std_code","bjo_annee","bjo_jour","bjo_labelquantite","bjo_valeur","bjo_horodateexport"),    c("DC","Taxon","Stade","Annee","Jour","Label_quantite","Nombre","Date d'export du bilan"))

Modified: pkg/stacomir/R/BilanMigrationMult.r
===================================================================
--- pkg/stacomir/R/BilanMigrationMult.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/BilanMigrationMult.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -966,7 +966,7 @@
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
 fun_weight_conversion=function(tableau,time.sequence,silent) { 
 	if (!silent) funout(gettextf("dc=%s Conversion weight / number\n",unique(tableau$ope_dic_identifiant)))
-	nr<-length(unique(tableau$debut_pas))
+	nr<-nrow(unique(tableau[,c("debut_pas","lot_tax_code","lot_std_code")]))
 	tableaupoids=subset(tableau,tableau$type_de_quantite==unique(tableau$type_de_quantite)[2])
 	tableaueffectif=subset(tableau,tableau$type_de_quantite==unique(tableau$type_de_quantite)[1])
 	tableaueffectif= tableaueffectif[,c("No.pas", "lot_tax_code","lot_std_code","CALCULE","MESURE","EXPERT","PONCTUEL","Effectif_total")]       

Modified: pkg/stacomir/R/Bilan_carlot.r
===================================================================
--- pkg/stacomir/R/Bilan_carlot.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/Bilan_carlot.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -167,7 +167,7 @@
 #' @param object An object of class \code{\link{Bilan_carlot-class}} 
 #' @param silent Boolean, if TRUE, information messages are not displayed, only warnings and errors
 #' @author Cedric Briand \email{cedric.briand"at"eptb-vilaine.fr}
-setMethod("calcule",signature=signature("Bilan_carlot"),definition=function(object,silent) {
+setMethod("calcule",signature=signature("Bilan_carlot"),definition=function(object,silent=FALSE) {
 			#bilan_carlot<-b_carlot
 			bilan_carlot<-object
 			if(nrow(bilan_carlot at data)==0) {
@@ -201,7 +201,7 @@
 			#vue_ope_lot=vue_ope_lot[,c("ope","lot","dic","lot_pere","date","effectif","quantite","tax","std","dev","par","meth","val","val_quant","val_libelle", "annee","mois","quinzaine","semaine","jour")]
 			bilan_carlot at data<-vue_ope_lot
 			assign("bilan_carlot",bilan_carlot,envir_stacomi)#assign("bilan_carlot",vue_ope_lot,envir_stacomi)
-			funout(gettext("To obtain the table, type : bilan_lot=get('bilan_lot',envir_stacomi)\n"))
+			if (!silent) funout(gettext("To obtain the table, type : bilan_carlot=get('bilan_carlot',envir_stacomi)\n"))
 			return(bilan_carlot)
 		})
 

Modified: pkg/stacomir/R/PasDeTempsJournalier.r
===================================================================
--- pkg/stacomir/R/PasDeTempsJournalier.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/PasDeTempsJournalier.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -49,9 +49,9 @@
 			rep1 = validite_PasDeTemps(object)
 			if (!is.logical(rep1)) retValue<-rep1
 			rep2 = (object at stepDuration==86400)
-			if (!rep2) retValue=paste(retValue,gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.1))
+			if (!rep2) retValue=paste(retValue,gettext("Time step duration should be daily"))
 			rep3 = length(getAnnees(object))==1
-			if (!rep3) retValue=paste(retValue,gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.2))
+			if (!rep3) retValue=paste(retValue,gettext("Time step can't include more than one year"))
 			return(ifelse( rep1 & rep2 & rep3 ,TRUE,retValue)   )
 		})	
 # pour test #object=new("PasDeTempsJournalier")
@@ -65,23 +65,23 @@
 					object=setdateDebut(object,as.POSIXlt(svalue(datedeb)))
 					svalue(datedefin)<-as.Date(DateFin(object))
 					assign("pasDeTemps",object,envir_stacomi)
-					funout(gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.8))
+					funout(gettext("Time steps loaded\n"))
 					#dispose(winpa)
 				}
-				winpa=gframe(gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.3,container=group,horizontal=FALSE))
+				winpa=gframe(gettext("Time steps choice (1 year duration)",container=group,horizontal=FALSE))
 				pg<-glayout(container=winpa)
-				pg[1,1]<-glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.4))
+				pg[1,1]<-glabel(gettext("Start date"))
 				datedeb<-gedit(as.Date(getdateDebut(object)),handler=hwinpa,width=10)
 				pg[2,1]<-datedeb
-				pg[3,1]<-glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.5))
+				pg[3,1]<-glabel(gettext("Time step"))
 				pas_libelle=fun_char_spe(LesPasDeTemps$LabelPasDeTemps)
 				choicepas=gdroplist(pas_libelle,selected = 8,handler=hwinpa)
 				pg[4,1]<-choicepas 
 				enabled(choicepas)=FALSE
-				pg[3,2]<-glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.6))
+				pg[3,2]<-glabel(gettext("Number of days"))
 				choicenbStep=gedit("365",coerce.with=as.numeric,handler=hwinpa,width=5)
 				pg[4,2]<-choicenbStep
-				pg[1,2]<-glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTempsJournalier.7,container=pg))
+				pg[1,2]<-glabel(gettext("End date",container=pg))
 				datedefin<-gedit("...",width=10) # heigth=30
 				enabled(datedefin)<-FALSE
 				pg[2,2]<-datedefin			

Modified: pkg/stacomir/R/PasdeTemps.r
===================================================================
--- pkg/stacomir/R/PasdeTemps.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/PasdeTemps.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -279,9 +279,9 @@
 							font.attr=c(foreground.colors="red") )
 					hwinpa(h)
 				}
-				winpa=gframe(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.1),container=group,horizontal=FALSE)
+				winpa=gframe(gettext("Time steps choice"),container=group,horizontal=FALSE)
 				pg<-ggroup(horizontal=FALSE,container=winpa)
-				glabel("Date de debut",container=pg)
+				glabel(gettext("Starting date"),container=pg)
 				datedeb<-gedit(getdateDebut(object),
 						container=pg,handler=hchoicepas,width=15)
 				datedebut2=as.character(strftime(object at dateDebut,"%Y-%m-%d"))
@@ -291,14 +291,14 @@
 											"%Y-%m-%d %H:%M:%S"))
 							hchoicepas(h)				
 						} )
-				glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.1),container=winpa)
+				glabel(gettext("Time steps choice"),container=winpa)
 				pas_libelle=fun_char_spe(LesPasDeTemps$LabelPasDeTemps)
 				choicepas=gdroplist(pas_libelle,selected = 8,container=winpa,handler=hchoicepas) 
-				glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.2),container=winpa)
+				glabel(gettext("Number of time step choice"),container=winpa)
 				choicenbStep=gedit("365",container=winpa,coerce.with=as.numeric,handler=hchoicepas,width=15)
-				datedefin<-gtext(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.4),height=50,container=winpa) # Date de fin
+				datedefin<-gtext(gettext("End date"),height=50,container=winpa) # Date de fin
 				gbutton("OK", container=winpa,handler=hwinpa,icon="execute")
-			} else funout(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.3), arret=TRUE)
+			} else funout(gettext("Internal error : no entry in time steps table\n"), arret=TRUE)
 		})
 
 		
@@ -339,7 +339,7 @@
 						}
 						groupdate<-ggroup(container=notebook, label="periode")   ## "add" called by constructor this is a tab of the notebook
 						assign("groupdate",groupdate,envir=.GlobalEnv)
-						winpa=gframe(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.1),container=groupdate,horizontal=FALSE)
+						winpa=gframe(gettext("Time steps choice"),container=groupdate,horizontal=FALSE)
 						pg<-ggroup(horizontal=FALSE,container=winpa)
 						glabel("Date de debut",container=pg)
 						datedeb<-gedit(getdateDebut(object),container=pg,handler=hchoicepas,width=15)
@@ -350,14 +350,14 @@
 													"%Y-%m-%d %H:%M:%S"))
 									hchoicepas(h)				
 								} )
-						glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.1),container=winpa)
+						glabel(gettext("Time steps choice"),container=winpa)
 						pas_libelle=fun_char_spe(LesPasDeTemps$LabelPasDeTemps)
 						choicepas=gdroplist(pas_libelle,selected = 8,container=winpa,handler=hchoicepas) 
-						glabel(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.2),container=winpa)
+						glabel(gettext("Number of time steps choice"),container=winpa)
 						choicenbStep=gedit("365",container=winpa,coerce.with=as.numeric,handler=hchoicepas,width=15)
-						datedefin<-gtext(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.4),height=50,container=winpa) # Date de fin)
+						datedefin<-gtext(gettext("End date"),height=50,container=winpa) # Date de fin)
 						gbutton("OK", container=winpa,handler=hwinpa,icon="execute")
-					} else funout(gettext(get("msg",envir=envir_stacomi)$PasdeTemps.3), arret=TRUE)
+					} else funout(gettext("Internal error : no entry in time steps table\n"), arret=TRUE)
 				})
 		
 

Modified: pkg/stacomir/R/RefAnnee.r
===================================================================
--- pkg/stacomir/R/RefAnnee.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/RefAnnee.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -106,7 +106,7 @@
 						" WHERE lot_lot_identifiant is null",
 						and1,and2,and3, ") as tabletemp", sep="")				
 			} else {
-				funout(paste("Not implemented for objectBilan =",objectBilan),arret=TRUE)
+				funout(gettextf("Not implemented for objectBilan = %s",objectBilan),arret=TRUE)
 			}
 			requete<-stacomirtools::connect(requete)  # appel de la methode connect de l'object requeteODBC
 			object at data<-requete at query
@@ -134,8 +134,8 @@
 setMethod("choice",
 		signature=signature("RefAnnee"),definition=function(object,
 				nomassign="refAnnee", 
-				funoutlabel=gettext(get("msg",envir=envir_stacomi)$RefAnnee.2),
-				titleFrame=gettext(get("msg",envir=envir_stacomi)$RefAnnee.1), 
+				funoutlabel=gettext("Year selected\n"),
+				titleFrame=gettext("Year choice"), 
 				preselect=1){
 			if (nrow(object at data) > 0){      
 				hannee=function(h,...){      
@@ -150,7 +150,7 @@
 				choice=gdroplist(annees,container=frame_annee,handler=hannee,selected=preselect)    
 				gbutton("OK", container=frame_annee,handler=hannee)  
 			} else { 
-				funout(gettext(get("msg",envir=envir_stacomi)$RefAnnee.3),arret=TRUE)  
+				funout(gettext("Problem when loading data or no data in the database (ODBC link ?)"),arret=TRUE)  
 			}
 		}) 
 
@@ -177,7 +177,7 @@
 		signature=signature("RefAnnee"),definition=function(object,
 				annee,
 				nomassign="refAnnee", 
-				funoutlabel=gettext(get("msg",envir=envir_stacomi)$RefAnnee.2),
+				funoutlabel=gettext("Year selected\n"),
 				silent=FALSE
 		){
 			if (length(annee)>1) stop("horodate should be a vector of length 1")

Modified: pkg/stacomir/R/RefDC.r
===================================================================
--- pkg/stacomir/R/RefDC.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/RefDC.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -1,5 +1,3 @@
-# Nom fichier :        RefDC   (classe)
-
 #' Class "RefDC"
 #' 
 #' Description of a control device.
@@ -108,7 +106,7 @@
 					object at ouvrage= object at data$dif_ouv_identifiant[object at data$dc%in%object at dc_selectionne]
 					object at station=object at data$sta_code[object at data$dc%in%object at dc_selectionne]
 					assign("refDC",object,envir_stacomi)
-					funout(gettext(get("msg",envir=envir_stacomi)$RefDC.1))
+					funout(gettext("Counting device selected\n"))
 					# si il existe un object fils; supprimer
 					# referentiel fils, celui charge par la methode charge_avec_filtre
 					# ici comme on fait appel e un autre object il faut appeller le conteneur qui contient l'object
@@ -123,29 +121,29 @@
 							if (exists("frame_parquan")) delete(group,frame_parquan)
 							if (exists("frame_parqual")) delete(group,frame_parqual)
 							choice(objectBilan at taxons,objectBilan,is.enabled=TRUE)
-							funout(gettext(get("msg",envir=envir_stacomi)$RefDC.2)	)
+							funout(gettext("Select taxa for this counting device (for all periods)\n"))
 						}
 					}
 					#dispose(winst)
 				} 
 				# Handler d'affichage du tableau
 				hDCi=function(h,...){
-					w=gwindow(gettext(get("msg",envir=envir_stacomi)$RefDC.3,width=400))
+					w=gwindow(gettext("Counting devices data",width=400))
 					wg=ggroup(horizontal=FALSE,container=w)
 					tab=gtable(object at data[,c(1,4,7,8,11,12)],chosencol=1,multiple=FALSE,expand=TRUE, container=wg)
 					bg<-ggroup(container=wg)
 					addSpring(bg)
-					gbutton(gettext(get("msg",envir=envir_stacomi)$RefDC.4, container=bg, handler = function(h,...) dispose(w)))
+					gbutton(gettext("close", container=bg, handler = function(h,...) dispose(w)))
 				}
-				frame_DC<<-gframe(gettext(get("msg",envir=envir_stacomi)$RefDC.5))
+				frame_DC<<-gframe(gettext("Counting devices choice"))
 				add(group,frame_DC)
 				DC_identifiant=object at data$dc
 				choice=gdroplist(DC_identifiant,container=frame_DC,handler=hDC)
-				gbutton(gettext(get("msg",envir=envir_stacomi)$RefDC.6, container=frame_DC,handler=hDCi) )
+				gbutton(gettext("Table", container=frame_DC,handler=hDCi) )
 				enabled(frame_DC)<-is.enabled
 				gbutton("OK", container=frame_DC,handler=hDC)
 			} else {
-				funout(gettext(get("msg",envir=envir_stacomi)$RefDC.7),arret=TRUE)
+				funout(gettext("Error : no counting device in the database (the query returns 0 entry)\n"),arret=TRUE)
 			}
 			return(object)
 		})
@@ -182,7 +180,7 @@
 					object at ouvrage= object at data$dif_ouv_identifiant[object at data$dc%in%object at dc_selectionne]
 					object at station= as.character(object at data$sta_code[object at data$dc%in%object at dc_selectionne])
 					assign("refDC",object,envir_stacomi)
-					funout(gettext(get("msg",envir=envir_stacomi)$RefDC.1))
+					funout(gettext("Counting device selected\n"))
 					# si il existe un object fils; supprimer
 					# referentiel fils, celui charge par la methode charge_avec_filtre
 					# ici comme on fait appel e un autre object il faut appeller le conteneur qui contient l'object
@@ -204,7 +202,7 @@
 									dispose(notebook) ## dispose current tab
 								}}
 							choicemult(objectBilan at taxons,objectBilan,is.enabled=TRUE)
-							funout(gettext(get("msg",envir=envir_stacomi)$RefDC.2)	)
+							funout(gettext("Select taxa for this counting device (for all periods)\n")	)
 						}
 					}
 					# changing tab of notebook to next tab
@@ -221,11 +219,11 @@
 				#TODO addmsg
 				groupdc<-ggroup(container=notebook, label="dc")   ## "add" called by constructor this is a tab of the notebook
 				assign("groupdc",groupdc,envir=.GlobalEnv)
-				frameDCsource<-gframe(gettext(get("msg",envir=envir_stacomi)$RefDC.5,container=groupdc))
+				frameDCsource<-gframe(gettext("Counting devices choice"),container=groupdc)
 				size(frameDCsource)<-c(250,300)
 				tbsourcedc  = gtable(DC,container=frameDCsource,expand = TRUE, fill = TRUE)
 				
-				frameDCdest<-gframe("deposez ici",container=groupdc)
+				frameDCdest<-gframe(gettext("drop here"),container=groupdc)
 				size(frameDCdest)<-c(60,300)
 				#addSpring(groupdc)
 				# need for a fixed size data.frame otherwise errors when adding new lines
@@ -264,7 +262,7 @@
 						})
 				gbutton("ok", container = groupdc, handler = hDC)
 			} else {
-				funout(gettext(get("msg",envir=envir_stacomi)$RefDC.7),arret=TRUE)
+				funout(gettext("Error : no counting device in the database (the query returns 0 entry)\n"),arret=TRUE)
 			}
 			return(object)
 		})

Modified: pkg/stacomir/R/RefDF.r
===================================================================
--- pkg/stacomir/R/RefDF.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/RefDF.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -86,25 +86,25 @@
 					object at ouvrage= object at data$dif_ouv_identifiant[object at data$df%in%object at df_selectionne]
 					#cat("passe par la")
 					assign("refDF",object,envir_stacomi)
-					funout(gettext(get("msg",envir=envir_stacomi)$RefDF.1))
+					funout(gettext("Fishway selected\n"))
 					#dispose(winst)
 				} 
 				# Handler d'affichage du tableau
 				hDFi=function(h,...){
-					w=gwindow(gettext(get("msg",envir=envir_stacomi)$RefDF.2,width=400))
+					w=gwindow(gettext("Fishways data"),width=400)
 					wg=ggroup(horizontal=FALSE,container=w)
 					tab=gtable(object at data[,c(1,6,7)],chosencol=1,multiple=FALSE,expand=TRUE, container=wg)
 					bg<-ggroup(container=wg)
 					addSpring(bg)
-					gbutton(gettext(get("msg",envir=envir_stacomi)$RefDC.4, container=bg, handler = function(h,...) dispose(w)))
+					gbutton(gettext("close"), container=bg, handler = function(h,...) dispose(w))
 				}
-				frameDF=gframe(gettext(get("msg",envir=envir_stacomi)$RefDF.3,container=group))
+				frameDF=gframe(gettext("Fishway choice"),container=group)
 				DF_identifiant=object at data$df
 				choice=gdroplist(DF_identifiant,container=frameDF,handler=hDF)
-				gbutton(gettext(get("msg",envir=envir_stacomi)$RefDC.6, container=frameDF,handler=hDFi))
+				gbutton(gettext("Table"), container=frameDF,handler=hDFi)
 				gbutton("OK", container=frameDF,handler=hDF)
 			} else {
-				funout(gettext(get("msg",envir=envir_stacomi)$RefDF.4),arret=TRUE)
+				funout(gettext("No fishway in the database (the query returns 0 entry)\n"),arret=TRUE)
 			}
 		})
 
@@ -133,7 +133,9 @@
 			if (class(df)=="numeric") {
 				df<-as.integer(df) 
 			} else if (class(df)=="character"){
+				options(warn = -1)
 				df=as.integer(as.numeric(df))
+				options(warn = 0)
 			}
 			if (any(is.na(df))) stop ("NA values df")			
 			object at df_selectionne<-df

Modified: pkg/stacomir/R/RefStades.r
===================================================================
--- pkg/stacomir/R/RefStades.r	2017-01-28 17:25:45 UTC (rev 258)
+++ pkg/stacomir/R/RefStades.r	2017-01-31 08:19:06 UTC (rev 259)
@@ -59,7 +59,7 @@
 			requete at order_by="ORDER BY std_code"  
 			requete<-stacomirtools::connect(requete)  # appel de la methode connect de l'object requeteODBC
 			object at data<-requete at query
-			if (nrow(object at data)==0) funout(gettext(get("msg",envir=envir_stacomi)$RefStades.1),arret=TRUE)
+			if (nrow(object at data)==0) funout(gettext("No data for this counting device and this taxon\n"),arret=TRUE)
 			return(object)
 		})
 #' Choice method for RefStades referential objects
@@ -84,26 +84,37 @@
 					stades=svalue(choice)
 					object at data<-object at data[std_libelle%in%stades ,]
 					assign("refStades",object,envir_stacomi)
-					funout(gettext(get("msg",envir=envir_stacomi)$RefStades.2))
+					funout(gettext("Stage selected\n"))
 					if (!is.null(objectBilan)) {
 						# par defaut la methode ne charge pas de maniere interactive  (par exemple en ne premnant que les stades des taxon du dc par la methode charge_avec_filtre
 						# elle est alors affichee des le debut par la methode choice e laquelle on ne passe pas d'objectBilan en parametre 
 						#il y a bien un object par dans l'object Bilan             
 						if (class(try(objectBilan at par,silent=TRUE))!="try-error") {
-							objectBilan at par<<-charge_avec_filtre(object=objectBilan at par,dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
+							objectBilan at par<<-charge_avec_filtre(object=objectBilan at par,
+									dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,
+									taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,
+									stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
 							if (exists("frame_par")) delete(group,frame_par)
 							choice(objectBilan at par,is.enabled=TRUE)
 						} 
 						#il y a bien un object parqual dans l'object Bilan						
 						if (class(try(objectBilan at parqual,silent=TRUE))!="try-error") {
-							objectBilan at parqual<<-charge_avec_filtre(object=objectBilan at parqual,dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
+							objectBilan at parqual<<-charge_avec_filtre(object=objectBilan at parqual,
+									dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,
+									taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,
+									stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
 							
 							if (exists("frame_parqual")) delete(group,frame_parqual)
-							choice(objectBilan at parqual,label=gettext(get("msg",envir=envir_stacomi)$RefStades.3,nomassign="refparqual",frameassign="frame_parqual",is.enabled=TRUE))
+							choice(objectBilan at parqual,label=gettext("Qualitative feature",
+											nomassign="refparqual",
+											frameassign="frame_parqual",is.enabled=TRUE))
 						}
 #il y a bien un object parquan dans l'object Bilan
 						if (class(try(objectBilan at parquan,silent=TRUE))!="try-error") {
-							objectBilan at parquan<<-charge_avec_filtre(object=objectBilan at parquan,dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
+							objectBilan at parquan<<-charge_avec_filtre(object=objectBilan at parquan,
+									dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,
+									taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,
+									stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
 							if (class(objectBilan)=="Bilan_taille" )
 							{
 								if (nrow(objectBilan at parquan@data)>0) {
@@ -113,18 +124,20 @@
 								}
 							}
 							if (exists("frame_parquan")) delete(group,frame_parquan)
-							choice(objectBilan at parquan,label=gettext(get("msg",envir=envir_stacomi)$RefStades.4,nomassign="refparquan",frameassign="frame_parquan",is.enabled=TRUE))
+							choice(objectBilan at parquan,label=gettext("Quantitative feature"),
+									nomassign="refparquan",
+									frameassign="frame_parquan",is.enabled=TRUE)
 						}
 						
 					}
 				}
-				frame_std<<-gframe(gettext(get("msg",envir=envir_stacomi)$RefStades.6))
+				frame_std<<-gframe(gettext("Stage selection"))
 				add(group,frame_std)
 				std_libelle=fun_char_spe(object at data$std_libelle)
 				choice=gcombobox(std_libelle,container=frame_std,handler=hstd)
 				enabled(frame_std)<-is.enabled
 				gbutton("OK", container=frame_std,handler=hstd)
-			} else funout(gettext(get("msg",envir=envir_stacomi)$RefStades.5),arret=TRUE)
+			} else funout(gettext("Stop internal error : load data to make a choice\n"),arret=TRUE)
 		})
 
 #' Multiple Choice method for RefStades referential objects
@@ -152,7 +165,7 @@
 					stades=tbdeststd[,][tbdeststd[,]!=""]
 					object at data<-object at data[std_libelle%in%stades ,]
 					assign("refStades",object,envir_stacomi)
-					funout(gettext(get("msg",envir=envir_stacomi)$RefStades.2))
+					funout(gettext("Stage selected\n"))
 					if (!is.null(objectBilan)) {
 						objectBilan at stades<-object
 						assign(get("objectBilan",envir=envir_stacomi),objectBilan,envir=envir_stacomi)
@@ -180,7 +193,9 @@
 									dc_selectionne=get("refDC",envir_stacomi)@dc_selectionne,
 									taxon_selectionne=get("refTaxon",envir_stacomi)@data$tax_code,
 									stade_selectionne=get("refStades",envir_stacomi)@data$std_code)
[TRUNCATED]

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


More information about the Stacomir-commits mailing list