From dfe81f2b030a4e484e3eb9fb521e3de073f34a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sun, 4 Jul 2010 19:39:39 +0200 Subject: [PATCH] Add initial locale support --- Makefile | 5 +- generate_locales.sh | 3 + ressources/po/french.mo | Bin 0 -> 4633 bytes ressources/po/french.po | 410 +++++++++++++++++++++++++++++++++++ ressources/po/kisscount.mo | Bin 0 -> 395 bytes ressources/po/kisscount.pot | 405 ++++++++++++++++++++++++++++++++++ src/controller/KissCount.cpp | 4 +- src/view/AccountPanel.cpp | 2 +- src/view/wxUI.cpp | 46 +++- src/view/wxUI.h | 5 +- 10 files changed, 873 insertions(+), 7 deletions(-) create mode 100755 generate_locales.sh create mode 100644 ressources/po/french.mo create mode 100644 ressources/po/french.po create mode 100644 ressources/po/kisscount.mo create mode 100644 ressources/po/kisscount.pot diff --git a/Makefile b/Makefile index dfa502b..5d5b9b5 100644 --- a/Makefile +++ b/Makefile @@ -27,4 +27,7 @@ clean: $(CXX) $(CXXFLAGS) $< -c kc: $(OBJS) - $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) \ No newline at end of file + $(CXX) $(CXXFLAGS) $^ -o $@ $(LDFLAGS) + +generate_locals: + ./generate_locales.sh diff --git a/generate_locales.sh b/generate_locales.sh new file mode 100755 index 0000000..f259b1d --- /dev/null +++ b/generate_locales.sh @@ -0,0 +1,3 @@ +#!/bin/bash +CPP_FILE_LIST=`find src -name '*.cpp' -print` +xgettext --from-code utf-8 -d kisscount -s --keyword=_ -p ./ressources/po -o kisscount.pot $CPP_FILE_LIST \ No newline at end of file diff --git a/ressources/po/french.mo b/ressources/po/french.mo new file mode 100644 index 0000000000000000000000000000000000000000..5227c4a849f38aec72549753fae05f2239f4e09c GIT binary patch literal 4633 zcma);U5H&*700(tlh)C;wrc#0?y5CSo12fu);MjFjx&>Vnq=l?W)g$ehcox?J9FZ> z=UmUnOr{DJ)D}UXtYRTTA0jwvLA10;RZOm65k)DAR3yX)Ay^Q7s1H5_fB$p#xp$H_ z;^waN+ut8+t-bcWaNG6YFr<^ndy&6fXUrGinT>o%-@3t=4e%*=3;Z^G8+-=d1kb}a z!rwy;`7`8aF7mk%UV?9i|AIHe%f9|58nxbL_)}AHrMVbMP(jMW}gShMM;x)O@c%?f+GHJ={R0#@`6pqPZDr+-9hCxA^vL z&{E#%>zh#HAMp&J=IKD4H-cK{b5MHt3Y7l73AMlP!`tCcq4aP8YW>Ub1l+`?HUFof z#xFp&Y!aw>Ps2Ol<52tk0mOvn$G-hJ$j|(e4^x`oL9P2Td^h|%)cH2@(K@$6wQq*n z$5yC$clz>uzPukY)J#J8M-ys)^N^nj_-K3=YTg1$FOPaY=J`0({9lDS*VjGIK#l(n z)c9vSe*`tp^HA&l3~JmtsQ$l(I_FF9jyK@XQ2nk$S@N4r@U3t&l>YAGqw#w^$DsD} zu;($z&z$5Vzv@7(a~ggSJ_fhKv%dZ}kR{C@p!9Rm^A#w6_&0n9+(<#(0^bhrg_`#; zd>5Sa?Ok90WvF?-1~uR4hD(&MTcpIFD zx(AC;`}sW7`p-kH|8poior4GoIh|?axB_;W^J=LFxOqQ0x5(mU{5K1f}PHdcF#! zm;XTZzYNv?29%?DZh_jD(j2k{xd)j-WS4spCFy)ynKNb@Di+Kl$B~B-CC#ffwj!TE z>ZF*j^kGD{tkXNmNXL7TeZEq$sZQf$b|RbW3iyD}?|_qtbbGh2I{+Jq{6n-h=24%Kwx;Ucr0-?n3VKW%;YqYY0?QJ za$^fgk(;qri~a-Jy28dm*9{9rcfqA~F*9SSv#UvAvx3Y@5a%{eY}-XHcg*lV8b|Gj z84u!?i$LxclQeW$on0MdtQlVl;zehtwF{qb23fX}r0u%gyQ*AdY;in^5`E)Nn09U5 zh53>!x2fv|C`Gz3l#xctN}@7l3@WTffREYZ3AR61*xbn=xTbt5C=NpF>dFXi^m@on~=UAuSL zLuvnu=hrazs-45_g0_mLw5~q3RhqkPrrnA?E;}kyAH}9p>t#n^KU&NAlI4E9b1&H_g;_93IiaSC17qh(30xlmlkg zb%QX@%$y6-))K(4?QS!-ghJY8F2^0RJZxoVKCwuS>b%!gh048-$DfIlmDrRT(8re9 z%mlqOj7(50VouX`EmvO0j$25JAYC=5g1BN4Q7BMFx7yB#9S z4YOm@ zYr{A@46};3y@Vi_bWwbbX)b)buxLk>anWV4LTFu6_0G&>?lQZa6q(KXFQn=~AxgrO z*xSP^x>)r8=wlUl$Ktq%=uhPB>n{4x>+|cXeS|HSi<9o47%4R6+Jvq~9hg%>%j?&- zw-$LAg&AH{C@8af$ucWxl?P#PRn2kiPlqm& qA%5xUKr!r^diKH7v0Sp?sdqWAM;Pn%$oPc*@t}YCctHPnkozyButo#` literal 0 HcmV?d00001 diff --git a/ressources/po/french.po b/ressources/po/french.po new file mode 100644 index 0000000..8269964 --- /dev/null +++ b/ressources/po/french.po @@ -0,0 +1,410 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Last-Translator: Soutadé \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: French\n" +"X-Poedit-Country: FRANCE\n" +"X-Poedit-SourceCharset: utf-8\n" + +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#: src/view/PreferencesPanel.cpp:448 +msgid " - " +msgstr " - " + +#: src/view/PreferencesPanel.cpp:284 +#: src/view/PreferencesPanel.cpp:384 +#: src/view/PreferencesPanel.cpp:429 +#: src/view/UsersDialog.cpp:95 +msgid " already exists" +msgstr "existe déjà " + +#: src/model/Database.cpp:83 +msgid " not found, aborting" +msgstr "non trouvé, arrêt" + +#: src/view/AccountPanel.cpp:979 +msgid " operations ?" +msgstr "opérations ?" + +#: src/view/PreferencesPanel.cpp:455 +msgid " profil ?" +msgstr "profil ?" + +#: src/view/ButtonPanel.cpp:31 +msgid "About" +msgstr "A propos" + +#: src/view/AccountPanel.cpp:8 +msgid "Account" +msgstr "Compte" + +#: src/view/PreferencesPanel.cpp:284 +msgid "Account " +msgstr "Compte" + +#: src/view/AccountPanel.cpp:120 +msgid "Account name" +msgstr "Nom du compte" + +#: src/view/AccountPanel.cpp:119 +msgid "Account number" +msgstr "numéro de compte" + +#: src/view/PreferencesPanel.cpp:31 +msgid "Accounts" +msgstr "Comptes" + +#: src/view/PreferencesPanel.cpp:255 +#: src/view/PreferencesPanel.cpp:455 +#: src/view/AccountPanel.cpp:974 +msgid "Are you sure want to delete " +msgstr "Etes vous sûr de vouloir supprimer" + +#: src/view/PreferencesPanel.cpp:355 +#: src/view/AccountPanel.cpp:684 +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 +msgid "Cancel" +msgstr "Annuler" + +#: src/view/PreferencesPanel.cpp:32 +msgid "Categories" +msgstr "Catégories" + +#: src/view/AccountPanel.cpp:8 +msgid "Category" +msgstr "Catégorie" + +#: src/view/PreferencesPanel.cpp:384 +msgid "Category " +msgstr "Catégorie" + +#: src/view/PreferencesPanel.cpp:46 +msgid "Change Name" +msgstr "Changer de nom" + +#: src/view/PreferencesPanel.cpp:47 +msgid "Change Password" +msgstr "Changer le mot de passe" + +#: src/view/PasswordDialog.cpp:10 +msgid "Change password" +msgstr "Changer le mot de passe" + +#: src/view/ButtonPanel.cpp:30 +msgid "Change user" +msgstr "Changer d'utilisateur" + +#: src/view/PreferencesPanel.cpp:147 +msgid "Color" +msgstr "Couleur" + +#: src/view/PasswordDialog.cpp:27 +msgid "Confirm password " +msgstr "Confirmer le mot de passe" + +#: src/view/AccountPanel.cpp:130 +msgid "Cost repartition" +msgstr "Répartition des coûts" + +#: src/view/AccountPanel.cpp:8 +msgid "Credit" +msgstr "Crédit" + +#: src/view/AccountPanel.cpp:200 +msgid "Cur Credit" +msgstr "Cur Crédit" + +#: src/view/AccountPanel.cpp:201 +msgid "Cur Debit" +msgstr "Cur Débit" + +#: src/view/AccountPanel.cpp:122 +msgid "Current value" +msgstr "Valeur courante" + +#: src/view/AccountPanel.cpp:8 +msgid "Date" +msgstr "Date" + +#: src/view/AccountPanel.cpp:8 +msgid "Debit" +msgstr "Débit" + +#: src/view/PreferencesPanel.cpp:98 +msgid "Default" +msgstr "Défaut" + +#: src/view/PreferencesPanel.cpp:99 +#: src/view/PreferencesPanel.cpp:149 +#: src/view/AccountPanel.cpp:833 +msgid "Delete" +msgstr "Supprimer" + +#: src/view/AccountPanel.cpp:8 +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:251 +#: src/view/PreferencesPanel.cpp:284 +#: src/view/PreferencesPanel.cpp:384 +#: src/view/PreferencesPanel.cpp:423 +#: src/view/PreferencesPanel.cpp:429 +#: src/view/AccountPanel.cpp:970 +#: src/view/UsersDialog.cpp:67 +#: src/view/UsersDialog.cpp:95 +msgid "Error" +msgstr "Erreur" + +#: src/model/Database.cpp:106 +msgid "Error creating original database" +msgstr "Erreur durant la création de la base de données initiale" + +#: src/view/AccountPanel.cpp:123 +msgid "Final value" +msgstr "Valeur finale" + +#: src/view/AccountPanel.cpp:406 +msgid "Fixe" +msgstr "Fixe" + +#: src/view/PreferencesPanel.cpp:148 +msgid "Font" +msgstr "Police" + +#: src/view/GenerateDialog.cpp:26 +msgid "From " +msgstr "De" + +#: src/view/GenerateDialog.cpp:12 +#: src/view/AccountPanel.cpp:830 +msgid "Generate month" +msgstr "Générer mois" + +#: src/view/AccountPanel.cpp:121 +msgid "Initial value" +msgstr "Valeur initiale" + +#: src/view/PreferencesPanel.cpp:423 +msgid "Invalid name" +msgstr "Nom invalide" + +#: src/view/PasswordDialog.cpp:53 +msgid "Invalid old password" +msgstr "Ancien mot de passe invalide" + +#: src/view/UsersDialog.cpp:67 +msgid "Invalid password" +msgstr "Mot de passe invalide" + +#: src/view/PreferencesPanel.cpp:251 +msgid "It must be at least one account !" +msgstr "Il doit y avoir au moins un compte !" + +#: src/view/AccountPanel.cpp:970 +msgid "It must be at least one month !" +msgstr "Il doit rester au mois un mois" + +#: src/view/PreferencesPanel.cpp:48 +msgid "Kill me" +msgstr "Kill me" + +#: src/view/ButtonPanel.cpp:71 +msgid "" +"KissCount v0.1\n" +"\n" +"Personal accounting software\n" +"\n" +"Copyright (C) 2010 Grégory Soutadé" +msgstr "" +"KissCount v0.1\n" +"\n" +"Logiciel de comptabilité personnelle\n" +"\n" +"Copyright (C) 2010 Grégory Soutadé" + +#: src/view/PreferencesPanel.cpp:40 +#: src/view/PreferencesPanel.cpp:95 +#: src/view/PreferencesPanel.cpp:146 +msgid "Name" +msgstr "Nom" + +#: src/view/PreferencesPanel.cpp:435 +msgid "Name changed" +msgstr "Nom changé" + +#: src/view/UsersDialog.cpp:33 +#: src/view/UsersDialog.cpp:84 +msgid "New User" +msgstr "Nouvel utilisateur" + +#: src/view/PasswordDialog.cpp:22 +msgid "New password " +msgstr "Nouveau mot de passe" + +#: src/model/Database.cpp:77 +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:96 +msgid "Number" +msgstr "Nombre" + +#: src/view/PasswordDialog.cpp:36 +#: src/view/GenerateDialog.cpp:40 +#: src/view/UsersDialog.cpp:31 +msgid "OK" +msgstr "OK" + +#: src/view/PasswordDialog.cpp:17 +msgid "Old password " +msgstr "Ancien mot de passe" + +#: src/view/ButtonPanel.cpp:26 +msgid "Operations" +msgstr "Opérations" + +#: src/view/UsersDialog.cpp:24 +msgid "Password " +msgstr "Mot de passe" + +#: src/view/PasswordDialog.cpp:65 +msgid "Password changed" +msgstr "Mot de passe changé" + +#: src/view/PasswordDialog.cpp:59 +msgid "Please retype new password" +msgstr "Re entrez le mot de passe" + +#: src/view/PreferencesPanel.cpp:437 +#: src/view/PreferencesPanel.cpp:448 +#: src/view/ButtonPanel.cpp:29 +msgid "Preferences" +msgstr "Préférences" + +#: src/view/ButtonPanel.cpp:32 +msgid "Quit" +msgstr "Quitter" + +#: src/view/ButtonPanel.cpp:78 +msgid "Quit KissCount ?" +msgstr "Quitter KissCount ?" + +#: src/view/AccountPanel.cpp:202 +msgid "Remains" +msgstr "Restant" + +#: src/view/ButtonPanel.cpp:28 +msgid "Search" +msgstr "Chercher" + +#: src/view/AccountPanel.cpp:83 +msgid "Serie 1" +msgstr "Série 1" + +#: src/view/PreferencesPanel.cpp:97 +msgid "Shared" +msgstr "Partagé" + +#: src/view/ButtonPanel.cpp:27 +msgid "Statistics" +msgstr "Statistiques" + +#: src/view/GenerateDialog.cpp:33 +msgid "To " +msgstr "A" + +#: src/view/AccountPanel.cpp:184 +msgid "Total Credit" +msgstr "Total Crédit" + +#: src/view/AccountPanel.cpp:185 +msgid "Total Debit" +msgstr "Total Débit" + +#: src/model/User.cpp:27 +#: src/model/User.cpp:41 +#: src/model/User.cpp:61 +msgid "Unknown" +msgstr "Inconnu" + +#: src/view/PreferencesPanel.cpp:30 +msgid "User" +msgstr "Utilisateur" + +#: src/view/PreferencesPanel.cpp:429 +#: src/view/UsersDialog.cpp:19 +#: src/view/UsersDialog.cpp:95 +msgid "User " +msgstr "Utilisateur" + +#: src/view/UsersDialog.cpp:11 +msgid "Users" +msgstr "Utilisateurs" + +#: src/view/wxUI.cpp:3 +msgid "april" +msgstr "avril" + +#: src/view/wxUI.cpp:3 +msgid "august" +msgstr "août" + +#: src/view/wxUI.cpp:3 +msgid "december" +msgstr "décembre" + +#: src/view/wxUI.cpp:3 +msgid "february" +msgstr "février" + +#: src/view/wxUI.cpp:3 +msgid "january" +msgstr "janvier" + +#: src/view/wxUI.cpp:3 +msgid "july" +msgstr "juillet" + +#: src/view/wxUI.cpp:3 +msgid "june" +msgstr "juin" + +#: src/view/wxUI.cpp:3 +msgid "march" +msgstr "mars" + +#: src/view/wxUI.cpp:3 +msgid "may" +msgstr "mai" + +#: src/view/wxUI.cpp:3 +msgid "november" +msgstr "novembre" + +#: src/view/wxUI.cpp:3 +msgid "october" +msgstr "octobre" + +#: src/view/wxUI.cpp:3 +msgid "september" +msgstr "septembre" + diff --git a/ressources/po/kisscount.mo b/ressources/po/kisscount.mo new file mode 100644 index 0000000000000000000000000000000000000000..c9ad0b9dc596bd197bbb4a9aa50894a3e48ae64a GIT binary patch literal 395 zcmZvWO-{ow5Jrn&l_hHyUa%`uoCt~3{0Pwo6hYchQpDCICN)a!%AO#45DvjPxCdup zf&|?#(vvOE^UU|PyYt?o+9LLdePWw9Ai9c)J8BN;?3};KoqbUyLR!Ita$Z{_STIv7 z>ku+u>k2O0+CyRKIiD6Va!MjuFqWtUi+IR^9|J#PVJxDk&m+!BgqeEP-L!wap$Nl1 z{o}!{^azEM#y1kJ6YSo$D67v8cItm_>Y`ps-3&^*JSW@Kt*jLkN-il*mS)K&bU5I_ z$Qo3JMy^+s4b>YSt{SP$2`d-Ud4*^5;tJx8*R6h54iZz^N}F1+_(@~%2)R|2M)+MR fSYql%`^Ba;vaLb47HmFAi)74h(#iFBngzXYqHS*` literal 0 HcmV?d00001 diff --git a/ressources/po/kisscount.pot b/ressources/po/kisscount.pot new file mode 100644 index 0000000..e80ade8 --- /dev/null +++ b/ressources/po/kisscount.pot @@ -0,0 +1,405 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: \n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2010-07-04 18:22+0200\n" +"PO-Revision-Date: 2010-07-04 19:11+0100\n" +"Last-Translator: Soutadé \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: English\n" +"X-Poedit-Country: UNITED KINGDOM\n" + +#: src/view/PreferencesPanel.cpp:448 +msgid " - " +msgstr "" + +#: src/view/PreferencesPanel.cpp:284 +#: src/view/PreferencesPanel.cpp:384 +#: src/view/PreferencesPanel.cpp:429 +#: src/view/UsersDialog.cpp:95 +msgid " already exists" +msgstr "" + +#: src/model/Database.cpp:83 +msgid " not found, aborting" +msgstr "" + +#: src/view/AccountPanel.cpp:979 +msgid " operations ?" +msgstr "" + +#: src/view/PreferencesPanel.cpp:455 +msgid " profil ?" +msgstr "" + +#: src/view/ButtonPanel.cpp:31 +msgid "About" +msgstr "" + +#: src/view/AccountPanel.cpp:8 +msgid "Account" +msgstr "" + +#: src/view/PreferencesPanel.cpp:284 +msgid "Account " +msgstr "" + +#: src/view/AccountPanel.cpp:120 +msgid "Account name" +msgstr "" + +#: src/view/AccountPanel.cpp:119 +msgid "Account number" +msgstr "" + +#: src/view/PreferencesPanel.cpp:31 +msgid "Accounts" +msgstr "" + +#: src/view/PreferencesPanel.cpp:255 +#: src/view/PreferencesPanel.cpp:455 +#: src/view/AccountPanel.cpp:974 +msgid "Are you sure want to delete " +msgstr "" + +#: src/view/PreferencesPanel.cpp:355 +#: src/view/AccountPanel.cpp:684 +msgid "Are you sure want to delete : \n" +msgstr "" + +#: src/view/PasswordDialog.cpp:37 +#: src/view/GenerateDialog.cpp:41 +#: src/view/UsersDialog.cpp:32 +msgid "Cancel" +msgstr "" + +#: src/view/PreferencesPanel.cpp:32 +msgid "Categories" +msgstr "" + +#: src/view/AccountPanel.cpp:8 +msgid "Category" +msgstr "" + +#: src/view/PreferencesPanel.cpp:384 +msgid "Category " +msgstr "" + +#: src/view/PreferencesPanel.cpp:46 +msgid "Change Name" +msgstr "" + +#: src/view/PreferencesPanel.cpp:47 +msgid "Change Password" +msgstr "" + +#: src/view/PasswordDialog.cpp:10 +msgid "Change password" +msgstr "" + +#: src/view/ButtonPanel.cpp:30 +msgid "Change user" +msgstr "" + +#: src/view/PreferencesPanel.cpp:147 +msgid "Color" +msgstr "" + +#: src/view/PasswordDialog.cpp:27 +msgid "Confirm password " +msgstr "" + +#: src/view/AccountPanel.cpp:130 +msgid "Cost repartition" +msgstr "" + +#: src/view/AccountPanel.cpp:8 +msgid "Credit" +msgstr "" + +#: src/view/AccountPanel.cpp:200 +msgid "Cur Credit" +msgstr "" + +#: src/view/AccountPanel.cpp:201 +msgid "Cur Debit" +msgstr "" + +#: src/view/AccountPanel.cpp:122 +msgid "Current value" +msgstr "" + +#: src/view/AccountPanel.cpp:8 +msgid "Date" +msgstr "" + +#: src/view/AccountPanel.cpp:8 +msgid "Debit" +msgstr "" + +#: src/view/PreferencesPanel.cpp:98 +msgid "Default" +msgstr "" + +#: src/view/PreferencesPanel.cpp:99 +#: src/view/PreferencesPanel.cpp:149 +#: src/view/AccountPanel.cpp:833 +msgid "Delete" +msgstr "" + +#: src/view/AccountPanel.cpp:8 +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:251 +#: src/view/PreferencesPanel.cpp:284 +#: src/view/PreferencesPanel.cpp:384 +#: src/view/PreferencesPanel.cpp:423 +#: src/view/PreferencesPanel.cpp:429 +#: src/view/AccountPanel.cpp:970 +#: src/view/UsersDialog.cpp:67 +#: src/view/UsersDialog.cpp:95 +msgid "Error" +msgstr "" + +#: src/model/Database.cpp:106 +msgid "Error creating original database" +msgstr "" + +#: src/view/AccountPanel.cpp:123 +msgid "Final value" +msgstr "" + +#: src/view/AccountPanel.cpp:406 +msgid "Fixe" +msgstr "" + +#: src/view/PreferencesPanel.cpp:148 +msgid "Font" +msgstr "" + +#: src/view/GenerateDialog.cpp:26 +msgid "From " +msgstr "" + +#: src/view/GenerateDialog.cpp:12 +#: src/view/AccountPanel.cpp:830 +msgid "Generate month" +msgstr "" + +#: src/view/AccountPanel.cpp:121 +msgid "Initial value" +msgstr "" + +#: src/view/PreferencesPanel.cpp:423 +msgid "Invalid name" +msgstr "" + +#: src/view/PasswordDialog.cpp:53 +msgid "Invalid old password" +msgstr "" + +#: src/view/UsersDialog.cpp:67 +msgid "Invalid password" +msgstr "" + +#: src/view/PreferencesPanel.cpp:251 +msgid "It must be at least one account !" +msgstr "" + +#: src/view/AccountPanel.cpp:970 +msgid "It must be at least one month !" +msgstr "" + +#: src/view/PreferencesPanel.cpp:48 +msgid "Kill me" +msgstr "" + +#: src/view/ButtonPanel.cpp:71 +msgid "" +"KissCount v0.1\n" +"\n" +"Personal accounting software\n" +"\n" +"Copyright (C) 2010 Grégory Soutadé" +msgstr "" + +#: src/view/PreferencesPanel.cpp:40 +#: src/view/PreferencesPanel.cpp:95 +#: src/view/PreferencesPanel.cpp:146 +msgid "Name" +msgstr "" + +#: src/view/PreferencesPanel.cpp:435 +msgid "Name changed" +msgstr "" + +#: src/view/UsersDialog.cpp:33 +#: src/view/UsersDialog.cpp:84 +msgid "New User" +msgstr "" + +#: src/view/PasswordDialog.cpp:22 +msgid "New password " +msgstr "" + +#: src/model/Database.cpp:77 +msgid "No database found, creating a new one" +msgstr "" + +#: src/view/PreferencesPanel.cpp:96 +msgid "Number" +msgstr "" + +#: src/view/PasswordDialog.cpp:36 +#: src/view/GenerateDialog.cpp:40 +#: src/view/UsersDialog.cpp:31 +msgid "OK" +msgstr "" + +#: src/view/PasswordDialog.cpp:17 +msgid "Old password " +msgstr "" + +#: src/view/ButtonPanel.cpp:26 +msgid "Operations" +msgstr "" + +#: src/view/UsersDialog.cpp:24 +msgid "Password " +msgstr "" + +#: src/view/PasswordDialog.cpp:65 +msgid "Password changed" +msgstr "" + +#: src/view/PasswordDialog.cpp:59 +msgid "Please retype new password" +msgstr "" + +#: src/view/PreferencesPanel.cpp:437 +#: src/view/PreferencesPanel.cpp:448 +#: src/view/ButtonPanel.cpp:29 +msgid "Preferences" +msgstr "" + +#: src/view/ButtonPanel.cpp:32 +msgid "Quit" +msgstr "" + +#: src/view/ButtonPanel.cpp:78 +msgid "Quit KissCount ?" +msgstr "" + +#: src/view/AccountPanel.cpp:202 +msgid "Remains" +msgstr "" + +#: src/view/ButtonPanel.cpp:28 +msgid "Search" +msgstr "" + +#: src/view/AccountPanel.cpp:83 +msgid "Serie 1" +msgstr "" + +#: src/view/PreferencesPanel.cpp:97 +msgid "Shared" +msgstr "" + +#: src/view/ButtonPanel.cpp:27 +msgid "Statistics" +msgstr "" + +#: src/view/GenerateDialog.cpp:33 +msgid "To " +msgstr "" + +#: src/view/AccountPanel.cpp:184 +msgid "Total Credit" +msgstr "" + +#: src/view/AccountPanel.cpp:185 +msgid "Total Debit" +msgstr "" + +#: src/model/User.cpp:27 +#: src/model/User.cpp:41 +#: src/model/User.cpp:61 +msgid "Unknown" +msgstr "" + +#: src/view/PreferencesPanel.cpp:30 +msgid "User" +msgstr "" + +#: src/view/PreferencesPanel.cpp:429 +#: src/view/UsersDialog.cpp:19 +#: src/view/UsersDialog.cpp:95 +msgid "User " +msgstr "" + +#: src/view/UsersDialog.cpp:11 +msgid "Users" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "april" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "august" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "december" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "february" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "january" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "july" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "june" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "march" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "may" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "november" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "october" +msgstr "" + +#: src/view/wxUI.cpp:3 +msgid "september" +msgstr "" + diff --git a/src/controller/KissCount.cpp b/src/controller/KissCount.cpp index 5c66906..129054a 100644 --- a/src/controller/KissCount.cpp +++ b/src/controller/KissCount.cpp @@ -1,9 +1,11 @@ #include "KissCount.h" - + KissCount::KissCount() : _user(NULL) { _wxUI = new wxUI(this, wxT("KissCount"), wxPoint(50, 50), wxSize(1024, 768)); + _wxUI->InitLanguage(wxLocale::GetSystemLanguage()); + _wxUI->Show(true); _wxUI->Centre(); _wxUI->Disable(); diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index db97a3b..ecd09ee 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -5,7 +5,7 @@ enum {ACCOUNT_NUMBER, ACCOUNT_NAME, ACCOUNT_INIT, ACCOUNT_CUR, ACCOUNT_FINAL, NU enum {CUR_CREDIT, CUR_DEBIT, TOTAL_CREDIT, TOTAL_DEBIT, REMAINS, STATS_ROW, CATS_STATS}; enum {CALENDAR_TREE_ID=1, OPS_GRID_ID, CALENDAR_ID, ACCOUNTS_GRID_ID, MENU_GENERATE_ID, MENU_DELETE_ID}; -static wxString colsName[] = {_("Description"), _("Date"), _("Debit"), _("Credit"), _("Category"), _("Account"), _(""), _("")}; +static wxString colsName[] = {_("Description"), _("Date"), _("Debit"), _("Credit"), _("Category"), _("Account"), wxT(""), wxT("")}; BEGIN_EVENT_TABLE(AccountPanel, wxPanel) EVT_GRID_CMD_CELL_CHANGE(OPS_GRID_ID, AccountPanel::OnOperationModified) diff --git a/src/view/wxUI.cpp b/src/view/wxUI.cpp index 0bc9564..fab25ab 100644 --- a/src/view/wxUI.cpp +++ b/src/view/wxUI.cpp @@ -1,10 +1,10 @@ #include "wxUI.h" -wxString months[12] = {_("january"), _("february"), _("march"), _("april"), _("may"), _("june"), _("july"), _("august"), _("september"), _("october"), _("november"), _("december")} ; +wxString months[12] ; wxUI::wxUI(KissCount* kiss, const wxString& title, const wxPoint& pos, const wxSize& size) : wxFrame(NULL, -1, title, pos, size), _kiss(kiss), _accountPanel(NULL), _preferencesPanel(NULL), _curPanel(NULL), - _needReload(false) + _locale(NULL), _needReload(false) { _hbox = new wxBoxSizer(wxVERTICAL); ButtonPanel* buttons = new ButtonPanel(_kiss, this); @@ -22,6 +22,19 @@ wxUI::wxUI(KissCount* kiss, const wxString& title, const wxPoint& pos, const wxS // CreateStatusBar(); // SetStatusText( wxT("Welcome to wxWidgets!") ); + months[0] = _("january"); + months[1] = _("february"); + months[2] = _("march"); + months[3] = _("april"); + months[4] = _("may"); + months[5] = _("june"); + months[6] = _("july"); + months[7] = _("august"); + months[8] = _("september"); + months[9] = _("october"); + months[10] = _("november"); + months[11] = _("december") ; + SetSizer(_hbox); _hbox->Add(buttons); @@ -31,6 +44,35 @@ wxUI::~wxUI() { if (_accountPanel) delete _accountPanel; if (_preferencesPanel) delete _preferencesPanel; + if (_locale) delete _locale; +} + +bool wxUI::InitLanguage(long language) +{ + if (_locale) delete _locale; + + // load language if possible, fall back to english otherwise + if(wxLocale::IsAvailable(language)) + { + _locale = new wxLocale( language, wxLOCALE_CONV_ENCODING ); + +#ifdef __WXGTK__ + _locale->AddCatalogLookupPathPrefix(wxT("./ressources/po")); +#endif + + _locale->AddCatalog(wxT("french")); + _locale->AddCatalog(wxT("kisscount")); + } + + if ((_locale == NULL || !_locale->IsOk()) && wxLocale::IsAvailable(wxLANGUAGE_ENGLISH)) + { + if (_locale) delete _locale; + _locale = new wxLocale( wxLANGUAGE_ENGLISH ); + language = wxLANGUAGE_ENGLISH; + return false; + } + + return true; } void wxUI::ShowAccount() diff --git a/src/view/wxUI.h b/src/view/wxUI.h index 77c9163..af9e2c1 100644 --- a/src/view/wxUI.h +++ b/src/view/wxUI.h @@ -22,8 +22,7 @@ class wxUI: public wxFrame wxUI(KissCount* kiss, const wxString& title, const wxPoint& pos, const wxSize& size); ~wxUI(); - void OnQuit(wxCommandEvent& event); - void OnAbout(wxCommandEvent& event); + bool InitLanguage(long language); void ChangeUser(); void LoadUser(); @@ -42,7 +41,9 @@ class wxUI: public wxFrame AccountPanel *_accountPanel; PreferencesPanel *_preferencesPanel; wxPanel *_curPanel; + wxLocale *_locale; bool _needReload; + void ShowPanel(wxPanel* panel); };