From d9359b2f985d4ae349c7b918761f7500ed777891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Fri, 16 Jul 2010 18:38:13 +0200 Subject: [PATCH] Fix two bugs (Upper case in database avoiding accents, and cat/account with the same name during modification into PreferencesPanel) Updating translations --- ressources/po/french.mo | Bin 5202 -> 5799 bytes ressources/po/french.po | 333 ++++++++++++++++++++-------------- ressources/po/kisscount.pot | 274 ++++++++++++++++------------ src/model/Database.cpp | 2 +- src/view/PreferencesPanel.cpp | 18 ++ src/view/SearchPanel.cpp | 25 ++- src/view/SearchPanel.h | 2 + 7 files changed, 395 insertions(+), 259 deletions(-) diff --git a/ressources/po/french.mo b/ressources/po/french.mo index 79005d5bf8c8da32e897792dda5537bac9211857..5ec2b810780cc9ef4829928327529c6489cf6ac3 100644 GIT binary patch literal 5799 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 Il^ja^3;CwF`v3p{ diff --git a/ressources/po/french.po b/ressources/po/french.po index eceb25f..2c11d26 100644 --- a/ressources/po/french.po +++ b/ressources/po/french.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-08 19:24+0200\n" +"POT-Creation-Date: 2010-07-16 18:37+0200\n" "PO-Revision-Date: \n" "Last-Translator: Soutadé \n" "Language-Team: \n" @@ -18,235 +18,285 @@ msgstr "" # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#: src/view/PreferencesPanel.cpp:493 +#: src/view/PreferencesPanel.cpp:530 msgid " - " msgstr " - " -#: src/view/PreferencesPanel.cpp:315 -#: src/view/PreferencesPanel.cpp:415 -#: src/view/PreferencesPanel.cpp:460 -#: src/view/UsersDialog.cpp:95 +#: src/view/PreferencesPanel.cpp:324 +#: src/view/PreferencesPanel.cpp:343 +#: src/view/PreferencesPanel.cpp:433 +#: src/view/PreferencesPanel.cpp:452 +#: src/view/PreferencesPanel.cpp:497 +#: src/view/UsersDialog.cpp:114 msgid " already exists" msgstr " existe déjà " -#: src/model/Database.cpp:83 +#: src/view/SearchPanel.cpp:204 +msgid " entries found" +msgstr " entrées trouvées" + +#: src/model/Database.cpp:102 msgid " not found, aborting" msgstr " non trouvé, arrêt" -#: src/view/AccountPanel.cpp:979 +#: src/view/AccountPanel.cpp:909 msgid " operations ?" msgstr " opérations ?" -#: src/view/PreferencesPanel.cpp:500 +#: src/view/PreferencesPanel.cpp:537 msgid " profil ?" msgstr " profil ?" -#: src/view/ButtonPanel.cpp:31 +#: src/view/SearchPanel.cpp:206 +msgid "1 entry found" +msgstr "1 entrée trouvée" + +#: src/view/ButtonPanel.cpp:51 msgid "About" msgstr "A propos" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 +#: src/view/SearchPanel.cpp:78 msgid "Account" msgstr "Compte" -#: src/view/PreferencesPanel.cpp:315 +#: src/view/PreferencesPanel.cpp:324 +#: src/view/PreferencesPanel.cpp:343 msgid "Account " -msgstr "Compte" +msgstr "Le compte " -#: src/view/AccountPanel.cpp:120 +#: src/view/AccountPanel.cpp:113 msgid "Account name" msgstr "Nom du compte" -#: src/view/AccountPanel.cpp:119 +#: src/view/AccountPanel.cpp:112 msgid "Account number" msgstr "Numéro de compte" -#: src/view/PreferencesPanel.cpp:32 +#: src/view/PreferencesPanel.cpp:51 msgid "Accounts" msgstr "Comptes" -#: src/view/PreferencesPanel.cpp:286 -#: src/view/PreferencesPanel.cpp:500 -#: src/view/AccountPanel.cpp:974 +#: src/view/SearchPanel.cpp:75 +msgid "Amount from" +msgstr "Montant min" + +#: src/view/SearchPanel.cpp:76 +msgid "Amount to" +msgstr "Montant max" + +#: src/view/PreferencesPanel.cpp:305 +#: src/view/PreferencesPanel.cpp:537 +#: src/view/AccountPanel.cpp:904 msgid "Are you sure want to delete " msgstr "Etes vous sûr de vouloir supprimer " -#: src/view/PreferencesPanel.cpp:386 -#: src/view/AccountPanel.cpp:684 +#: src/view/PreferencesPanel.cpp:414 +#: src/view/AccountPanel.cpp:614 msgid "Are you sure want to delete : \n" msgstr "Etes vous sûr de vouloir supprimer : \n" -#: src/view/PasswordDialog.cpp:37 -#: src/view/GenerateDialog.cpp:41 -#: src/view/UsersDialog.cpp:32 +#: src/view/PasswordDialog.cpp:56 +#: src/view/GenerateDialog.cpp:60 +#: src/view/UsersDialog.cpp:51 msgid "Cancel" msgstr "Annuler" -#: src/view/PreferencesPanel.cpp:33 +#: src/view/PreferencesPanel.cpp:52 msgid "Categories" msgstr "Catégories" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 +#: src/view/SearchPanel.cpp:77 msgid "Category" msgstr "Catégorie" -#: src/view/PreferencesPanel.cpp:415 +#: src/view/PreferencesPanel.cpp:433 +#: src/view/PreferencesPanel.cpp:452 msgid "Category " msgstr "Catégorie" -#: src/view/PreferencesPanel.cpp:48 +#: src/view/PreferencesPanel.cpp:67 msgid "Change Name" msgstr "Changer de nom" -#: src/view/PreferencesPanel.cpp:49 +#: src/view/PreferencesPanel.cpp:68 msgid "Change Password" msgstr "Changer le mot de passe" -#: src/view/PasswordDialog.cpp:10 +#: src/view/PasswordDialog.cpp:29 msgid "Change password" msgstr "Changer le mot de passe" -#: src/view/ButtonPanel.cpp:30 +#: src/view/ButtonPanel.cpp:50 msgid "Change user" msgstr "Changer d'utilisateur" -#: src/view/PreferencesPanel.cpp:164 +#: src/view/PreferencesPanel.cpp:183 msgid "Color" msgstr "Couleur" -#: src/view/PasswordDialog.cpp:27 +#: src/view/PasswordDialog.cpp:46 msgid "Confirm password " msgstr "Confirmer le mot de passe" -#: src/view/AccountPanel.cpp:130 +#: src/view/AccountPanel.cpp:123 msgid "Cost repartition" msgstr "Répartition des coûts" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 msgid "Credit" msgstr "Crédit" -#: src/view/AccountPanel.cpp:200 +#: src/view/AccountPanel.cpp:193 msgid "Cur Credit" msgstr "Cur Crédit" -#: src/view/AccountPanel.cpp:201 +#: src/view/AccountPanel.cpp:194 msgid "Cur Debit" msgstr "Cur Débit" -#: src/view/AccountPanel.cpp:122 +#: src/view/AccountPanel.cpp:115 msgid "Current value" msgstr "Valeur courante" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 msgid "Date" msgstr "Date" -#: src/view/AccountPanel.cpp:8 +#: src/view/SearchPanel.cpp:47 +msgid "Date from" +msgstr "Date min" + +#: src/view/SearchPanel.cpp:48 +msgid "Date to" +msgstr "Date max" + +#: src/view/GridAccount.cpp:46 msgid "Debit" msgstr "Débit" -#: src/view/PreferencesPanel.cpp:115 +#: src/view/PreferencesPanel.cpp:134 msgid "Default" msgstr "Défaut" -#: src/view/PreferencesPanel.cpp:116 -#: src/view/PreferencesPanel.cpp:166 -#: src/view/AccountPanel.cpp:833 +#: src/view/PreferencesPanel.cpp:135 +#: src/view/PreferencesPanel.cpp:185 +#: src/view/AccountPanel.cpp:763 msgid "Delete" msgstr "Supprimer" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 +#: src/view/SearchPanel.cpp:74 msgid "Description" msgstr "Description" -#: src/model/Database.cpp:83 -#: src/model/Database.cpp:106 -#: src/view/PasswordDialog.cpp:53 -#: src/view/PasswordDialog.cpp:59 -#: src/view/PreferencesPanel.cpp:282 -#: src/view/PreferencesPanel.cpp:315 -#: src/view/PreferencesPanel.cpp:415 -#: src/view/PreferencesPanel.cpp:454 -#: src/view/PreferencesPanel.cpp:460 -#: src/view/AccountPanel.cpp:970 -#: src/view/UsersDialog.cpp:67 -#: src/view/UsersDialog.cpp:95 +#: src/model/Database.cpp:102 +#: src/model/Database.cpp:125 +#: src/view/PasswordDialog.cpp:72 +#: src/view/PasswordDialog.cpp:78 +#: src/view/PreferencesPanel.cpp:301 +#: src/view/PreferencesPanel.cpp:324 +#: src/view/PreferencesPanel.cpp:343 +#: src/view/PreferencesPanel.cpp:433 +#: src/view/PreferencesPanel.cpp:452 +#: src/view/PreferencesPanel.cpp:491 +#: src/view/PreferencesPanel.cpp:497 +#: src/view/AccountPanel.cpp:900 +#: src/view/UsersDialog.cpp:86 +#: src/view/UsersDialog.cpp:114 +#: src/view/SearchPanel.cpp:128 +#: src/view/SearchPanel.cpp:138 +#: src/view/SearchPanel.cpp:150 +#: src/view/SearchPanel.cpp:159 msgid "Error" msgstr "Erreur" -#: src/model/Database.cpp:106 +#: src/model/Database.cpp:125 msgid "Error creating original database" msgstr "Erreur durant la création de la base de données initiale" -#: src/view/AccountPanel.cpp:123 +#: src/view/AccountPanel.cpp:116 msgid "Final value" msgstr "Valeur finale" -#: src/controller/KissCount.cpp:239 +#: src/model/Database.cpp:258 +#: src/controller/KissCount.cpp:258 +#: src/view/GridAccount.cpp:123 msgid "Fix" msgstr "Fixe" -#: src/model/Database.cpp:239 -#: src/view/AccountPanel.cpp:406 -msgid "Fixe" -msgstr "Fixe" - -#: src/view/PreferencesPanel.cpp:165 +#: src/view/PreferencesPanel.cpp:184 msgid "Font" msgstr "Police" -#: src/view/GenerateDialog.cpp:26 +#: src/view/GenerateDialog.cpp:45 msgid "From " msgstr "De" -#: src/view/GenerateDialog.cpp:12 -#: src/view/AccountPanel.cpp:830 +#: src/view/GenerateDialog.cpp:31 +#: src/view/AccountPanel.cpp:760 msgid "Generate month" msgstr "Générer mois" -#: src/controller/KissCount.cpp:241 +#: src/controller/KissCount.cpp:260 msgid "Groceries" msgstr "Courses" -#: src/controller/KissCount.cpp:243 +#: src/controller/KissCount.cpp:262 msgid "Hobbies" msgstr "Loisirs" -#: src/view/AccountPanel.cpp:121 +#: src/view/AccountPanel.cpp:114 msgid "Initial value" msgstr "Valeur initiale" -#: src/view/PreferencesPanel.cpp:454 +#: src/view/SearchPanel.cpp:138 +msgid "Invalid amount from" +msgstr "Montant min invalide" + +#: src/view/SearchPanel.cpp:159 +msgid "Invalid amount range" +msgstr "Intervalle des montants invalide" + +#: src/view/SearchPanel.cpp:150 +msgid "Invalid amount to" +msgstr "Montant max invalide" + +#: src/view/SearchPanel.cpp:128 +msgid "Invalid date range" +msgstr "Intervalle des dates invalide" + +#: src/view/PreferencesPanel.cpp:491 msgid "Invalid name" msgstr "Nom invalide" -#: src/view/PasswordDialog.cpp:53 +#: src/view/PasswordDialog.cpp:72 msgid "Invalid old password" msgstr "Ancien mot de passe invalide" -#: src/view/UsersDialog.cpp:67 +#: src/view/UsersDialog.cpp:86 msgid "Invalid password" msgstr "Mot de passe invalide" -#: src/view/PreferencesPanel.cpp:282 +#: src/view/PreferencesPanel.cpp:301 msgid "It must be at least one account !" msgstr "Il doit y avoir au moins un compte !" -#: src/view/AccountPanel.cpp:970 +#: src/view/AccountPanel.cpp:900 msgid "It must be at least one month !" msgstr "Il doit rester au mois un mois" -#: src/view/PreferencesPanel.cpp:50 +#: src/view/PreferencesPanel.cpp:69 msgid "Kill me" msgstr "Kill me" -#: src/view/PreferencesPanel.cpp:484 -#: src/view/PreferencesPanel.cpp:487 +#: src/view/PreferencesPanel.cpp:521 +#: src/view/PreferencesPanel.cpp:524 msgid "KissCount" msgstr "KissCount" -#: src/view/ButtonPanel.cpp:71 +#: src/view/ButtonPanel.cpp:96 msgid "" "KissCount v0.1\n" "\n" @@ -260,194 +310,203 @@ msgstr "" "\n" "Copyright (C) 2010 Grégory Soutadé" -#: src/view/PreferencesPanel.cpp:34 +#: src/view/PreferencesPanel.cpp:53 msgid "Language" msgstr "Langue" -#: src/view/PreferencesPanel.cpp:487 +#: src/view/PreferencesPanel.cpp:524 msgid "Language not changed" msgstr "Langue non changée" -#: src/view/PreferencesPanel.cpp:484 +#: src/view/PreferencesPanel.cpp:521 msgid "Language successfully changed, please go to another panel" msgstr "Langue changée, allez sur un autre panneau pour rendre le changement effectif" -#: src/view/PreferencesPanel.cpp:42 -#: src/view/PreferencesPanel.cpp:112 -#: src/view/PreferencesPanel.cpp:163 +#: src/view/PreferencesPanel.cpp:61 +#: src/view/PreferencesPanel.cpp:131 +#: src/view/PreferencesPanel.cpp:182 msgid "Name" msgstr "Nom" -#: src/view/PreferencesPanel.cpp:466 +#: src/view/PreferencesPanel.cpp:503 msgid "Name changed" msgstr "Nom changé" -#: src/view/UsersDialog.cpp:33 -#: src/view/UsersDialog.cpp:84 +#: src/view/UsersDialog.cpp:52 +#: src/view/UsersDialog.cpp:103 msgid "New User" msgstr "Nouvel utilisateur" -#: src/view/PasswordDialog.cpp:22 +#: src/view/PasswordDialog.cpp:41 msgid "New password " msgstr "Nouveau mot de passe" -#: src/model/Database.cpp:77 +#: src/model/Database.cpp:96 msgid "No database found, creating a new one" msgstr "Aucune base de données trouvée, création d'une nouvelle" -#: src/view/PreferencesPanel.cpp:113 +#: src/view/SearchPanel.cpp:208 +msgid "No entry found" +msgstr "Pas d'entrée trouvée" + +#: src/view/PreferencesPanel.cpp:132 msgid "Number" msgstr "Numéro de compte" -#: src/view/PasswordDialog.cpp:36 -#: src/view/GenerateDialog.cpp:40 -#: src/view/UsersDialog.cpp:31 +#: src/view/PasswordDialog.cpp:55 +#: src/view/GenerateDialog.cpp:59 +#: src/view/UsersDialog.cpp:50 msgid "OK" msgstr "OK" -#: src/view/PasswordDialog.cpp:17 +#: src/view/PasswordDialog.cpp:36 msgid "Old password " msgstr "Ancien mot de passe" -#: src/controller/KissCount.cpp:245 +#: src/controller/KissCount.cpp:264 msgid "Operating exepense" msgstr "Frais de fonctionnement" -#: src/view/ButtonPanel.cpp:26 +#: src/view/ButtonPanel.cpp:46 msgid "Operations" msgstr "Opérations" -#: src/controller/KissCount.cpp:249 +#: src/controller/KissCount.cpp:268 msgid "Other" msgstr "Autres" -#: src/view/UsersDialog.cpp:24 +#: src/view/UsersDialog.cpp:43 msgid "Password " msgstr "Mot de passe" -#: src/view/PasswordDialog.cpp:65 +#: src/view/PasswordDialog.cpp:84 msgid "Password changed" msgstr "Mot de passe changé" -#: src/view/PasswordDialog.cpp:59 +#: src/view/PasswordDialog.cpp:78 msgid "Please retype new password" msgstr "Re entrez le mot de passe" -#: src/view/PreferencesPanel.cpp:468 -#: src/view/PreferencesPanel.cpp:493 -#: src/view/ButtonPanel.cpp:29 +#: src/view/PreferencesPanel.cpp:505 +#: src/view/PreferencesPanel.cpp:530 +#: src/view/ButtonPanel.cpp:49 msgid "Preferences" msgstr "Préférences" -#: src/view/ButtonPanel.cpp:32 +#: src/view/ButtonPanel.cpp:52 msgid "Quit" msgstr "Quitter" -#: src/view/ButtonPanel.cpp:78 +#: src/view/ButtonPanel.cpp:103 msgid "Quit KissCount ?" msgstr "Quitter KissCount ?" -#: src/view/AccountPanel.cpp:202 +#: src/view/AccountPanel.cpp:195 msgid "Remains" msgstr "Restant" -#: src/view/ButtonPanel.cpp:28 +#: src/view/SearchPanel.cpp:72 +#: src/view/SearchPanel.cpp:226 +#: src/view/ButtonPanel.cpp:48 msgid "Search" msgstr "Chercher" -#: src/view/AccountPanel.cpp:83 +#: src/view/AccountPanel.cpp:97 msgid "Serie 1" msgstr "Série 1" -#: src/view/PreferencesPanel.cpp:114 +#: src/view/PreferencesPanel.cpp:133 msgid "Shared" msgstr "Partagé" -#: src/view/ButtonPanel.cpp:27 +#: src/view/ButtonPanel.cpp:47 msgid "Statistics" msgstr "Statistiques" -#: src/view/GenerateDialog.cpp:33 +#: src/view/GenerateDialog.cpp:52 msgid "To " msgstr "A" -#: src/view/AccountPanel.cpp:184 +#: src/view/AccountPanel.cpp:177 msgid "Total Credit" msgstr "Total Crédit" -#: src/view/AccountPanel.cpp:185 +#: src/view/AccountPanel.cpp:178 msgid "Total Debit" msgstr "Total Débit" -#: src/controller/KissCount.cpp:247 +#: src/controller/KissCount.cpp:266 msgid "Unexpected" msgstr "Exceptionnel" -#: src/model/User.cpp:27 -#: src/model/User.cpp:41 -#: src/model/User.cpp:61 +#: src/model/User.cpp:46 +#: src/model/User.cpp:60 +#: src/model/User.cpp:80 msgid "Unknown" msgstr "Inconnu" -#: src/view/PreferencesPanel.cpp:31 +#: src/view/PreferencesPanel.cpp:50 msgid "User" msgstr "Utilisateur" -#: src/view/PreferencesPanel.cpp:460 -#: src/view/UsersDialog.cpp:19 -#: src/view/UsersDialog.cpp:95 +#: src/view/PreferencesPanel.cpp:497 +#: src/view/UsersDialog.cpp:38 +#: src/view/UsersDialog.cpp:114 msgid "User " msgstr "Utilisateur" -#: src/view/UsersDialog.cpp:11 +#: src/view/UsersDialog.cpp:30 msgid "Users" msgstr "Utilisateurs" -#: src/view/wxUI.cpp:77 +#: src/view/wxUI.cpp:97 msgid "april" msgstr "avril" -#: src/view/wxUI.cpp:81 +#: src/view/wxUI.cpp:101 msgid "august" msgstr "août" -#: src/view/wxUI.cpp:85 +#: src/view/wxUI.cpp:105 msgid "december" msgstr "décembre" -#: src/view/wxUI.cpp:75 +#: src/view/wxUI.cpp:95 msgid "february" msgstr "février" -#: src/view/wxUI.cpp:74 +#: src/view/wxUI.cpp:94 msgid "january" msgstr "janvier" -#: src/view/wxUI.cpp:80 +#: src/view/wxUI.cpp:100 msgid "july" msgstr "juillet" -#: src/view/wxUI.cpp:79 +#: src/view/wxUI.cpp:99 msgid "june" msgstr "juin" -#: src/view/wxUI.cpp:76 +#: src/view/wxUI.cpp:96 msgid "march" msgstr "mars" -#: src/view/wxUI.cpp:78 +#: src/view/wxUI.cpp:98 msgid "may" msgstr "mai" -#: src/view/wxUI.cpp:84 +#: src/view/wxUI.cpp:104 msgid "november" msgstr "novembre" -#: src/view/wxUI.cpp:83 +#: src/view/wxUI.cpp:103 msgid "october" msgstr "octobre" -#: src/view/wxUI.cpp:82 +#: src/view/wxUI.cpp:102 msgid "september" msgstr "septembre" +#~ msgid "Fixe" +#~ msgstr "Fixe" + diff --git a/ressources/po/kisscount.pot b/ressources/po/kisscount.pot index b474c94..a620d9a 100644 --- a/ressources/po/kisscount.pot +++ b/ressources/po/kisscount.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-07-08 19:24+0200\n" +"POT-Creation-Date: 2010-07-16 18:37+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,220 +16,261 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/view/PreferencesPanel.cpp:493 +#: src/view/PreferencesPanel.cpp:530 msgid " - " msgstr "" -#: src/view/PreferencesPanel.cpp:315 src/view/PreferencesPanel.cpp:415 -#: src/view/PreferencesPanel.cpp:460 src/view/UsersDialog.cpp:95 +#: src/view/PreferencesPanel.cpp:324 src/view/PreferencesPanel.cpp:343 +#: src/view/PreferencesPanel.cpp:433 src/view/PreferencesPanel.cpp:452 +#: src/view/PreferencesPanel.cpp:497 src/view/UsersDialog.cpp:114 msgid " already exists" msgstr "" -#: src/model/Database.cpp:83 +#: src/view/SearchPanel.cpp:204 +msgid " entries found" +msgstr "" + +#: src/model/Database.cpp:102 msgid " not found, aborting" msgstr "" -#: src/view/AccountPanel.cpp:979 +#: src/view/AccountPanel.cpp:909 msgid " operations ?" msgstr "" -#: src/view/PreferencesPanel.cpp:500 +#: src/view/PreferencesPanel.cpp:537 msgid " profil ?" msgstr "" -#: src/view/ButtonPanel.cpp:31 +#: src/view/SearchPanel.cpp:206 +msgid "1 entry found" +msgstr "" + +#: src/view/ButtonPanel.cpp:51 msgid "About" msgstr "" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 src/view/SearchPanel.cpp:78 msgid "Account" msgstr "" -#: src/view/PreferencesPanel.cpp:315 +#: src/view/PreferencesPanel.cpp:324 src/view/PreferencesPanel.cpp:343 msgid "Account " msgstr "" -#: src/view/AccountPanel.cpp:120 +#: src/view/AccountPanel.cpp:113 msgid "Account name" msgstr "" -#: src/view/AccountPanel.cpp:119 +#: src/view/AccountPanel.cpp:112 msgid "Account number" msgstr "" -#: src/view/PreferencesPanel.cpp:32 +#: src/view/PreferencesPanel.cpp:51 msgid "Accounts" msgstr "" -#: src/view/PreferencesPanel.cpp:286 src/view/PreferencesPanel.cpp:500 -#: src/view/AccountPanel.cpp:974 +#: src/view/SearchPanel.cpp:75 +msgid "Amount from" +msgstr "" + +#: src/view/SearchPanel.cpp:76 +msgid "Amount to" +msgstr "" + +#: src/view/PreferencesPanel.cpp:305 src/view/PreferencesPanel.cpp:537 +#: src/view/AccountPanel.cpp:904 msgid "Are you sure want to delete " msgstr "" -#: src/view/PreferencesPanel.cpp:386 src/view/AccountPanel.cpp:684 +#: src/view/PreferencesPanel.cpp:414 src/view/AccountPanel.cpp:614 msgid "Are you sure want to delete : \n" msgstr "" -#: src/view/PasswordDialog.cpp:37 src/view/GenerateDialog.cpp:41 -#: src/view/UsersDialog.cpp:32 +#: src/view/PasswordDialog.cpp:56 src/view/GenerateDialog.cpp:60 +#: src/view/UsersDialog.cpp:51 msgid "Cancel" msgstr "" -#: src/view/PreferencesPanel.cpp:33 +#: src/view/PreferencesPanel.cpp:52 msgid "Categories" msgstr "" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 src/view/SearchPanel.cpp:77 msgid "Category" msgstr "" -#: src/view/PreferencesPanel.cpp:415 +#: src/view/PreferencesPanel.cpp:433 src/view/PreferencesPanel.cpp:452 msgid "Category " msgstr "" -#: src/view/PreferencesPanel.cpp:48 +#: src/view/PreferencesPanel.cpp:67 msgid "Change Name" msgstr "" -#: src/view/PreferencesPanel.cpp:49 +#: src/view/PreferencesPanel.cpp:68 msgid "Change Password" msgstr "" -#: src/view/PasswordDialog.cpp:10 +#: src/view/PasswordDialog.cpp:29 msgid "Change password" msgstr "" -#: src/view/ButtonPanel.cpp:30 +#: src/view/ButtonPanel.cpp:50 msgid "Change user" msgstr "" -#: src/view/PreferencesPanel.cpp:164 +#: src/view/PreferencesPanel.cpp:183 msgid "Color" msgstr "" -#: src/view/PasswordDialog.cpp:27 +#: src/view/PasswordDialog.cpp:46 msgid "Confirm password " msgstr "" -#: src/view/AccountPanel.cpp:130 +#: src/view/AccountPanel.cpp:123 msgid "Cost repartition" msgstr "" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 msgid "Credit" msgstr "" -#: src/view/AccountPanel.cpp:200 +#: src/view/AccountPanel.cpp:193 msgid "Cur Credit" msgstr "" -#: src/view/AccountPanel.cpp:201 +#: src/view/AccountPanel.cpp:194 msgid "Cur Debit" msgstr "" -#: src/view/AccountPanel.cpp:122 +#: src/view/AccountPanel.cpp:115 msgid "Current value" msgstr "" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 msgid "Date" msgstr "" -#: src/view/AccountPanel.cpp:8 +#: src/view/SearchPanel.cpp:47 +msgid "Date from" +msgstr "" + +#: src/view/SearchPanel.cpp:48 +msgid "Date to" +msgstr "" + +#: src/view/GridAccount.cpp:46 msgid "Debit" msgstr "" -#: src/view/PreferencesPanel.cpp:115 +#: src/view/PreferencesPanel.cpp:134 msgid "Default" msgstr "" -#: src/view/PreferencesPanel.cpp:116 src/view/PreferencesPanel.cpp:166 -#: src/view/AccountPanel.cpp:833 +#: src/view/PreferencesPanel.cpp:135 src/view/PreferencesPanel.cpp:185 +#: src/view/AccountPanel.cpp:763 msgid "Delete" msgstr "" -#: src/view/AccountPanel.cpp:8 +#: src/view/GridAccount.cpp:46 src/view/SearchPanel.cpp:74 msgid "Description" msgstr "" -#: src/model/Database.cpp:83 src/model/Database.cpp:106 -#: src/view/PasswordDialog.cpp:53 src/view/PasswordDialog.cpp:59 -#: src/view/PreferencesPanel.cpp:282 src/view/PreferencesPanel.cpp:315 -#: src/view/PreferencesPanel.cpp:415 src/view/PreferencesPanel.cpp:454 -#: src/view/PreferencesPanel.cpp:460 src/view/AccountPanel.cpp:970 -#: src/view/UsersDialog.cpp:67 src/view/UsersDialog.cpp:95 +#: src/model/Database.cpp:102 src/model/Database.cpp:125 +#: src/view/PasswordDialog.cpp:72 src/view/PasswordDialog.cpp:78 +#: src/view/PreferencesPanel.cpp:301 src/view/PreferencesPanel.cpp:324 +#: src/view/PreferencesPanel.cpp:343 src/view/PreferencesPanel.cpp:433 +#: src/view/PreferencesPanel.cpp:452 src/view/PreferencesPanel.cpp:491 +#: src/view/PreferencesPanel.cpp:497 src/view/AccountPanel.cpp:900 +#: src/view/UsersDialog.cpp:86 src/view/UsersDialog.cpp:114 +#: src/view/SearchPanel.cpp:128 src/view/SearchPanel.cpp:138 +#: src/view/SearchPanel.cpp:150 src/view/SearchPanel.cpp:159 msgid "Error" msgstr "" -#: src/model/Database.cpp:106 +#: src/model/Database.cpp:125 msgid "Error creating original database" msgstr "" -#: src/view/AccountPanel.cpp:123 +#: src/view/AccountPanel.cpp:116 msgid "Final value" msgstr "" -#: src/controller/KissCount.cpp:239 +#: src/model/Database.cpp:258 src/controller/KissCount.cpp:258 +#: src/view/GridAccount.cpp:123 msgid "Fix" msgstr "" -#: src/model/Database.cpp:239 src/view/AccountPanel.cpp:406 -msgid "Fixe" -msgstr "" - -#: src/view/PreferencesPanel.cpp:165 +#: src/view/PreferencesPanel.cpp:184 msgid "Font" msgstr "" -#: src/view/GenerateDialog.cpp:26 +#: src/view/GenerateDialog.cpp:45 msgid "From " msgstr "" -#: src/view/GenerateDialog.cpp:12 src/view/AccountPanel.cpp:830 +#: src/view/GenerateDialog.cpp:31 src/view/AccountPanel.cpp:760 msgid "Generate month" msgstr "" -#: src/controller/KissCount.cpp:241 +#: src/controller/KissCount.cpp:260 msgid "Groceries" msgstr "" -#: src/controller/KissCount.cpp:243 +#: src/controller/KissCount.cpp:262 msgid "Hobbies" msgstr "" -#: src/view/AccountPanel.cpp:121 +#: src/view/AccountPanel.cpp:114 msgid "Initial value" msgstr "" -#: src/view/PreferencesPanel.cpp:454 +#: src/view/SearchPanel.cpp:138 +msgid "Invalid amount from" +msgstr "" + +#: src/view/SearchPanel.cpp:159 +msgid "Invalid amount range" +msgstr "" + +#: src/view/SearchPanel.cpp:150 +msgid "Invalid amount to" +msgstr "" + +#: src/view/SearchPanel.cpp:128 +msgid "Invalid date range" +msgstr "" + +#: src/view/PreferencesPanel.cpp:491 msgid "Invalid name" msgstr "" -#: src/view/PasswordDialog.cpp:53 +#: src/view/PasswordDialog.cpp:72 msgid "Invalid old password" msgstr "" -#: src/view/UsersDialog.cpp:67 +#: src/view/UsersDialog.cpp:86 msgid "Invalid password" msgstr "" -#: src/view/PreferencesPanel.cpp:282 +#: src/view/PreferencesPanel.cpp:301 msgid "It must be at least one account !" msgstr "" -#: src/view/AccountPanel.cpp:970 +#: src/view/AccountPanel.cpp:900 msgid "It must be at least one month !" msgstr "" -#: src/view/PreferencesPanel.cpp:50 +#: src/view/PreferencesPanel.cpp:69 msgid "Kill me" msgstr "" -#: src/view/PreferencesPanel.cpp:484 src/view/PreferencesPanel.cpp:487 +#: src/view/PreferencesPanel.cpp:521 src/view/PreferencesPanel.cpp:524 msgid "KissCount" msgstr "" -#: src/view/ButtonPanel.cpp:71 +#: src/view/ButtonPanel.cpp:96 msgid "" "KissCount v0.1\n" "\n" @@ -238,186 +279,191 @@ msgid "" "Copyright (C) 2010 Grégory Soutadé" msgstr "" -#: src/view/PreferencesPanel.cpp:34 +#: src/view/PreferencesPanel.cpp:53 msgid "Language" msgstr "" -#: src/view/PreferencesPanel.cpp:487 +#: src/view/PreferencesPanel.cpp:524 msgid "Language not changed" msgstr "" -#: src/view/PreferencesPanel.cpp:484 +#: src/view/PreferencesPanel.cpp:521 msgid "Language successfully changed, please go to another panel" msgstr "" -#: src/view/PreferencesPanel.cpp:42 src/view/PreferencesPanel.cpp:112 -#: src/view/PreferencesPanel.cpp:163 +#: src/view/PreferencesPanel.cpp:61 src/view/PreferencesPanel.cpp:131 +#: src/view/PreferencesPanel.cpp:182 msgid "Name" msgstr "" -#: src/view/PreferencesPanel.cpp:466 +#: src/view/PreferencesPanel.cpp:503 msgid "Name changed" msgstr "" -#: src/view/UsersDialog.cpp:33 src/view/UsersDialog.cpp:84 +#: src/view/UsersDialog.cpp:52 src/view/UsersDialog.cpp:103 msgid "New User" msgstr "" -#: src/view/PasswordDialog.cpp:22 +#: src/view/PasswordDialog.cpp:41 msgid "New password " msgstr "" -#: src/model/Database.cpp:77 +#: src/model/Database.cpp:96 msgid "No database found, creating a new one" msgstr "" -#: src/view/PreferencesPanel.cpp:113 +#: src/view/SearchPanel.cpp:208 +msgid "No entry found" +msgstr "" + +#: src/view/PreferencesPanel.cpp:132 msgid "Number" msgstr "" -#: src/view/PasswordDialog.cpp:36 src/view/GenerateDialog.cpp:40 -#: src/view/UsersDialog.cpp:31 +#: src/view/PasswordDialog.cpp:55 src/view/GenerateDialog.cpp:59 +#: src/view/UsersDialog.cpp:50 msgid "OK" msgstr "" -#: src/view/PasswordDialog.cpp:17 +#: src/view/PasswordDialog.cpp:36 msgid "Old password " msgstr "" -#: src/controller/KissCount.cpp:245 +#: src/controller/KissCount.cpp:264 msgid "Operating exepense" msgstr "" -#: src/view/ButtonPanel.cpp:26 +#: src/view/ButtonPanel.cpp:46 msgid "Operations" msgstr "" -#: src/controller/KissCount.cpp:249 +#: src/controller/KissCount.cpp:268 msgid "Other" msgstr "" -#: src/view/UsersDialog.cpp:24 +#: src/view/UsersDialog.cpp:43 msgid "Password " msgstr "" -#: src/view/PasswordDialog.cpp:65 +#: src/view/PasswordDialog.cpp:84 msgid "Password changed" msgstr "" -#: src/view/PasswordDialog.cpp:59 +#: src/view/PasswordDialog.cpp:78 msgid "Please retype new password" msgstr "" -#: src/view/PreferencesPanel.cpp:468 src/view/PreferencesPanel.cpp:493 -#: src/view/ButtonPanel.cpp:29 +#: src/view/PreferencesPanel.cpp:505 src/view/PreferencesPanel.cpp:530 +#: src/view/ButtonPanel.cpp:49 msgid "Preferences" msgstr "" -#: src/view/ButtonPanel.cpp:32 +#: src/view/ButtonPanel.cpp:52 msgid "Quit" msgstr "" -#: src/view/ButtonPanel.cpp:78 +#: src/view/ButtonPanel.cpp:103 msgid "Quit KissCount ?" msgstr "" -#: src/view/AccountPanel.cpp:202 +#: src/view/AccountPanel.cpp:195 msgid "Remains" msgstr "" -#: src/view/ButtonPanel.cpp:28 +#: src/view/SearchPanel.cpp:72 src/view/SearchPanel.cpp:226 +#: src/view/ButtonPanel.cpp:48 msgid "Search" msgstr "" -#: src/view/AccountPanel.cpp:83 +#: src/view/AccountPanel.cpp:97 msgid "Serie 1" msgstr "" -#: src/view/PreferencesPanel.cpp:114 +#: src/view/PreferencesPanel.cpp:133 msgid "Shared" msgstr "" -#: src/view/ButtonPanel.cpp:27 +#: src/view/ButtonPanel.cpp:47 msgid "Statistics" msgstr "" -#: src/view/GenerateDialog.cpp:33 +#: src/view/GenerateDialog.cpp:52 msgid "To " msgstr "" -#: src/view/AccountPanel.cpp:184 +#: src/view/AccountPanel.cpp:177 msgid "Total Credit" msgstr "" -#: src/view/AccountPanel.cpp:185 +#: src/view/AccountPanel.cpp:178 msgid "Total Debit" msgstr "" -#: src/controller/KissCount.cpp:247 +#: src/controller/KissCount.cpp:266 msgid "Unexpected" msgstr "" -#: src/model/User.cpp:27 src/model/User.cpp:41 src/model/User.cpp:61 +#: src/model/User.cpp:46 src/model/User.cpp:60 src/model/User.cpp:80 msgid "Unknown" msgstr "" -#: src/view/PreferencesPanel.cpp:31 +#: src/view/PreferencesPanel.cpp:50 msgid "User" msgstr "" -#: src/view/PreferencesPanel.cpp:460 src/view/UsersDialog.cpp:19 -#: src/view/UsersDialog.cpp:95 +#: src/view/PreferencesPanel.cpp:497 src/view/UsersDialog.cpp:38 +#: src/view/UsersDialog.cpp:114 msgid "User " msgstr "" -#: src/view/UsersDialog.cpp:11 +#: src/view/UsersDialog.cpp:30 msgid "Users" msgstr "" -#: src/view/wxUI.cpp:77 +#: src/view/wxUI.cpp:97 msgid "april" msgstr "" -#: src/view/wxUI.cpp:81 +#: src/view/wxUI.cpp:101 msgid "august" msgstr "" -#: src/view/wxUI.cpp:85 +#: src/view/wxUI.cpp:105 msgid "december" msgstr "" -#: src/view/wxUI.cpp:75 +#: src/view/wxUI.cpp:95 msgid "february" msgstr "" -#: src/view/wxUI.cpp:74 +#: src/view/wxUI.cpp:94 msgid "january" msgstr "" -#: src/view/wxUI.cpp:80 +#: src/view/wxUI.cpp:100 msgid "july" msgstr "" -#: src/view/wxUI.cpp:79 +#: src/view/wxUI.cpp:99 msgid "june" msgstr "" -#: src/view/wxUI.cpp:76 +#: src/view/wxUI.cpp:96 msgid "march" msgstr "" -#: src/view/wxUI.cpp:78 +#: src/view/wxUI.cpp:98 msgid "may" msgstr "" -#: src/view/wxUI.cpp:84 +#: src/view/wxUI.cpp:104 msgid "november" msgstr "" -#: src/view/wxUI.cpp:83 +#: src/view/wxUI.cpp:103 msgid "october" msgstr "" -#: src/view/wxUI.cpp:82 +#: src/view/wxUI.cpp:102 msgid "september" msgstr "" diff --git a/src/model/Database.cpp b/src/model/Database.cpp index 4a9d5f7..21797cc 100644 --- a/src/model/Database.cpp +++ b/src/model/Database.cpp @@ -926,7 +926,7 @@ std::vector* Database::Search(User* user, wxString* description, wxDa if (description) { - req += wxT("UPPER(description) LIKE '%") + description->MakeUpper() + wxT("%'"); + req += wxT("description LIKE '%") + *description + wxT("%'"); firstCond = true; } diff --git a/src/view/PreferencesPanel.cpp b/src/view/PreferencesPanel.cpp index ea42b04..cce8f6a 100644 --- a/src/view/PreferencesPanel.cpp +++ b/src/view/PreferencesPanel.cpp @@ -318,6 +318,15 @@ void PreferencesPanel::OnAccountModified(wxGridEvent& event) _wxUI->NeedReload(); return; } + + if (user->GetAccountId(new_account.name) != new_account.id) + { + wxMessageBox(_("Account ")+new_account.name+_(" already exists"), _("Error"), wxICON_ERROR | wxOK ); + _accountsGrid->SetCellValue(row, ACCOUNT_NAME, user->_accounts[row].name); + inModification = false; + return ; + } + _kiss->UpdateAccount(new_account); } // New account @@ -418,6 +427,15 @@ void PreferencesPanel::OnCategoryModified(wxGridEvent& event) inModification = false; return; } + + if (user->GetCategoryId(new_cat.name) != new_cat.id) + { + wxMessageBox(_("Category ")+new_cat.name+_(" already exists"), _("Error"), wxICON_ERROR | wxOK ); + _categoriesGrid->SetCellValue(row, CATEGORY_NAME, user->_categories[row].name); + inModification = false; + return ; + } + _kiss->UpdateCategory(new_cat); } // New category diff --git a/src/view/SearchPanel.cpp b/src/view/SearchPanel.cpp index 5463b9b..c97e5a1 100644 --- a/src/view/SearchPanel.cpp +++ b/src/view/SearchPanel.cpp @@ -19,11 +19,13 @@ along with KissCount. If not, see . #include "AccountPanel.h" -enum {SEARCH_ID, GRID_ID}; +enum {SEARCH_ID, GRID_ID, CALENDAR_FROM_ID, CALENDAR_TO_ID}; BEGIN_EVENT_TABLE(SearchPanel, wxPanel) EVT_BUTTON(SEARCH_ID, SearchPanel::OnButtonSearch) EVT_SHOW(SearchPanel::OnShow) +EVT_CALENDAR_SEL_CHANGED(CALENDAR_FROM_ID, SearchPanel::OnCalendarFromChange) +EVT_CALENDAR_SEL_CHANGED(CALENDAR_TO_ID, SearchPanel::OnCalendarToChange) END_EVENT_TABLE() #define SET_ROW_COLOR(row, color) for(int i=0; iGetDate() > _calendarTo->GetDate()) { - wxMessageBox(_("Invalide date range"), _("Error"), wxICON_ERROR | wxOK); + wxMessageBox(_("Invalid date range"), _("Error"), wxICON_ERROR | wxOK); return; } @@ -133,7 +135,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event) *amountFrom = _amountFrom->GetLineText(0); if (!amountFrom->ToDouble(&af)) { - wxMessageBox(_("Invalide amount from"), _("Error"), wxICON_ERROR | wxOK); + wxMessageBox(_("Invalid amount from"), _("Error"), wxICON_ERROR | wxOK); delete amountFrom; return; } @@ -145,7 +147,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event) *amountTo = _amountTo->GetLineText(0); if (!amountTo->ToDouble(&at)) { - wxMessageBox(_("Invalide amount to"), _("Error"), wxICON_ERROR | wxOK); + wxMessageBox(_("Invalid amount to"), _("Error"), wxICON_ERROR | wxOK); delete amountFrom; delete amountTo; return; @@ -154,7 +156,7 @@ void SearchPanel::OnButtonSearch(wxCommandEvent& event) if (amountFrom && amountTo && af > at) { - wxMessageBox(_("Invalide amount range"), _("Error"), wxICON_ERROR | wxOK); + wxMessageBox(_("Invalid amount range"), _("Error"), wxICON_ERROR | wxOK); delete amountFrom; delete amountTo; return; @@ -224,3 +226,12 @@ void SearchPanel::OnShow(wxShowEvent& event) _wxUI->SetTitle(_kiss->GetUser()->_name + wxT(" - ") + _("Search")); } +void SearchPanel::OnCalendarFromChange(wxCalendarEvent& event) +{ + _checkDateFrom->SetValue(true); +} + +void SearchPanel::OnCalendarToChange(wxCalendarEvent& event) +{ + _checkDateTo->SetValue(true); +} diff --git a/src/view/SearchPanel.h b/src/view/SearchPanel.h index 4da55ff..393a8e6 100644 --- a/src/view/SearchPanel.h +++ b/src/view/SearchPanel.h @@ -46,6 +46,8 @@ class SearchPanel: public wxScrolledWindow void OnButtonSearch(wxCommandEvent& event); void OnShow(wxShowEvent& event); + void OnCalendarFromChange(wxCalendarEvent& event); + void OnCalendarToChange(wxCalendarEvent& event); private: KissCount* _kiss;