Create default categories using locales (need better translation)

This commit is contained in:
2010-07-07 21:19:47 +02:00
parent 63ca3a9c22
commit cef0e4eb3c
3 changed files with 16 additions and 31 deletions

View File

@@ -236,7 +236,7 @@ User* Database::LoadUser(const wxString& name)
category.name = set.GetAsString(wxT("name"));
category.color = wxColour(set.GetAsString(wxT("color")));
category.font = set.GetAsString(wxT("font"));
if (category.name != wxT("Fixe"))
if (category.name != _("Fixe"))
user->_categories.push_back(category);
else
user->_categories.insert(user->_categories.begin(), category);
@@ -814,25 +814,6 @@ void Database::NewUser(const wxString& name)
set.Finalize();
req = wxT("SELECT * FROM default_category");
EXECUTE_SQL_QUERY(req, set,);
while (set.NextRow())
{
req = wxT("INSERT INTO category ('user', 'parent', 'name', 'color', 'font') VALUES ('") ;
req += id + wxT("'");
req += wxT(", '") + set.GetAsString(wxT("parent")) + wxT("'");
req += wxT(", '") + set.GetAsString(wxT("name")) + wxT("'");
req += wxT(", '") + set.GetAsString(wxT("color")) + wxT("'");
req += wxT(", '") + set.GetAsString(wxT("font")) + wxT("'");
req += wxT(")");
EXECUTE_SQL_UPDATE(req, );
}
set.Finalize();
return ;
}