------------------------------------------------------------ revno: 399 committer: Steven Sheehy <[email protected]> branch nick: linuxdcpp-i18n timestamp: Wed 2010-11-03 00:24:00 -0500 message: Add IntlUtil.hh added: linux/IntlUtil.hh modified: SConstruct linux/downloadqueue.hh linux/entry.hh linux/mainwindow.hh linux/settingsmanager.hh linux/sharebrowser.hh linux/transfers.hh linux/wulformanager.cc
-- lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n Your team LinuxDC++ Team is subscribed to branch lp:~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n. To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/linuxdcpp-i18n/+edit-subscription
=== modified file 'SConstruct' --- SConstruct 2010-10-31 07:18:43 +0000 +++ SConstruct 2010-11-03 05:24:00 +0000 @@ -149,7 +149,7 @@ pot_args = ['xgettext', '--default-domain=$PACKAGE', '--package-name=$PACKAGE', '--msgid-bugs-address=https://translations.launchpad.net/linuxdcpp', '--copyright-holder=LinuxDC++ Team', '--add-comments=TRANSLATORS', - '--keyword=_', '--keyword=N_', '--from-code=UTF-8', + '--keyword=_', '--keyword=N_', '--keyword=C_', '--from-code=UTF-8', '--foreign-user', '--no-wrap', '--boost', '--sort-output', '--language=$LANGUAGE', '--output=$TARGET', '$SOURCES'] pot_build = Builder(action = Action([pot_args], 'Extracting messages to $TARGET from $SOURCES')) === added file 'linux/IntlUtil.hh' --- linux/IntlUtil.hh 1970-01-01 00:00:00 +0000 +++ linux/IntlUtil.hh 2010-11-03 05:24:00 +0000 @@ -0,0 +1,39 @@ +/* + * Copyright © 2010 Jens Oknelid, [email protected] + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * In addition, as a special exception, compiling, linking, and/or + * using OpenSSL with this program is allowed. + */ + +#ifndef LINUXDCPP_INTL_UTIL_HH +#define LINUXDCPP_INTL_UTIL_HH + +#include <boost/format.hpp> +#include <string> +#include <glib/gi18n.h> + +static inline std::string message_format(const std::string &text) { + boost::format fmt; + fmt.exceptions(boost::io::no_error_bits); + fmt.parse(text); + return fmt.str(); +} + +#define F_(x) message_format(gettext(x)) + +#endif /* LINUXDCPP_INTL_UTIL_HH */ + === modified file 'linux/downloadqueue.hh' --- linux/downloadqueue.hh 2009-03-12 05:47:55 +0000 +++ linux/downloadqueue.hh 2010-11-03 05:24:00 +0000 @@ -22,6 +22,8 @@ #ifndef WULFOR_DOWNLOAD_QUEUE_HH #define WULFOR_DOWNLOAD_QUEUE_HH +#include "IntlUtil.hh" + #include <dcpp/stdinc.h> #include <dcpp/DCPlusPlus.h> #include <dcpp/QueueManager.h> === modified file 'linux/entry.hh' --- linux/entry.hh 2010-10-11 06:05:22 +0000 +++ linux/entry.hh 2010-11-03 05:24:00 +0000 @@ -25,7 +25,7 @@ #include <gtk/gtk.h> #include <glade/glade.h> #include <gdk/gdkkeysyms.h> -#include <glib/gi18n.h> +#include "IntlUtil.hh" #include <string> #include <map> === modified file 'linux/mainwindow.hh' --- linux/mainwindow.hh 2010-10-11 06:05:22 +0000 +++ linux/mainwindow.hh 2010-11-03 05:24:00 +0000 @@ -22,6 +22,8 @@ #ifndef WULFOR_MAIN_WINDOW_HH #define WULFOR_MAIN_WINDOW_HH +#include "IntlUtil.hh" + #include <dcpp/stdinc.h> #include <dcpp/DCPlusPlus.h> #include <dcpp/ConnectionManager.h> === modified file 'linux/settingsmanager.hh' --- linux/settingsmanager.hh 2009-03-12 05:47:55 +0000 +++ linux/settingsmanager.hh 2010-11-03 05:24:00 +0000 @@ -22,6 +22,7 @@ #ifndef WULFOR_SETTINGSMANAGER_HH #define WULFOR_SETTINGSMANAGER_HH +#include "IntlUtil.hh" #include <string> #include <map> #include <dcpp/stdinc.h> === modified file 'linux/sharebrowser.hh' --- linux/sharebrowser.hh 2009-06-28 23:06:29 +0000 +++ linux/sharebrowser.hh 2010-11-03 05:24:00 +0000 @@ -22,6 +22,8 @@ #ifndef WULFOR_SHARE_BROWSER_HH #define WULFOR_SHARE_BROWSER_HH +#include "IntlUtil.hh" + #include <dcpp/stdinc.h> #include <dcpp/DCPlusPlus.h> #include <dcpp/DirectoryListing.h> === modified file 'linux/transfers.hh' --- linux/transfers.hh 2010-05-30 03:15:23 +0000 +++ linux/transfers.hh 2010-11-03 05:24:00 +0000 @@ -22,6 +22,8 @@ #ifndef WULFOR_TRANSFERS_HH #define WULFOR_TRANSFERS_HH +#include "IntlUtil.hh" + #include <dcpp/stdinc.h> #include <dcpp/DCPlusPlus.h> #include <dcpp/ConnectionManager.h> === modified file 'linux/wulformanager.cc' --- linux/wulformanager.cc 2010-02-02 04:01:05 +0000 +++ linux/wulformanager.cc 2010-11-03 05:24:00 +0000 @@ -23,7 +23,6 @@ #include <iostream> #include <gdk/gdkx.h> -#include <glib/gi18n.h> #include "hashdialog.hh" #include "settingsdialog.hh"
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : [email protected] Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp

