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

100
po/fr.po
View file

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

View file

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

View file

@ -191,7 +191,7 @@ class Plus1Frame: public AuxFrameList
protected:
virtual void refresh();
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:
virtual void refresh();
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:
virtual void refresh();
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
#else
# define ENABLE_SAVE_POSTSCRIPT
# define ENABLE_LOCALE
# define ENABLE_RESLIST_IN_MAIN
# define INCOMPLETE { std::cerr << "incomplete " << __FILE__ << " " << __LINE__ << "\n"; }
#endif

View file

@ -45,13 +45,12 @@
class EliotApp : public wxApp
{
private:
MainFrame *m_mainFrame;
protected:
#ifdef ENABLE_LOCALE
wxLocale locale;
#endif
wxLocale locale;
public:
virtual bool OnInit();
virtual int OnExit();
virtual bool OnInit();
virtual int OnExit();
};
IMPLEMENT_APP(EliotApp)
@ -59,27 +58,39 @@ IMPLEMENT_APP(EliotApp)
bool
EliotApp::OnInit()
{
wxApp::OnInit();
srand(time(NULL));
SetVendorName(wxT("Afrab"));
SetAppName(wxString(wxT("eliot")) + wxT("-") + wxT(VERSION));
SetClassName(wxT("eliot"));
wxConfigBase* config = wxConfigBase::Get();
config = NULL;
#ifdef ENABLE_LOCALE
wxConfigBase::Get();
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
// wxLocale::AddCatalogLookupPathPrefix(wxT("."));
// Search for translations in the installation directory
wxLocale::AddCatalogLookupPathPrefix(wxT(LOCALEDIR));
locale.AddCatalog(wxT("eliot"));
#ifdef __LINUX__
{
wxLogNull noLog;
locale.AddCatalog(wxT("fileutils"));
}
#endif
#endif
ConfigDB configdb;
@ -97,7 +108,7 @@ EliotApp::OnExit()
{
GameFactory::Destroy();
delete wxConfigBase::Set(NULL);
return 0;
return wxApp::OnExit();
}

View file

@ -269,22 +269,22 @@ MainFrame::InitMenu()
{
// menus
wxMenu *menu_game = new wxMenu;
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_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->AppendSeparator();
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_Open, _("&Load...\tCtrl+L"), _("Load a game"));
menu_game->Append(Menu_Game_Save, _("&Save as...\tCtrl+S"), _("Save the current game"));
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"));
#ifdef ENABLE_SAVE_POSTSCRIPT
menu_game->Append(Menu_Game_PrintPS, _("Print in PostS&cript..."), _("Print in a PostScript file"));
#endif
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;
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"));
//
wxMenu *menu_conf_board_colour = new wxMenu;
@ -314,15 +314,15 @@ MainFrame::InitMenu()
//
wxMenu *menu_frame = new wxMenu;
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_ShowSearch, _("&Search"), _("Search in the dictionary"));
menu_frame->AppendSeparator();
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_ShowBenj, _("&Benjamins"), _("Benjamins 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 (3-letter extensions) on a word of the search"));
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
menu_frame->Append(Menu_ShowResult, _("R&esults"), _("Results"));
#endif