add declarations of the textdomain to all files from the domains...

...-lib and -test even if they got no translateable strings the
declaration is done via this define: #define GETTEXT_DOMAIN
"wesnoth-lib" a short "how to get .cpp files translated" is left in
src/gettext.hpp
This commit is contained in:
Nils Kneuper 2008-12-28 21:40:02 +00:00
parent 4a0ed3c065
commit c84f995e88
66 changed files with 141 additions and 4 deletions

View file

@ -13,6 +13,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "config.hpp"

View file

@ -15,6 +15,21 @@
#ifndef GETTEXT_HPP_INCLUDED
#define GETTEXT_HPP_INCLUDED
/**
* How to use gettext for wesnoth source files:
* 1) include this header file in the .cpp file
* 2) add this include to set the correct textdomain, in this example
* wesnoth-lib (not required for the domain 'wesnoth', required for all
* other textdomains):
* #define GETTEXT_DOMAIN "wesnoth-lib"
* 3) make sure, that the source file is listed in the respective POTFILES.in
* for the textdomain, in the case of wesnoth-lib it is this file:
* po/wesnoth-lib/POTFILES.in
* This should be all that is required to have your strings that are marked
* translateable in the po files and translated ingame. So you at least have
* to mark the strings translateable, too. ;)
*/
// gettext-related declarations
#include <libintl.h>

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/addon_connect.hpp"
#include "gui/widgets/window.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/dialog.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/language_selection.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/message.hpp"
#include "gui/widgets/button.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/mp_connect.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/mp_method_selection.hpp"
#include "gui/widgets/listbox.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/dialogs/wml_message.hpp"
#include "gui/widgets/window.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/button.hpp"
#include "gui/widgets/window.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/container.hpp"
namespace gui2 {

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "control.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#define NEW_DRAW
#ifdef DEBUG_WINDOW_LAYOUT_GRAPHS

View file

@ -19,6 +19,7 @@
* More documentation at the end of the file.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "clipboard.hpp"
#include "gui/widgets/window.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#define NEW_DRAW
#ifdef NEW_DRAW

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/grid.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/horizontal_scrollbar.hpp"
namespace gui2 {

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/image.hpp"
#include "../../image.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/label.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/listbox.hpp"
#ifndef NEW_DRAW

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/menubar.hpp"
#include "gui/widgets/selectable.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/minimap.hpp"
#include "map.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/panel.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/scroll_label.hpp"
#include "gui/widgets/label.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/scrollbar.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#define NEW_DRAW
#ifdef NEW_DRAW

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/slider.hpp"
#include "foreach.hpp"

View file

@ -12,7 +12,7 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
namespace gui2 {

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/text.hpp"
#include "clipboard.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/text_box.hpp"
#include "font.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/toggle_button.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/toggle_panel.hpp"
#include "foreach.hpp"

View file

@ -12,7 +12,7 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
namespace gui2 {

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/vertical_scrollbar.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/vertical_scrollbar_container.hpp"
#include "foreach.hpp"

View file

@ -12,6 +12,8 @@
see the copying file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/window.hpp"
namespace gui2 {

View file

@ -17,6 +17,8 @@
* Implementation of window.hpp.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "gui/widgets/window.hpp"
#include "cursor.hpp"

View file

@ -17,6 +17,8 @@
* Routines for images: load, scale, re-color, etc.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "config.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "actions.hpp"

View file

@ -12,10 +12,10 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "tests/utils/test_support.hpp"
#include <boost/bind.hpp>
#include "sdl_utils.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "tests/utils/test_support.hpp"
#include <boost/test/unit_test_suite.hpp>

View file

@ -11,6 +11,9 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include <boost/version.hpp>
#define BOOST_TEST_MODULE wesnoth unit tests master suite

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "utils/test_support.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "utils/test_support.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "utils/test_support.hpp"
#include "copy_policy.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "utils/test_support.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "utils/test_support.hpp"
#include "util.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "utils/test_support.hpp"
#include "version.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "fake_display.hpp"
#include "gamestatus.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "tests/utils/fake_event_source.hpp"
#include "mouse_handler_base.hpp"

View file

@ -12,6 +12,7 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-test"
#include "tests/utils/play_scenario.hpp"
#include "tests/utils/game_config_manager.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "text.hpp"
#include "gui/widgets/helper.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/button.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/combo.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/combo_drag.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "widgets/drop_target.hpp"
#include <boost/bind.hpp>

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/label.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/menu.hpp"

View file

@ -13,6 +13,7 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/progressbar.hpp"

View file

@ -14,6 +14,8 @@
/** @file widgets/scrollarea.cpp */
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/scrollarea.hpp"

View file

@ -15,6 +15,8 @@
/** @file widgets/scrollbar.cpp */
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/scrollbar.hpp"

View file

@ -14,6 +14,8 @@
/** @file widgets/scrollpane.cpp */
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include <algorithm>

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/slider.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/textbox.hpp"

View file

@ -12,6 +12,8 @@
See the COPYING file for more details.
*/
#define GETTEXT_DOMAIN "wesnoth-lib"
#include "global.hpp"
#include "widgets/widget.hpp"