Create default categories using locales (need better translation)
This commit is contained in:
@@ -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 ;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user