faubackup2/src/common backup_control.cpp,1.12,1.13

Martin Waitz <[email protected]> Wed, 15 Jun 2005 09:14:21 +0000
Newsgroups gmane.comp.sysutils.backup.faubackup.cvs
Message-ID <[email protected]>
Update of /cvsroot/faubackup/faubackup2/src/common
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1508/src/common

Modified Files:
	backup_control.cpp 
Log Message:
start to use translateable format strings instead of hardcoding messages.


Index: backup_control.cpp
===================================================================
RCS file: /cvsroot/faubackup/faubackup2/src/common/backup_control.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** backup_control.cpp	14 Jun 2005 22:10:17 -0000	1.12
--- backup_control.cpp	15 Jun 2005 09:14:18 -0000	1.13
***************
*** 13,16 ****
--- 13,18 ----
  #include "support.h"
  
+ #include <boost/format.hpp>
+ 
  #include "common/backup_control.hpp"
  #include "common/common.hpp"
***************
*** 56,64 ****
  	actualbackup = getActualTime();
  	string oldbackupdir = dir_getlast(destination,lastbackup);
! 	output.information("Last backup found in: " + oldbackupdir,
  	                   DEBUG_OUTPUT);
  
  	string actualbackupdir = dir_create(destination);
! 	output.information("Creating temp dir: " + actualbackupdir,
  	                   DEBUG_OUTPUT);
  
--- 58,66 ----
  	actualbackup = getActualTime();
  	string oldbackupdir = dir_getlast(destination,lastbackup);
! 	output.information(F_("Last backup found in: %s") % oldbackupdir,
  	                   DEBUG_OUTPUT);
  
  	string actualbackupdir = dir_create(destination);
! 	output.information(F_("Creating temp dir: ") % actualbackupdir,
  	                   DEBUG_OUTPUT);
  
***************
*** 67,71 ****
  	ret = chdir( source.c_str() );
  	if( ret<0 ) {
! 		output.critical( "chdir(\"" +  destination + "\")" , errno);
  	}
  
--- 69,73 ----
  	ret = chdir( source.c_str() );
  	if( ret<0 ) {
! 		output.critical(F_("chdir %s") % destination, errno);
  	}
  
***************
*** 75,80 ****
  		conf_file = DEFAULT_CONF;
  	if(!existFile(conf_file))
! 		output.critical("Warning, configfile " + conf_file + " is "
! 		                "not accessible!",0);
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
--- 77,82 ----
  		conf_file = DEFAULT_CONF;
  	if(!existFile(conf_file))
! 		output.critical(F_("configfile %s does not exist!")
! 				% conf_file, 0);
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
***************
*** 207,211 ****
  
  	instance_name = "server";
! 	output.information("server started ", DEBUG_OUTPUT);
  	NetworkSender sender(fd_out);
  	NetworkReceiver receiver(fd_in);
--- 209,213 ----
  
  	instance_name = "server";
! 	output.information("server started", DEBUG_OUTPUT);
  	NetworkSender sender(fd_out);
  	NetworkReceiver receiver(fd_in);
***************
*** 242,247 ****
  		receiv->wait();
  	output.adderrors(com_FileReceiver.readInteger());
! 	output.information("total bytes send: " + int2string(sender.finished_Client()),NORMAL_OUTPUT);
! 	output.information("total bytes read: " + int2string(receiver.wait_for_finish()),NORMAL_OUTPUT);
  	dir_finalize(tempdir, destdir);
  	output.information("Server finished", DEBUG_OUTPUT);
--- 244,251 ----
  		receiv->wait();
  	output.adderrors(com_FileReceiver.readInteger());
! 	output.information(F_("total bytes send: %n")
! 			% sender.finished_Client(), NORMAL_OUTPUT);
! 	output.information(F_("total bytes read: %n")
! 			% receiver.wait_for_finish(), NORMAL_OUTPUT);
  	dir_finalize(tempdir, destdir);
  	output.information("Server finished", DEBUG_OUTPUT);
***************
*** 277,293 ****
  
  
! 	output.information("date of last backup: " +
! 	                   int2string(lastbackup.year) + ":" +
! 	                   int2string(lastbackup.month) + ":"+
! 	                   int2string(lastbackup.day) + ":"+
! 	                   int2string(lastbackup.hour) + ":"+
! 	                   int2string(lastbackup.minute), DEBUG_OUTPUT);
! 
! 	output.information("actual date: " +
! 	                   int2string(actualbackup.year) + ":" +
! 	                   int2string(actualbackup.month) + ":"+
! 	                   int2string(actualbackup.day) + ":"+
! 	                   int2string(actualbackup.hour) + ":"+
! 	                   int2string(actualbackup.minute), DEBUG_OUTPUT);
  
  	XThread * infos = client_information_sender(sourcedir, com_InfoSender);
--- 281,291 ----
  
  
! 	output.information(F_("date of last backup: %n:%n:%n:%n:%n")
! 			% lastbackup.year % lastbackup.month % lastbackup.day
! 			% lastbackup.hour % lastbackup.minute, DEBUG_OUTPUT);
! 	output.information(F_("actual date: %n:%n:%n:%n:%n")
! 			% actualbackup.year % actualbackup.month
! 			% actualbackup.day % actualbackup.hour
! 			% actualbackup.minute, DEBUG_OUTPUT);
  
  	XThread * infos = client_information_sender(sourcedir, com_InfoSender);
***************
*** 321,326 ****
  		conf_file = DEFAULT_CONF;
  	if(!existFile(conf_file))
! 		output.critical("Warning, configfile " + conf_file + " is "
! 		                "not accessible!",0);
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
--- 319,324 ----
  		conf_file = DEFAULT_CONF;
  	if(!existFile(conf_file))
! 		output.critical(F_("configfile %s does not exist!")
! 				% conf_file, 0);
  	try {
  		globalConfig = new SettingsFileParser(conf_file);
***************
*** 343,348 ****
  XThread *client_file_sender(string sourcedir, NetCommunication &com)
  {
! 	output.information("client_file_sender started: sourcedir: " +
! 	                   sourcedir , DEBUG_OUTPUT);
  	/* receiving and sending some dummy data to make sure connection
  	is working */
--- 341,346 ----
  XThread *client_file_sender(string sourcedir, NetCommunication &com)
  {
! 	output.information(F_("client_file_sender started: sourcedir: %s")
! 			% sourcedir , DEBUG_OUTPUT);
  	/* receiving and sending some dummy data to make sure connection
  	is working */
***************
*** 365,370 ****
  {
  
! 	output.information("server_distributor started: destdir: " +
! 	                   lastbackupdir , DEBUG_OUTPUT);
  
  	/* receiving and sending some dummy data to make sure connection
--- 363,368 ----
  {
  
! 	output.information(F_("server_distributor started: destdir: %s")
! 			% lastbackupdir , DEBUG_OUTPUT);
  
  	/* receiving and sending some dummy data to make sure connection
***************
*** 385,390 ****
                                 NetCommunication &com)
  {
! 	output.information("server_file_recveiver started: destdir: " +
! 	                   destdir , DEBUG_OUTPUT);
  	int bla = com.readInteger();
  	char blub = com.readByte();
--- 383,388 ----
                                 NetCommunication &com)
  {
! 	output.information(F_("server_file_recveiver started: destdir: %s")
! 			% destdir , DEBUG_OUTPUT);
  	int bla = com.readInteger();
  	char blub = com.readByte();



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click