From: <arn...@us...> - 2008-01-04 09:31:43
|
Revision: 957 http://dcplusplus.svn.sourceforge.net/dcplusplus/?rev=957&view=rev Author: arnetheduck Date: 2008-01-04 01:31:40 -0800 (Fri, 04 Jan 2008) Log Message: ----------- Some more translations Modified Paths: -------------- dcplusplus/trunk/SConstruct dcplusplus/trunk/changelog.txt dcplusplus/trunk/dcpp/SettingsManager.cpp dcplusplus/trunk/dcpp/StringDefs.h dcplusplus/trunk/dcpp/Text.h dcplusplus/trunk/win32/FavHubsFrame.cpp dcplusplus/trunk/win32/SplashWindow.cpp dcplusplus/trunk/win32/WinUtil.h dcplusplus/trunk/win32/po/dcpp-win32.pot dcplusplus/trunk/win32/stdafx.h Modified: dcplusplus/trunk/SConstruct =================================================================== --- dcplusplus/trunk/SConstruct 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/SConstruct 2008-01-04 09:31:40 UTC (rev 957) @@ -156,10 +156,11 @@ mo_bld = Builder (action = Action([mo_args], 'Compiling message catalog $TARGET from $SOURCES')) env.Append(BUILDERS = {'MoBuild' : mo_bld}) -pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user', '--package-name=$PACKAGE', +pot_args = ['xgettext', '--from-code=UTF-8', '--foreign-user',# '--package-name=$PACKAGE', '--copyright-holder=Jacek Sieka', '--msgid-bugs-address=dcp...@li...', '--no-wrap', '--keyword=_', '--keyword=T_', '--keyword=TF_', '--keyword=TFN_:1,2', - '--keyword=F_', '--boost', '--output=$TARGET', '$SOURCES'] + '--keyword=F_', '--keyword=gettext_noop', '--keyword=N_', '--boost', + '--output=$TARGET', '$SOURCES'] pot_bld = Builder (action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES')) env.Append(BUILDERS = {'PotBuild' : pot_bld}) Modified: dcplusplus/trunk/changelog.txt =================================================================== --- dcplusplus/trunk/changelog.txt 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/changelog.txt 2008-01-04 09:31:40 UTC (rev 957) @@ -9,6 +9,7 @@ * Replaced homegrown i18n solution with gettext * Fixed an issue with nick encodings and nmdc connections (thanks stanislav maslovski) * Added download view which shows per-file download information +* Chat timestamps on by default -- 0.704 2007-12-14 -- * Hub lists added to utilize Coral's distributed network (ullner) Modified: dcplusplus/trunk/dcpp/SettingsManager.cpp =================================================================== --- dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/dcpp/SettingsManager.cpp 2008-01-04 09:31:40 UTC (rev 957) @@ -129,7 +129,7 @@ setDefault(FILTER_MESSAGES, true); setDefault(MINIMIZE_TRAY, true); setDefault(AUTO_SEARCH, false); - setDefault(TIME_STAMPS, false); + setDefault(TIME_STAMPS, true); setDefault(CONFIRM_EXIT, true); setDefault(POPUP_HUB_PMS, true); setDefault(POPUP_BOT_PMS, true); Modified: dcplusplus/trunk/dcpp/StringDefs.h =================================================================== --- dcplusplus/trunk/dcpp/StringDefs.h 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/dcpp/StringDefs.h 2008-01-04 09:31:40 UTC (rev 957) @@ -434,7 +434,7 @@ SETTINGS_DOWNLOADS, // "Downloads" SETTINGS_DOWNLOADS_MAX, // "Maximum simultaneous downloads (0 = infinite)" SETTINGS_DOWNLOADS_SPEED_PAUSE, // "No new downloads if speed exceeds (KiB/s, 0 = disable)" - SETTINGS_EXAMPLE_TEXT, // "Donate :s! (ok, dirty dollars are fine as well =) (see help menu)" + SETTINGS_EXAMPLE_TEXT, // "Donate \342\202\254\342\202\254\342\202\254:s! (ok, dirty dollars are fine as well =) (see help menu)" SETTINGS_EXTERNAL_IP, // "External / WAN IP" SETTINGS_FAV_SHOW_JOINS, // "Only show joins / parts for favorite users" SETTINGS_FAVORITE_DIRS_PAGE, // "Downloads\\Favorites" Modified: dcplusplus/trunk/dcpp/Text.h =================================================================== --- dcplusplus/trunk/dcpp/Text.h 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/dcpp/Text.h 2008-01-04 09:31:40 UTC (rev 957) @@ -81,7 +81,7 @@ #ifdef UNICODE inline const tstring& toT(const string& str, tstring& tmp) throw() { return utf8ToWide(str, tmp); } inline tstring toT(const string& str) throw() { return utf8ToWide(str); } - + inline const string& fromT(const tstring& str, string& tmp) throw() { return wideToUtf8(str, tmp); } inline string fromT(const tstring& str) throw() { return wideToUtf8(str); } #else Modified: dcplusplus/trunk/win32/FavHubsFrame.cpp =================================================================== --- dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/win32/FavHubsFrame.cpp 2008-01-04 09:31:40 UTC (rev 957) @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - + #include "stdafx.h" #include "FavHubsFrame.h" @@ -28,11 +28,16 @@ int FavHubsFrame::columnIndexes[] = { COLUMN_NAME, COLUMN_DESCRIPTION, COLUMN_NICK, COLUMN_PASSWORD, COLUMN_SERVER, COLUMN_USERDESCRIPTION }; int FavHubsFrame::columnSizes[] = { 200, 290, 125, 100, 100, 125 }; -static ResourceManager::Strings columnNames[] = { ResourceManager::AUTO_CONNECT, ResourceManager::DESCRIPTION, - ResourceManager::NICK, ResourceManager::PASSWORD, ResourceManager::SERVER, ResourceManager::USER_DESCRIPTION +static const char* columnNames[] = { + N_("Auto connect / Name"), + N_("Description"), + N_("Nick"), + N_("Password"), + N_("Server"), + N_("User Description") }; -FavHubsFrame::FavHubsFrame(SmartWin::WidgetTabView* mdiParent) : +FavHubsFrame::FavHubsFrame(SmartWin::WidgetTabView* mdiParent) : BaseType(mdiParent), hubs(0), connect(0), @@ -50,7 +55,7 @@ hubs = createListView(cs); addWidget(hubs); - hubs->createColumns(ResourceManager::getInstance()->getStrings(columnNames)); + hubs->createColumns(WinUtil::getStrings(columnNames)); hubs->setColumnOrder(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_ORDER), columnIndexes)); hubs->setColumnWidths(WinUtil::splitTokens(SETTING(FAVHUBSFRAME_WIDTHS), columnSizes)); hubs->setColor(WinUtil::textColor, WinUtil::bgColor); @@ -63,32 +68,32 @@ { WidgetButton::Seed cs = WinUtil::Seeds::button; - cs.caption = TSTRING(CONNECT); + cs.caption = T_("&Connect"); connect = createButton(cs); connect->onClicked(std::tr1::bind(&FavHubsFrame::openSelected, this)); addWidget(connect); - cs.caption = TSTRING(NEW); + cs.caption = T_("&New..."); add = createButton(cs); add->onClicked(std::tr1::bind(&FavHubsFrame::handleAdd, this)); addWidget(add); - cs.caption = TSTRING(PROPERTIES); + cs.caption = T_("&Properties"); properties = createButton(cs); properties->onClicked(std::tr1::bind(&FavHubsFrame::handleProperties, this)); addWidget(properties); - cs.caption = TSTRING(MOVE_UP); + cs.caption = T_("Move &Up"); up = createButton(cs); up->onClicked(std::tr1::bind(&FavHubsFrame::handleUp, this)); addWidget(up); - cs.caption = TSTRING(MOVE_DOWN); + cs.caption = T_("Move &Down"); down = createButton(cs); down->onClicked(std::tr1::bind(&FavHubsFrame::handleDown, this)); addWidget(down); - cs.caption = TSTRING(REMOVE); + cs.caption = T_("&Remove"); remove = createButton(cs); remove->onClicked(std::tr1::bind(&FavHubsFrame::handleRemove, this)); addWidget(remove); @@ -105,20 +110,20 @@ FavoriteManager::getInstance()->addListener(this); hubsMenu = createMenu(true); - hubsMenu->appendItem(IDC_CONNECT, TSTRING(CONNECT), std::tr1::bind(&FavHubsFrame::openSelected, this)); + hubsMenu->appendItem(IDC_CONNECT, T_("&Connect"), std::tr1::bind(&FavHubsFrame::openSelected, this)); hubsMenu->appendSeparatorItem(); - hubsMenu->appendItem(IDC_NEWFAV, TSTRING(NEW), std::tr1::bind(&FavHubsFrame::handleAdd, this)); - hubsMenu->appendItem(IDC_EDIT, TSTRING(PROPERTIES), std::tr1::bind(&FavHubsFrame::handleProperties, this)); - hubsMenu->appendItem(IDC_MOVE_UP, TSTRING(MOVE_UP), std::tr1::bind(&FavHubsFrame::handleUp, this)); - hubsMenu->appendItem(IDC_MOVE_DOWN, TSTRING(MOVE_DOWN), std::tr1::bind(&FavHubsFrame::handleDown, this)); + hubsMenu->appendItem(IDC_NEWFAV, T_("&New..."), std::tr1::bind(&FavHubsFrame::handleAdd, this)); + hubsMenu->appendItem(IDC_EDIT, T_("&Properties"), std::tr1::bind(&FavHubsFrame::handleProperties, this)); + hubsMenu->appendItem(IDC_MOVE_UP, T_("Move &Up"), std::tr1::bind(&FavHubsFrame::handleUp, this)); + hubsMenu->appendItem(IDC_MOVE_DOWN, T_("Move &Down"), std::tr1::bind(&FavHubsFrame::handleDown, this)); hubsMenu->appendSeparatorItem(); - hubsMenu->appendItem(IDC_REMOVE, CTSTRING(REMOVE), std::tr1::bind(&FavHubsFrame::handleRemove, this)); + hubsMenu->appendItem(IDC_REMOVE, T_("&Remove"), std::tr1::bind(&FavHubsFrame::handleRemove, this)); hubsMenu->setDefaultItem(IDC_CONNECT); hubs->onContextMenu(std::tr1::bind(&FavHubsFrame::handleContextMenu, this, _1)); } FavHubsFrame::~FavHubsFrame() { - + } void FavHubsFrame::layout() { @@ -171,7 +176,7 @@ while(true) { if(dlg.run() == IDOK) { if(FavoriteManager::getInstance()->isFavoriteHub(e.getServer())) { - createMessageBox().show(TSTRING(FAVORITE_HUB_ALREADY_EXISTS), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION); + createMessageBox().show(T_("Hub already exists as a favorite"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONEXCLAMATION); } else { FavoriteManager::getInstance()->addFavorite(e); break; @@ -235,7 +240,7 @@ } void FavHubsFrame::handleRemove() { - if(hubs->hasSelection() && (!BOOLSETTING(CONFIRM_HUB_REMOVAL) || createMessageBox().show(TSTRING(REALLY_REMOVE), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == WidgetMessageBox::RETBOX_YES)) { + if(hubs->hasSelection() && (!BOOLSETTING(CONFIRM_HUB_REMOVAL) || createMessageBox().show(T_("Really remove?"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_YESNO, WidgetMessageBox::BOX_ICONQUESTION) == WidgetMessageBox::RETBOX_YES)) { int i; while((i = hubs->getNext(-1, LVNI_SELECTED)) != -1) FavoriteManager::getInstance()->removeFavorite(reinterpret_cast<FavoriteHubEntryPtr>(hubs->getData(i))); @@ -312,7 +317,7 @@ return; if(SETTING(NICK).empty()) { - createMessageBox().show(TSTRING(ENTER_NICK), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONSTOP); + createMessageBox().show(T_("Please enter a nickname in the settings dialog!"), _T(APPNAME) _T(" ") _T(VERSIONSTRING), WidgetMessageBox::BOX_OK, WidgetMessageBox::BOX_ICONSTOP); return; } Modified: dcplusplus/trunk/win32/SplashWindow.cpp =================================================================== --- dcplusplus/trunk/win32/SplashWindow.cpp 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/win32/SplashWindow.cpp 2008-01-04 09:31:40 UTC (rev 957) @@ -74,7 +74,7 @@ tmp->close(); } -void SplashWindow::operator()(const string& str) { - text->setText(Text::toT(STRING(LOADING) + "(" + str + ")")); +void SplashWindow::operator()(const string& status) { + text->setText(str(TF_("Loading DC++, please wait... (%1%)") % Text::toT(status) )); text->updateWidget(); } Modified: dcplusplus/trunk/win32/WinUtil.h =================================================================== --- dcplusplus/trunk/win32/WinUtil.h 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/win32/WinUtil.h 2008-01-04 09:31:40 UTC (rev 957) @@ -108,6 +108,16 @@ static std::string toString(const std::vector<int>& tokens); static void splitTokens(int* array, const string& tokens, int maxItems = -1) throw(); + template<typename T> + static TStringList getStrings(const T& t) { + const size_t n = sizeof(t) / sizeof(t[0]); + TStringList ret(n); + for(size_t i = 0; i < n; ++i) { + ret[i] = T_(t[i]); + } + return ret; + } + static int getIconIndex(const tstring& aFileName); static int getDirIconIndex() { return dirIconIndex; } static int getDirMaskedIndex() { return dirMaskedIndex; } Modified: dcplusplus/trunk/win32/po/dcpp-win32.pot =================================================================== --- dcplusplus/trunk/win32/po/dcpp-win32.pot 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/win32/po/dcpp-win32.pot 2008-01-04 09:31:40 UTC (rev 957) @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: dcpp-win32\n" +"Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: dcp...@li...\n" -"POT-Creation-Date: 2008-01-03 22:52+0100\n" +"POT-Creation-Date: 2008-01-04 10:23+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL...@li...>\n" @@ -21,6 +21,66 @@ msgid "Downloads" msgstr "" +#: win32/FavHubsFrame.cpp:32 +msgid "Auto connect / Name" +msgstr "" + +#: win32/FavHubsFrame.cpp:33 +msgid "Description" +msgstr "" + +#: win32/FavHubsFrame.cpp:34 +msgid "Nick" +msgstr "" + +#: win32/FavHubsFrame.cpp:35 +msgid "Password" +msgstr "" + +#: win32/FavHubsFrame.cpp:36 +msgid "Server" +msgstr "" + +#: win32/FavHubsFrame.cpp:37 +msgid "User Description" +msgstr "" + +#: win32/FavHubsFrame.cpp:71 win32/FavHubsFrame.cpp:113 +msgid "&Connect" +msgstr "" + +#: win32/FavHubsFrame.cpp:76 win32/FavHubsFrame.cpp:115 +msgid "&New..." +msgstr "" + +#: win32/FavHubsFrame.cpp:81 win32/FavHubsFrame.cpp:116 +msgid "&Properties" +msgstr "" + +#: win32/FavHubsFrame.cpp:86 win32/FavHubsFrame.cpp:117 +msgid "Move &Up" +msgstr "" + +#: win32/FavHubsFrame.cpp:91 win32/FavHubsFrame.cpp:118 +msgid "Move &Down" +msgstr "" + +#: win32/FavHubsFrame.cpp:96 win32/FavHubsFrame.cpp:120 +msgid "&Remove" +msgstr "" + +#: win32/FavHubsFrame.cpp:179 +msgid "Hub already exists as a favorite" +msgstr "" + +#: win32/FavHubsFrame.cpp:243 +msgid "Really remove?" +msgstr "" + +#: win32/FavHubsFrame.cpp:320 +msgid "Please enter a nickname in the settings dialog!" +msgstr "" + #: win32/DownloadsFrame.cpp:110 msgid "Waiting for slot" msgstr "" @@ -37,6 +97,11 @@ msgid "%1%/s" msgstr "" +#: win32/SplashWindow.cpp:78 +#, boost-format +msgid "Loading DC++, please wait... (%1%)" +msgstr "" + #: win32/AppearancePage.cpp:86 win32/AppearancePage.cpp:109 msgid "Default" msgstr "" Modified: dcplusplus/trunk/win32/stdafx.h =================================================================== --- dcplusplus/trunk/win32/stdafx.h 2008-01-03 21:59:28 UTC (rev 956) +++ dcplusplus/trunk/win32/stdafx.h 2008-01-04 09:31:40 UTC (rev 957) @@ -47,11 +47,14 @@ #define LOCALEDIR dcpp::Util::getLocalePath().c_str() #define PACKAGE "dcpp-win32" #define _(String) gettext(String) +#define gettext_noop(String) String +#define N_(String) gettext_noop (String) #define T_(String) Text::toT(gettext(String)) #ifdef UNICODE #define TF_(String) boost::wformat(Text::toT(gettext(String))) #define TFN_(String1,String2, N) boost::wformat(Text::toT(ngettext(String1, String2, N))) #else #define TF_(String) boost::format(Text::toT(gettext(String))) +#define TFN_(String1,String2, N) boost::format(Text::toT(ngettext(String1, String2, N))) #endif #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |