- Fixed language detection on Windows

- Slightly improved the translation
 - Added the 'package-win32-zip' target to ease win32 deliveries
This commit is contained in:
Olivier Teulière 2008-01-12 20:42:25 +00:00
parent 572b31c64e
commit 6138130800
9 changed files with 196 additions and 92 deletions

View file

@ -1,3 +1,41 @@
SUBDIRS = intl dic game utils wxwin po SUBDIRS = intl dic game utils wxwin po
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
# Prepare the win32 package
WIN32_PACKAGE_DIR = $(top_builddir)/eliot-$(VERSION)
.PHONY: package-win32-zip
package-win32-zip:
# Check that the working directory is not already there
@if test -e $(WIN32_PACKAGE_DIR); then \
echo '$(WIN32_PACKAGE_DIR) is in the way'; \
false; \
fi
rm -f eliot-$(VERSION)-win32.zip
mkdir -p $(WIN32_PACKAGE_DIR)
# Copy the binaries and strip them
cp $(top_builddir)/wxwin/eliot$(EXEEXT) $(top_builddir)/dic/compdic$(EXEEXT) $(top_builddir)/dic/listdic$(EXEEXT) $(WIN32_PACKAGE_DIR)
$(STRIP) $(WIN32_PACKAGE_DIR)/*
# Copy the i18n files
cat $(top_srcdir)/po/LINGUAS | while read lang; do \
mkdir -p $(WIN32_PACKAGE_DIR)/locale/$${lang}/LC_MESSAGES; \
cp $(top_srcdir)/po/$${lang}.gmo $(WIN32_PACKAGE_DIR)/locale/$${lang}/LC_MESSAGES/eliot.mo; \
done
# Copy relevant text files
for i in AUTHORS COPYING; do \
cp $(top_srcdir)/$$i $(WIN32_PACKAGE_DIR)/$$i.txt; \
unix2dos $(WIN32_PACKAGE_DIR)/$$i.txt; \
done
# Copy the mingw DLL
gunzip -c /usr/share/doc/mingw32-runtime/mingwm10.dll.gz > $(WIN32_PACKAGE_DIR)/mingwm10.dll
# Zip the temporary dir and remove it
zip -r -9 eliot-$(VERSION)-win32.zip $(WIN32_PACKAGE_DIR)
rm -rf $(WIN32_PACKAGE_DIR)

View file

@ -1 +1,3 @@
fr en@quot en@boldquot fr
en@quot
en@boldquot

View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-01-08 16:59+0100\n" "POT-Creation-Date: 2008-01-12 21:14+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -569,15 +569,27 @@ msgstr ""
msgid "No result" msgid "No result"
msgstr "" msgstr ""
#: wxwin/auxframes.cc:409 #: wxwin/auxframes.cc:373
msgid "Rack + 1"
msgstr ""
#: wxwin/auxframes.cc:415
msgid "Rack: " msgid "Rack: "
msgstr "" msgstr ""
#: wxwin/auxframes.cc:525 wxwin/mainframe.cc:325 #: wxwin/auxframes.cc:436
msgid "Benjamins"
msgstr ""
#: wxwin/auxframes.cc:477
msgid "Extensions"
msgstr ""
#: wxwin/auxframes.cc:543 wxwin/mainframe.cc:325
msgid "Game history" msgid "Game history"
msgstr "" msgstr ""
#: wxwin/auxframes.cc:557 wxwin/mainframe.cc:327 #: wxwin/auxframes.cc:575 wxwin/mainframe.cc:327
msgid "Results" msgid "Results"
msgstr "" msgstr ""
@ -725,48 +737,48 @@ msgstr ""
msgid "Results of the search" msgid "Results of the search"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:206 #: wxwin/mainframe.cc:188
msgid " Rack " msgid " Rack "
msgstr "" msgstr ""
#: wxwin/mainframe.cc:207 #: wxwin/mainframe.cc:189
msgid " Complement " msgid " Complement "
msgstr "" msgstr ""
#: wxwin/mainframe.cc:208 #: wxwin/mainframe.cc:190
msgid " Search " msgid " Search "
msgstr "" msgstr ""
#: wxwin/mainframe.cc:209 #: wxwin/mainframe.cc:191
msgid " Back " msgid " Back "
msgstr "" msgstr ""
#: wxwin/mainframe.cc:210 #: wxwin/mainframe.cc:192
msgid " Play " msgid " Play "
msgstr "" msgstr ""
#: wxwin/mainframe.cc:212 #: wxwin/mainframe.cc:194
msgid "Random rack" msgid "Random rack"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:214 #: wxwin/mainframe.cc:196
msgid "Random complement of the rack" msgid "Random complement of the rack"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:216 #: wxwin/mainframe.cc:198
msgid "Search with the current rack" msgid "Search with the current rack"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:218 #: wxwin/mainframe.cc:200
msgid "Go back one turn" msgid "Go back one turn"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:220 #: wxwin/mainframe.cc:202
msgid "Play the selected word" msgid "Play the selected word"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:272 #: wxwin/mainframe.cc:272
msgid "&New game\tctrl+n" msgid "&New game\tCtrl+N"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:272 #: wxwin/mainframe.cc:272
@ -774,7 +786,7 @@ msgid "Start a new game"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:273 #: wxwin/mainframe.cc:273
msgid "New &joker game\tctrl+j" msgid "New &joker game\tCtrl+J"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:273 #: wxwin/mainframe.cc:273
@ -782,11 +794,11 @@ msgid "Start a new joker game"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:275 #: wxwin/mainframe.cc:275
msgid "&Load...\tctrl+l" msgid "&Load...\tCtrl+L"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:276 #: wxwin/mainframe.cc:276
msgid "&Save as...\tctrl+s" msgid "&Save as...\tCtrl+S"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:276 #: wxwin/mainframe.cc:276
@ -794,7 +806,7 @@ msgid "Save the current game"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:278 #: wxwin/mainframe.cc:278
msgid "&Print...\tctrl+p" msgid "&Print...\tCtrl+P"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:278 #: wxwin/mainframe.cc:278
@ -818,7 +830,7 @@ msgid "Print in a PostScript file"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:284 #: wxwin/mainframe.cc:284
msgid "&Quit" msgid "&Quit\tCtrl+Q"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:284 #: wxwin/mainframe.cc:284
@ -826,7 +838,7 @@ msgid "Quit Eliot"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:287 #: wxwin/mainframe.cc:287
msgid "&Dictionary..." msgid "&Dictionary...\tCtrl+D"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 #: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604
@ -978,7 +990,7 @@ msgid "Game board"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:317 #: wxwin/mainframe.cc:317
msgid "Ba&g" msgid "Ba&g\tCtrl+B"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:317 #: wxwin/mainframe.cc:317
@ -1010,11 +1022,11 @@ msgid "Letters of the rack plus one"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:322 #: wxwin/mainframe.cc:322
msgid "R&accords" msgid "&Extensions"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:322 #: wxwin/mainframe.cc:322
msgid "Raccords on a word of the search" msgid "One-letter extensions on a word of the search"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:323 #: wxwin/mainframe.cc:323
@ -1022,11 +1034,11 @@ msgid "&Benjamins"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:323 #: wxwin/mainframe.cc:323
msgid "Benjamins on a word of the search" msgid "Benjamins (3-letter extensions) on a word of the search"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:325 #: wxwin/mainframe.cc:325
msgid "Game &history" msgid "Game &history\tCtrl+H"
msgstr "" msgstr ""
#: wxwin/mainframe.cc:327 #: wxwin/mainframe.cc:327

100
po/fr.po
View file

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: eliot 1.4\n" "Project-Id-Version: eliot 1.4\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-01-08 16:59+0100\n" "POT-Creation-Date: 2008-01-12 21:14+0100\n"
"PO-Revision-Date: 2005-02-06 20:03+0100\n" "PO-Revision-Date: 2005-02-06 20:03+0100\n"
"Last-Translator: Olivier Teuliere <ipkiss@via.ecp.fr>\n" "Last-Translator: Olivier Teuliere <ipkiss@via.ecp.fr>\n"
"Language-Team: French <traduc@traduc.org>\n" "Language-Team: French <traduc@traduc.org>\n"
@ -590,15 +590,27 @@ msgstr "Pas de partie en cours"
msgid "No result" msgid "No result"
msgstr "Pas de résultat" msgstr "Pas de résultat"
#: wxwin/auxframes.cc:409 #: wxwin/auxframes.cc:373
msgid "Rack + 1"
msgstr "Tirage + 1"
#: wxwin/auxframes.cc:415
msgid "Rack: " msgid "Rack: "
msgstr "Tirage :" msgstr "Tirage :"
#: wxwin/auxframes.cc:525 wxwin/mainframe.cc:325 #: wxwin/auxframes.cc:436
msgid "Benjamins"
msgstr "Benjamins"
#: wxwin/auxframes.cc:477
msgid "Extensions"
msgstr "Raccords"
#: wxwin/auxframes.cc:543 wxwin/mainframe.cc:325
msgid "Game history" msgid "Game history"
msgstr "Historique de la partie" msgstr "Historique de la partie"
#: wxwin/auxframes.cc:557 wxwin/mainframe.cc:327 #: wxwin/auxframes.cc:575 wxwin/mainframe.cc:327
msgid "Results" msgid "Results"
msgstr "Résultats" msgstr "Résultats"
@ -746,77 +758,77 @@ msgstr "Mot"
msgid "Results of the search" msgid "Results of the search"
msgstr "Résultats de la recherche" msgstr "Résultats de la recherche"
#: wxwin/mainframe.cc:206 #: wxwin/mainframe.cc:188
msgid " Rack " msgid " Rack "
msgstr " Tirage " msgstr " Tirage "
#: wxwin/mainframe.cc:207 #: wxwin/mainframe.cc:189
msgid " Complement " msgid " Complement "
msgstr " Complément " msgstr " Complément "
#: wxwin/mainframe.cc:208 #: wxwin/mainframe.cc:190
msgid " Search " msgid " Search "
msgstr " Rechercher " msgstr " Rechercher "
#: wxwin/mainframe.cc:209 #: wxwin/mainframe.cc:191
msgid " Back " msgid " Back "
msgstr " Arrière " msgstr " Arrière "
#: wxwin/mainframe.cc:210 #: wxwin/mainframe.cc:192
msgid " Play " msgid " Play "
msgstr " Jouer " msgstr " Jouer "
#: wxwin/mainframe.cc:212 #: wxwin/mainframe.cc:194
msgid "Random rack" msgid "Random rack"
msgstr "Tirage aléatoire" msgstr "Tirage aléatoire"
#: wxwin/mainframe.cc:214 #: wxwin/mainframe.cc:196
msgid "Random complement of the rack" msgid "Random complement of the rack"
msgstr "Complément aléatoire du tirage" msgstr "Complément aléatoire du tirage"
#: wxwin/mainframe.cc:216 #: wxwin/mainframe.cc:198
msgid "Search with the current rack" msgid "Search with the current rack"
msgstr "Recherche sur le tirage courant" msgstr "Recherche sur le tirage courant"
#: wxwin/mainframe.cc:218 #: wxwin/mainframe.cc:200
msgid "Go back one turn" msgid "Go back one turn"
msgstr "Revenir un coup en arrière" msgstr "Revenir un coup en arrière"
#: wxwin/mainframe.cc:220 #: wxwin/mainframe.cc:202
msgid "Play the selected word" msgid "Play the selected word"
msgstr "Jouer le mot selectionné" msgstr "Jouer le mot selectionné"
#: wxwin/mainframe.cc:272 #: wxwin/mainframe.cc:272
msgid "&New game\tctrl+n" msgid "&New game\tCtrl+N"
msgstr "&Nouvelle partie\tctrl+n" msgstr "&Nouvelle partie\tCtrl+N"
#: wxwin/mainframe.cc:272 #: wxwin/mainframe.cc:272
msgid "Start a new game" msgid "Start a new game"
msgstr "Démarrer une nouvelle partie" msgstr "Démarrer une nouvelle partie"
#: wxwin/mainframe.cc:273 #: wxwin/mainframe.cc:273
msgid "New &joker game\tctrl+j" msgid "New &joker game\tCtrl+J"
msgstr "Nouvelle partie &joker\tctrl+j" msgstr "Nouvelle partie &joker\tCtrl+J"
#: wxwin/mainframe.cc:273 #: wxwin/mainframe.cc:273
msgid "Start a new joker game" msgid "Start a new joker game"
msgstr "Démarrer une nouvelle partie joker" msgstr "Démarrer une nouvelle partie joker"
#: wxwin/mainframe.cc:275 #: wxwin/mainframe.cc:275
msgid "&Load...\tctrl+l" msgid "&Load...\tCtrl+L"
msgstr "&Charger...\tctrl+l" msgstr "&Charger...\tCtrl+O"
#: wxwin/mainframe.cc:276 #: wxwin/mainframe.cc:276
msgid "&Save as...\tctrl+s" msgid "&Save as...\tCtrl+S"
msgstr "&Enregistrer sous...\tctrl+s" msgstr "&Enregistrer sous...\tCtrl+S"
#: wxwin/mainframe.cc:276 #: wxwin/mainframe.cc:276
msgid "Save the current game" msgid "Save the current game"
msgstr "Sauvegarder la partie en cours" msgstr "Sauvegarder la partie en cours"
#: wxwin/mainframe.cc:278 #: wxwin/mainframe.cc:278
msgid "&Print...\tctrl+p" msgid "&Print...\tCtrl+P"
msgstr "&Imprimer...\tctrl+p" msgstr "&Imprimer...\tCtrl+P"
#: wxwin/mainframe.cc:278 #: wxwin/mainframe.cc:278
msgid "Print this game" msgid "Print this game"
@ -839,16 +851,16 @@ msgid "Print in a PostScript file"
msgstr "Imprimer dans un fichier PostScript" msgstr "Imprimer dans un fichier PostScript"
#: wxwin/mainframe.cc:284 #: wxwin/mainframe.cc:284
msgid "&Quit" msgid "&Quit\tCtrl+Q"
msgstr "&Quitter" msgstr "&Quitter\tCtrl+Q"
#: wxwin/mainframe.cc:284 #: wxwin/mainframe.cc:284
msgid "Quit Eliot" msgid "Quit Eliot"
msgstr "Quitter Eliot" msgstr "Quitter Eliot"
#: wxwin/mainframe.cc:287 #: wxwin/mainframe.cc:287
msgid "&Dictionary..." msgid "&Dictionary...\tCtrl+D"
msgstr "&Dictionnaire..." msgstr "&Dictionnaire...\tCtrl+D"
#: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604 #: wxwin/mainframe.cc:287 wxwin/mainframe.cc:604
msgid "Choose a dictionary" msgid "Choose a dictionary"
@ -999,8 +1011,8 @@ msgid "Game board"
msgstr "Plateau de jeu" msgstr "Plateau de jeu"
#: wxwin/mainframe.cc:317 #: wxwin/mainframe.cc:317
msgid "Ba&g" msgid "Ba&g\tCtrl+B"
msgstr "&Sac" msgstr "&Sac\tCtrl-B"
#: wxwin/mainframe.cc:317 #: wxwin/mainframe.cc:317
msgid "Remaining letters in the bag" msgid "Remaining letters in the bag"
@ -1031,24 +1043,24 @@ msgid "Letters of the rack plus one"
msgstr "Lettres du tirage plus une" msgstr "Lettres du tirage plus une"
#: wxwin/mainframe.cc:322 #: wxwin/mainframe.cc:322
msgid "R&accords" msgid "&Extensions"
msgstr "R&accords" msgstr "&Raccords"
#: wxwin/mainframe.cc:322 #: wxwin/mainframe.cc:322
msgid "Raccords on a word of the search" msgid "One-letter extensions on a word of the search"
msgstr "Raccords sur un mot de la recherche" msgstr "Raccords d'une lettre sur un mot de la recherche"
#: wxwin/mainframe.cc:323 #: wxwin/mainframe.cc:323
msgid "&Benjamins" msgid "&Benjamins"
msgstr "&Benjamins" msgstr "&Benjamins"
#: wxwin/mainframe.cc:323 #: wxwin/mainframe.cc:323
msgid "Benjamins on a word of the search" msgid "Benjamins (3-letter extensions) on a word of the search"
msgstr "Benjamins sur un mot de la recherche" msgstr "Benjamins (préfixes de 3 lettres) sur un mot de la recherche"
#: wxwin/mainframe.cc:325 #: wxwin/mainframe.cc:325
msgid "Game &history" msgid "Game &history\tCtrl+H"
msgstr "&Historique de la partie" msgstr "&Historique de la partie\tCtrl+H"
#: wxwin/mainframe.cc:327 #: wxwin/mainframe.cc:327
msgid "R&esults" msgid "R&esults"
@ -1205,6 +1217,18 @@ msgstr "Plus 1"
msgid "Regular expressions" msgid "Regular expressions"
msgstr "Expressions régulières" msgstr "Expressions régulières"
#~ msgid "R&accords"
#~ msgstr "R&accords"
#~ msgid "Raccords on a word of the search"
#~ msgstr "Raccords sur un mot de la recherche"
#~ msgid "&Quit"
#~ msgstr "&Quitter"
#~ msgid "Ba&g"
#~ msgstr "&Sac"
#~ msgid " Racks " #~ msgid " Racks "
#~ msgstr " Tirages " #~ msgstr " Tirages "

View file

@ -369,6 +369,12 @@ AuxFrameList::Refresh(refresh_t __UNUSED__ force)
/* PLUS1 FRAME */ /* PLUS1 FRAME */
/****************************************************************/ /****************************************************************/
Plus1Frame::Plus1Frame(wxFrame* p, Game* g)
: AuxFrameList(p, ID_Frame_Plus1, _("Rack + 1"), FRAMEPLUS1, g)
{
}
void void
Plus1Frame::refresh() Plus1Frame::refresh()
{ {
@ -426,6 +432,12 @@ Plus1Frame::refresh()
/* BENJAMINS */ /* BENJAMINS */
/****************************************************************/ /****************************************************************/
BenjFrame::BenjFrame(wxFrame* p, Game* g)
: AuxFrameList(p, ID_Frame_Benj, _("Benjamins"), FRAMEBENJ, g)
{
}
void void
BenjFrame::refresh() BenjFrame::refresh()
{ {
@ -461,6 +473,12 @@ BenjFrame::refresh()
/* RACC FRAME */ /* RACC FRAME */
/****************************************************************/ /****************************************************************/
RaccFrame::RaccFrame(wxFrame* p, Game* g)
: AuxFrameList(p, ID_Frame_Racc, _("Extensions"), FRAMERACC, g)
{
}
void void
RaccFrame::refresh() RaccFrame::refresh()
{ {

View file

@ -191,7 +191,7 @@ class Plus1Frame: public AuxFrameList
protected: protected:
virtual void refresh(); virtual void refresh();
public: public:
Plus1Frame(wxFrame* p, Game* g) : AuxFrameList(p, ID_Frame_Plus1, wxT("Tirage + 1"), FRAMEPLUS1, g) {}; Plus1Frame(wxFrame* p, Game* g);
}; };
/** /**
@ -203,7 +203,7 @@ class BenjFrame: public AuxFrameList
protected: protected:
virtual void refresh(); virtual void refresh();
public: public:
BenjFrame(wxFrame* p, Game* g) : AuxFrameList(p, ID_Frame_Benj, wxT("benjamins"), FRAMEBENJ, g) {}; BenjFrame(wxFrame* p, Game* g);
}; };
/** /**
@ -215,7 +215,7 @@ class RaccFrame: public AuxFrameList
protected: protected:
virtual void refresh(); virtual void refresh();
public: public:
RaccFrame(wxFrame* p, Game* g) : AuxFrameList(p, ID_Frame_Racc, wxT("raccords"), FRAMERACC, g) {}; RaccFrame(wxFrame* p, Game* g);
}; };
/** /**

View file

@ -51,7 +51,6 @@
# define INCOMPLETE # define INCOMPLETE
#else #else
# define ENABLE_SAVE_POSTSCRIPT # define ENABLE_SAVE_POSTSCRIPT
# define ENABLE_LOCALE
# define ENABLE_RESLIST_IN_MAIN # define ENABLE_RESLIST_IN_MAIN
# define INCOMPLETE { std::cerr << "incomplete " << __FILE__ << " " << __LINE__ << "\n"; } # define INCOMPLETE { std::cerr << "incomplete " << __FILE__ << " " << __LINE__ << "\n"; }
#endif #endif

View file

@ -45,13 +45,12 @@
class EliotApp : public wxApp class EliotApp : public wxApp
{ {
private: private:
MainFrame *m_mainFrame;
protected: protected:
#ifdef ENABLE_LOCALE wxLocale locale;
wxLocale locale;
#endif
public: public:
virtual bool OnInit(); virtual bool OnInit();
virtual int OnExit(); virtual int OnExit();
}; };
IMPLEMENT_APP(EliotApp) IMPLEMENT_APP(EliotApp)
@ -59,27 +58,39 @@ IMPLEMENT_APP(EliotApp)
bool bool
EliotApp::OnInit() EliotApp::OnInit()
{ {
wxApp::OnInit();
srand(time(NULL)); srand(time(NULL));
SetVendorName(wxT("Afrab")); SetVendorName(wxT("Afrab"));
SetAppName(wxString(wxT("eliot")) + wxT("-") + wxT(VERSION)); SetAppName(wxString(wxT("eliot")) + wxT("-") + wxT(VERSION));
SetClassName(wxT("eliot")); SetClassName(wxT("eliot"));
wxConfigBase* config = wxConfigBase::Get(); wxConfigBase::Get();
config = NULL;
#ifdef ENABLE_LOCALE
locale.Init(); locale.Init();
// Search for translations in the installation directory
wxString catalogPath;
#ifdef WIN32
// Get the absolute path, as returned by GetFullPathName()
wchar_t path[MAX_PATH];
GetFullPathName(wstring(argv[0]).c_str(), MAX_PATH, path, NULL);
wchar_t *pos = wcsrchr(path, L'\\');
if (pos)
*pos = '\0';
catalogPath = wxU(path) + wxT("/locale");
#else
catalogPath = wxT(LOCALEDIR);
#endif
wxLocale::AddCatalogLookupPathPrefix(catalogPath);
// No need to search in the current directory, it is already done by default // No need to search in the current directory, it is already done by default
// wxLocale::AddCatalogLookupPathPrefix(wxT(".")); // wxLocale::AddCatalogLookupPathPrefix(wxT("."));
// Search for translations in the installation directory
wxLocale::AddCatalogLookupPathPrefix(wxT(LOCALEDIR));
locale.AddCatalog(wxT("eliot")); locale.AddCatalog(wxT("eliot"));
#ifdef __LINUX__ #ifdef __LINUX__
{ {
wxLogNull noLog; wxLogNull noLog;
locale.AddCatalog(wxT("fileutils")); locale.AddCatalog(wxT("fileutils"));
} }
#endif
#endif #endif
ConfigDB configdb; ConfigDB configdb;
@ -97,7 +108,7 @@ EliotApp::OnExit()
{ {
GameFactory::Destroy(); GameFactory::Destroy();
delete wxConfigBase::Set(NULL); delete wxConfigBase::Set(NULL);
return 0; return wxApp::OnExit();
} }

View file

@ -269,22 +269,22 @@ MainFrame::InitMenu()
{ {
// menus // menus
wxMenu *menu_game = new wxMenu; wxMenu *menu_game = new wxMenu;
menu_game->Append(Menu_Game_New, _("&New game\tctrl+n"), _("Start a new game")); menu_game->Append(Menu_Game_New, _("&New game\tCtrl+N"), _("Start a new game"));
menu_game->Append(Menu_Game_NewJoker, _("New &joker game\tctrl+j"), _("Start a new joker game")); menu_game->Append(Menu_Game_NewJoker, _("New &joker game\tCtrl+J"), _("Start a new joker game"));
menu_game->AppendSeparator(); menu_game->AppendSeparator();
menu_game->Append(Menu_Game_Open, _("&Load...\tctrl+l"), _("Load a game")); menu_game->Append(Menu_Game_Open, _("&Load...\tCtrl+L"), _("Load a game"));
menu_game->Append(Menu_Game_Save, _("&Save as...\tctrl+s"), _("Save the current game")); menu_game->Append(Menu_Game_Save, _("&Save as...\tCtrl+S"), _("Save the current game"));
menu_game->AppendSeparator(); menu_game->AppendSeparator();
menu_game->Append(Menu_Game_Print, _("&Print...\tctrl+p"), _("Print this game")); menu_game->Append(Menu_Game_Print, _("&Print...\tCtrl+P"), _("Print this game"));
menu_game->Append(Menu_Game_PrintPreview, _("Print pre&view..."), _("Print preview of the game")); menu_game->Append(Menu_Game_PrintPreview, _("Print pre&view..."), _("Print preview of the game"));
#ifdef ENABLE_SAVE_POSTSCRIPT #ifdef ENABLE_SAVE_POSTSCRIPT
menu_game->Append(Menu_Game_PrintPS, _("Print in PostS&cript..."), _("Print in a PostScript file")); menu_game->Append(Menu_Game_PrintPS, _("Print in PostS&cript..."), _("Print in a PostScript file"));
#endif #endif
menu_game->AppendSeparator(); menu_game->AppendSeparator();
menu_game->Append(wxID_EXIT, _("&Quit"), _("Quit Eliot")); menu_game->Append(wxID_EXIT, _("&Quit\tCtrl+Q"), _("Quit Eliot"));
// //
wxMenu *menu_conf_game = new wxMenu; wxMenu *menu_conf_game = new wxMenu;
menu_conf_game->Append(Menu_Conf_Game_Dic, _("&Dictionary..."), _("Choose a dictionary")); menu_conf_game->Append(Menu_Conf_Game_Dic, _("&Dictionary...\tCtrl+D"), _("Choose a dictionary"));
menu_conf_game->Append(Menu_Conf_Game_Search, _("&Search..."), _("Search options")); menu_conf_game->Append(Menu_Conf_Game_Search, _("&Search..."), _("Search options"));
// //
wxMenu *menu_conf_board_colour = new wxMenu; wxMenu *menu_conf_board_colour = new wxMenu;
@ -314,15 +314,15 @@ MainFrame::InitMenu()
// //
wxMenu *menu_frame = new wxMenu; wxMenu *menu_frame = new wxMenu;
menu_frame->AppendCheckItem(Menu_ShowBoard, _("&Board"), _("Game board")); menu_frame->AppendCheckItem(Menu_ShowBoard, _("&Board"), _("Game board"));
menu_frame->AppendCheckItem(Menu_ShowBag, _("Ba&g"), _("Remaining letters in the bag")); menu_frame->AppendCheckItem(Menu_ShowBag, _("Ba&g\tCtrl+B"), _("Remaining letters in the bag"));
menu_frame->AppendCheckItem(Menu_ShowVerif, _("&Check"), _("Check a word in the dictionary")); menu_frame->AppendCheckItem(Menu_ShowVerif, _("&Check"), _("Check a word in the dictionary"));
menu_frame->AppendCheckItem(Menu_ShowSearch, _("&Search"), _("Search in the dictionary")); menu_frame->AppendCheckItem(Menu_ShowSearch, _("&Search"), _("Search in the dictionary"));
menu_frame->AppendSeparator(); menu_frame->AppendSeparator();
menu_frame->AppendCheckItem(Menu_ShowPlus1, _("&Rack + 1"), _("Letters of the rack plus one")); menu_frame->AppendCheckItem(Menu_ShowPlus1, _("&Rack + 1"), _("Letters of the rack plus one"));
menu_frame->AppendCheckItem(Menu_ShowRacc, _("R&accords"), _("Raccords on a word of the search")); menu_frame->AppendCheckItem(Menu_ShowRacc, _("&Extensions"), _("One-letter extensions on a word of the search"));
menu_frame->AppendCheckItem(Menu_ShowBenj, _("&Benjamins"), _("Benjamins on a word of the search")); menu_frame->AppendCheckItem(Menu_ShowBenj, _("&Benjamins"), _("Benjamins (3-letter extensions) on a word of the search"));
menu_frame->AppendSeparator(); menu_frame->AppendSeparator();
menu_frame->AppendCheckItem(Menu_ShowGame, _("Game &history"), _("Game history")); menu_frame->AppendCheckItem(Menu_ShowGame, _("Game &history\tCtrl+H"), _("Game history"));
#ifndef ENABLE_RESLIST_IN_MAIN #ifndef ENABLE_RESLIST_IN_MAIN
menu_frame->Append(Menu_ShowResult, _("R&esults"), _("Results")); menu_frame->Append(Menu_ShowResult, _("R&esults"), _("Results"));
#endif #endif