[pgadmin-hackers] l10n patch

2009-08-01 Thread Marek Černocký
Hi,

I send patch. It solves translation for object type names in dialog
Grand Wizard.


Regards

Marek
diff --recursive -c pgadmin3.svn/pgadmin/frm/frmGrantWizard.cpp pgadmin3.new/pgadmin/frm/frmGrantWizard.cpp
*** pgadmin3.svn/pgadmin/frm/frmGrantWizard.cpp	2009-08-01 16:52:58.0 +0200
--- pgadmin3.new/pgadmin/frm/frmGrantWizard.cpp	2009-08-01 17:09:30.0 +0200
***
*** 155,161 
  if (obj-CanEdit())
  {
  objectArray.Add(obj);
! chkList-Append(obj-GetTypeName() + wxT( ) + obj-GetFullIdentifier()); // no translation!
  }
  }
  }
--- 155,161 
  if (obj-CanEdit())
  {
  objectArray.Add(obj);
! chkList-Append((wxString)wxGetTranslation(obj-GetTypeName()) + wxT( ) + obj-GetFullIdentifier());
  }
  }
  }

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Change: l10n patch

2009-08-01 Thread Marek Černocký
Oops! I now see there is prepared function for translanted object types
names. I send new patch instead previous.

Marek Černocký píše v So 01. 08. 2009 v 17:58 +0200:
 Hi,
 
 I send patch. It solves translation for object type names in dialog
 Grand Wizard.
 
 
 Regards
 
 Marek
diff --recursive -c pgadmin3.svn/pgadmin/frm/frmGrantWizard.cpp pgadmin3.new/pgadmin/frm/frmGrantWizard.cpp
*** pgadmin3.svn/pgadmin/frm/frmGrantWizard.cpp	2009-08-01 16:52:58.0 +0200
--- pgadmin3.new/pgadmin/frm/frmGrantWizard.cpp	2009-08-01 18:17:03.0 +0200
***
*** 155,161 
  if (obj-CanEdit())
  {
  objectArray.Add(obj);
! chkList-Append(obj-GetTypeName() + wxT( ) + obj-GetFullIdentifier()); // no translation!
  }
  }
  }
--- 155,161 
  if (obj-CanEdit())
  {
  objectArray.Add(obj);
! chkList-Append(obj-GetTranslatedTypeName() + wxT( ) + obj-GetFullIdentifier());
  }
  }
  }

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Second l10n patch

2009-08-01 Thread Marek Černocký
Hi,

I send patch. It solves translation for object type names in reports.

Regards

Marek

diff --recursive -c pgadmin3.svn/pgadmin/frm/frmReport.cpp pgadmin3.new/pgadmin/frm/frmReport.cpp
*** pgadmin3.svn/pgadmin/frm/frmReport.cpp	2009-08-01 16:52:58.0 +0200
--- pgadmin3.new/pgadmin/frm/frmReport.cpp	2009-08-01 18:51:54.0 +0200
***
*** 1199,1208 
  void reportObjectPropertiesFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s properties report - %s), object-GetTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(object-GetTypeName() + _( properties));
  
  ctlListView *list = GetFrmMain()-GetProperties();
  object-ShowProperties();
--- 1199,1208 
  void reportObjectPropertiesFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s properties report - %s), object-GetTranslatedTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(wxString::Format(_(%s properties), object-GetTranslatedTypeName().c_str()));
  
  ctlListView *list = GetFrmMain()-GetProperties();
  object-ShowProperties();
***
*** 1236,1245 
  void reportObjectDdlFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s DDL report - %s), object-GetTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(object-GetTypeName() + _( DDL));
  
  report-XmlSetSectionSql(section, object-GetSql(NULL));
  }
--- 1236,1245 
  void reportObjectDdlFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s DDL report - %s), object-GetTranslatedTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(wxString::Format(_(%s DDL), object-GetTranslatedTypeName().c_str()));
  
  report-XmlSetSectionSql(section, object-GetSql(NULL));
  }
***
*** 1271,1277 
  pgTable *table = (pgTable *)object;
  
  wxString title;
! title.Printf(_(%s Data dictionary report - %s), object-GetTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
  // Columns
--- 1271,1277 
  pgTable *table = (pgTable *)object;
  
  wxString title;
! title.Printf(_(%s Data dictionary report - %s), object-GetTranslatedTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
  // Columns
***
*** 1416,1425 
  void reportObjectStatisticsFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s statistics report - %s), object-GetTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(object-GetTypeName() + _( statistics));
  
  ctlListView *list = GetFrmMain()-GetStatisticsCtl();
  object-ShowStatistics(GetFrmMain(), list);
--- 1416,1425 
  void reportObjectStatisticsFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s statistics report - %s), object-GetTranslatedTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(wxString::Format(_(%s statistics), object-GetTranslatedTypeName().c_str()));
  
  ctlListView *list = GetFrmMain()-GetStatisticsCtl();
  object-ShowStatistics(GetFrmMain(), list);
***
*** 1451,1460 
  void reportObjectDependenciesFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s dependencies report - %s), object-GetTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(object-GetTypeName() + _( dependencies));
  ctlListView *list = GetFrmMain()-GetDependenciesCtl();
  object-ShowDependencies(parent, list);
  
--- 1451,1461 
  void reportObjectDependenciesFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
! title.Printf(_(%s dependencies report - %s), object-GetTranslatedTypeName().c_str(), object-GetIdentifier().c_str());
  report-SetReportTitle(title);
  
! int section = report-XmlCreateSection(wxString::Format(_(%s dependencies), object-GetTranslatedTypeName().c_str()));
! 
  ctlListView *list = GetFrmMain()-GetDependenciesCtl();
  object-ShowDependencies(parent, list);
  
***
*** 1485,1494 
  void reportObjectDependentsFactory::GenerateReport(frmReport *report, pgObject *object)
  {
  wxString title;
!