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:
parent
4a0ed3c065
commit
c84f995e88
66 changed files with 141 additions and 4 deletions
|
@ -13,6 +13,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/dialogs/dialog.hpp"
|
||||
|
||||
#include "foreach.hpp"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/container.hpp"
|
||||
|
||||
namespace gui2 {
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "control.hpp"
|
||||
|
||||
#include "foreach.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#define NEW_DRAW
|
||||
|
||||
#ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#define NEW_DRAW
|
||||
|
||||
#ifdef NEW_DRAW
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/grid.hpp"
|
||||
|
||||
#include "foreach.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/horizontal_scrollbar.hpp"
|
||||
|
||||
namespace gui2 {
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/image.hpp"
|
||||
|
||||
#include "../../image.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/label.hpp"
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/listbox.hpp"
|
||||
|
||||
#ifndef NEW_DRAW
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/minimap.hpp"
|
||||
|
||||
#include "map.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/panel.hpp"
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/scrollbar.hpp"
|
||||
|
||||
#include "foreach.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#define NEW_DRAW
|
||||
|
||||
#ifdef NEW_DRAW
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/slider.hpp"
|
||||
|
||||
#include "foreach.hpp"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
namespace gui2 {
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/text.hpp"
|
||||
|
||||
#include "clipboard.hpp"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
namespace gui2 {
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/vertical_scrollbar.hpp"
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
see the copying file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/window.hpp"
|
||||
|
||||
namespace gui2 {
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Implementation of window.hpp.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "gui/widgets/window.hpp"
|
||||
|
||||
#include "cursor.hpp"
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
* Routines for images: load, scale, re-color, etc.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "config.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "actions.hpp"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-test"
|
||||
|
||||
#include "utils/test_support.hpp"
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-test"
|
||||
|
||||
#include "utils/test_support.hpp"
|
||||
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-test"
|
||||
|
||||
#include "utils/test_support.hpp"
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-test"
|
||||
|
||||
#include "utils/test_support.hpp"
|
||||
|
||||
#include "util.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-test"
|
||||
|
||||
#include "utils/test_support.hpp"
|
||||
#include "version.hpp"
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-test"
|
||||
|
||||
#include "fake_display.hpp"
|
||||
|
||||
#include "gamestatus.hpp"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "text.hpp"
|
||||
|
||||
#include "gui/widgets/helper.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/button.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/combo.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/combo_drag.hpp"
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/label.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/menu.hpp"
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/progressbar.hpp"
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
/** @file widgets/scrollarea.cpp */
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/scrollarea.hpp"
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
|
||||
/** @file widgets/scrollbar.cpp */
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/scrollbar.hpp"
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
/** @file widgets/scrollpane.cpp */
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/slider.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/textbox.hpp"
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
See the COPYING file for more details.
|
||||
*/
|
||||
|
||||
#define GETTEXT_DOMAIN "wesnoth-lib"
|
||||
|
||||
#include "global.hpp"
|
||||
|
||||
#include "widgets/widget.hpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue