diff --git a/magic/src/blocks_chalk_drip.c b/magic/src/blocks_chalk_drip.c index 3fe71d635..69fb8e096 100644 --- a/magic/src/blocks_chalk_drip.c +++ b/magic/src/blocks_chalk_drip.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -130,11 +129,11 @@ SDL_Surface * blocks_chalk_drip_get_icon(magic_api * api, int which) char * blocks_chalk_drip_get_name(magic_api * api ATTRIBUTE_UNUSED, int which) { if (which == TOOL_BLOCKS) - return(strdup(gettext("Blocks"))); + return(strdup(gettext_noop("Blocks"))); else if (which == TOOL_CHALK) - return(strdup(gettext("Chalk"))); + return(strdup(gettext_noop("Chalk"))); else if (which == TOOL_DRIP) - return(strdup(gettext("Drip"))); + return(strdup(gettext_noop("Drip"))); return(NULL); } @@ -143,13 +142,13 @@ char * blocks_chalk_drip_get_name(magic_api * api ATTRIBUTE_UNUSED, int which) char * blocks_chalk_drip_get_description(magic_api * api ATTRIBUTE_UNUSED, int which) { if (which == TOOL_BLOCKS) - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to make the picture blocky."))); else if (which == TOOL_CHALK) - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to turn the picture into a chalk drawing."))); else if (which == TOOL_DRIP) - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to make the picture drip."))); return(NULL); diff --git a/magic/src/blur.c b/magic/src/blur.c index 117b3a3c5..41c1caa11 100644 --- a/magic/src/blur.c +++ b/magic/src/blur.c @@ -31,7 +31,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -74,13 +73,13 @@ SDL_Surface * blur_get_icon(magic_api * api, int which) // Return our names, localized: char * blur_get_name(magic_api * api, int which) { - return(strdup(gettext("Blur"))); + return(strdup(gettext_noop("Blur"))); } // Return our descriptions, localized: char * blur_get_description(magic_api * api, int which) { - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to blur the picture."))); } diff --git a/magic/src/bricks.c b/magic/src/bricks.c index 2cfecfc14..34b03c239 100644 --- a/magic/src/bricks.c +++ b/magic/src/bricks.c @@ -32,7 +32,6 @@ #include #include #include /* For RAND_MAX */ -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -102,16 +101,16 @@ char * bricks_get_name(magic_api * api, int which) { /* Both are named "Bricks", at the moment: */ - return(strdup(gettext("Bricks"))); + return(strdup(gettext_noop("Bricks"))); } // Return our descriptions, localized: char * bricks_get_description(magic_api * api, int which) { if (which == TOOL_LARGEBRICKS) - return(strdup(gettext("Click and move to draw large bricks."))); + return(strdup(gettext_noop("Click and move to draw large bricks."))); else if (which == TOOL_SMALLBRICKS) - return(strdup(gettext("Click and move to draw small bricks."))); + return(strdup(gettext_noop("Click and move to draw small bricks."))); return(NULL); } diff --git a/magic/src/calligraphy.c b/magic/src/calligraphy.c index bd949e04b..f98bc43f5 100644 --- a/magic/src/calligraphy.c +++ b/magic/src/calligraphy.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -106,14 +105,14 @@ SDL_Surface * calligraphy_get_icon(magic_api * api, int which) // Return our name, localized: char * calligraphy_get_name(magic_api * api, int which) { - return(strdup(gettext("Calligraphy"))); + return(strdup(gettext_noop("Calligraphy"))); } // Return our description, localized: char * calligraphy_get_description(magic_api * api, int which) { return(strdup( - gettext("Click and move the mouse around to draw in calligraphy."))); + gettext_noop("Click and move the mouse around to draw in calligraphy."))); } diff --git a/magic/src/cartoon.c b/magic/src/cartoon.c index e4bfec2f3..87aca1079 100644 --- a/magic/src/cartoon.c +++ b/magic/src/cartoon.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include "tp_magic_api.h" @@ -78,13 +77,13 @@ SDL_Surface * cartoon_get_icon(magic_api * api, int which) // Return our names, localized: char * cartoon_get_name(magic_api * api, int which) { - return(strdup(gettext("Cartoon"))); + return(strdup(gettext_noop("Cartoon"))); } // Return our descriptions, localized: char * cartoon_get_description(magic_api * api, int which) { - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to turn the picture into a cartoon."))); } diff --git a/magic/src/distortion.c b/magic/src/distortion.c index 68c2dc0bc..55a7a3bb4 100644 --- a/magic/src/distortion.c +++ b/magic/src/distortion.c @@ -32,7 +32,6 @@ #include #include // For "strdup()" -#include // For "gettext()" #include "tp_magic_api.h" // Tux Paint "Magic" tool API header #include "SDL_image.h" // For IMG_Load(), to load our PNG icon @@ -119,7 +118,7 @@ SDL_Surface * distortion_get_icon(magic_api * api, int which) char * distortion_get_name(magic_api * api, int which) { - return(strdup(gettext("Distortion"))); + return(strdup(gettext_noop("Distortion"))); } @@ -127,7 +126,7 @@ char * distortion_get_name(magic_api * api, int which) char * distortion_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag the mouse to cause a distortion in your picture."))); + return(strdup(gettext_noop("Click and drag the mouse to cause a distortion in your picture."))); } // Report whether we accept colors diff --git a/magic/src/emboss.c b/magic/src/emboss.c index 377fe8ebe..4357e8024 100644 --- a/magic/src/emboss.c +++ b/magic/src/emboss.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -74,13 +73,13 @@ SDL_Surface * emboss_get_icon(magic_api * api, int which) // Return our names, localized: char * emboss_get_name(magic_api * api, int which) { - return(strdup(gettext("Emboss"))); + return(strdup(gettext_noop("Emboss"))); } // Return our descriptions, localized: char * emboss_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag the mouse to emboss the picture."))); + return(strdup(gettext_noop("Click and drag the mouse to emboss the picture."))); } // Do the effect: diff --git a/magic/src/fade_darken.c b/magic/src/fade_darken.c index 58e4b2663..15b19627b 100644 --- a/magic/src/fade_darken.c +++ b/magic/src/fade_darken.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -114,9 +113,9 @@ SDL_Surface * fade_darken_get_icon(magic_api * api, int which) char * fade_darken_get_name(magic_api * api ATTRIBUTE_UNUSED, int which) { if (which == TOOL_FADE) - return(strdup(gettext("Lighten"))); + return(strdup(gettext_noop("Lighten"))); else if (which == TOOL_DARKEN) - return(strdup(gettext("Darken"))); + return(strdup(gettext_noop("Darken"))); return(NULL); } @@ -126,10 +125,10 @@ char * fade_darken_get_description(magic_api * api ATTRIBUTE_UNUSED, int which) { if (which == TOOL_FADE) return(strdup( - gettext("Click and move to fade the colors."))); + gettext_noop("Click and move to fade the colors."))); else if (which == TOOL_DARKEN) return(strdup( - gettext("Click and move to darken the colors."))); + gettext_noop("Click and move to darken the colors."))); return(NULL); } diff --git a/magic/src/fill.c b/magic/src/fill.c index c33bfafd6..6891d2d42 100644 --- a/magic/src/fill.c +++ b/magic/src/fill.c @@ -33,7 +33,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" @@ -85,13 +84,13 @@ SDL_Surface * fill_get_icon(magic_api * api, int which) // Return our names, localized: char * fill_get_name(magic_api * api, int which) { - return(strdup(gettext("Fill"))); + return(strdup(gettext_noop("Fill"))); } // Return our descriptions, localized: char * fill_get_description(magic_api * api, int which) { - return(strdup(gettext( + return(strdup(gettext_noop( "Click in the picture to fill that area with color."))); } diff --git a/magic/src/flower.c b/magic/src/flower.c index 560fc998d..5d002a86f 100644 --- a/magic/src/flower.c +++ b/magic/src/flower.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -122,13 +121,13 @@ SDL_Surface * flower_get_icon(magic_api * api, int which) // Return our names, localized: char * flower_get_name(magic_api * api, int which) { - return(strdup(gettext("Flower"))); + return(strdup(gettext_noop("Flower"))); } // Return our descriptions, localized: char * flower_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag to draw a flower stalk. Let go to finish the flower."))); + return(strdup(gettext_noop("Click and drag to draw a flower stalk. Let go to finish the flower."))); } // Affect the canvas on drag: diff --git a/magic/src/foam.c b/magic/src/foam.c index 6cce32e32..1989a931b 100644 --- a/magic/src/foam.c +++ b/magic/src/foam.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -102,13 +101,13 @@ SDL_Surface * foam_get_icon(magic_api * api, int which) // Return our names, localized: char * foam_get_name(magic_api * api, int which) { - return(strdup(gettext("Foam"))); + return(strdup(gettext_noop("Foam"))); } // Return our descriptions, localized: char * foam_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag the mouse to cover an area with foamy bubbles."))); + return(strdup(gettext_noop("Click and drag the mouse to cover an area with foamy bubbles."))); } // Do the effect: diff --git a/magic/src/glasstile.c b/magic/src/glasstile.c index 483257164..f55562388 100644 --- a/magic/src/glasstile.c +++ b/magic/src/glasstile.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -81,13 +80,13 @@ SDL_Surface * glasstile_get_icon(magic_api * api, int which) // Return our names, localized: char * glasstile_get_name(magic_api * api, int which) { - return(strdup(gettext("Glass Tile"))); + return(strdup(gettext_noop("Glass Tile"))); } // Return our descriptions, localized: char * glasstile_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag the mouse to put glass tile over your picture."))); + return(strdup(gettext_noop("Click and drag the mouse to put glass tile over your picture."))); } // Do the effect: diff --git a/magic/src/grass.c b/magic/src/grass.c index f62f10671..1c40877c8 100644 --- a/magic/src/grass.c +++ b/magic/src/grass.c @@ -31,7 +31,6 @@ #include #include #include /* for RAND_MAX */ -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -90,13 +89,13 @@ SDL_Surface * grass_get_icon(magic_api * api, int which) // Return our names, localized: char * grass_get_name(magic_api * api, int which) { - return(strdup(gettext("Grass"))); + return(strdup(gettext_noop("Grass"))); } // Return our descriptions, localized: char * grass_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and move to draw grass. Don’t forget the dirt!"))); + return(strdup(gettext_noop("Click and move to draw grass. Don’t forget the dirt!"))); } diff --git a/magic/src/kalidescope.c b/magic/src/kalidescope.c index f0f24a7f7..3fb14756c 100644 --- a/magic/src/kalidescope.c +++ b/magic/src/kalidescope.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -75,13 +74,13 @@ SDL_Surface * kalidescope_get_icon(magic_api * api, int which) // Return our names, localized: char * kalidescope_get_name(magic_api * api, int which) { - return(strdup(gettext("Kaleidoscope"))); + return(strdup(gettext_noop("Kaleidoscope"))); } // Return our descriptions, localized: char * kalidescope_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag the mouse to draw with symmetric brushes (a kaleidoscope)."))); + return(strdup(gettext_noop("Click and drag the mouse to draw with symmetric brushes (a kaleidoscope)."))); } // Do the effect: diff --git a/magic/src/light.c b/magic/src/light.c index 741aa3af6..e5c2471aa 100644 --- a/magic/src/light.c +++ b/magic/src/light.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -82,13 +81,13 @@ SDL_Surface * light_get_icon(magic_api * api, int which) // Return our names, localized: char * light_get_name(magic_api * api, int which) { - return(strdup(gettext("Light"))); + return(strdup(gettext_noop("Light"))); } // Return our descriptions, localized: char * light_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag to draw a beam of light on your picture."))); + return(strdup(gettext_noop("Click and drag to draw a beam of light on your picture."))); } // Do the effect: diff --git a/magic/src/metalpaint.c b/magic/src/metalpaint.c index dab36097d..bacdd1a02 100644 --- a/magic/src/metalpaint.c +++ b/magic/src/metalpaint.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -75,13 +74,13 @@ SDL_Surface * metalpaint_get_icon(magic_api * api, int which) // Return our names, localized: char * metalpaint_get_name(magic_api * api, int which) { - return(strdup(gettext("Metal Paint"))); + return(strdup(gettext_noop("Metal Paint"))); } // Return our descriptions, localized: char * metalpaint_get_description(magic_api * api, int which) { - return(strdup(gettext("Click and drag the mouse to paint with a metallic color."))); + return(strdup(gettext_noop("Click and drag the mouse to paint with a metallic color."))); } #define METALPAINT_CYCLE 32 diff --git a/magic/src/mirror_flip.c b/magic/src/mirror_flip.c index 9c32c10cf..2b202d808 100644 --- a/magic/src/mirror_flip.c +++ b/magic/src/mirror_flip.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -92,9 +91,9 @@ SDL_Surface * mirror_flip_get_icon(magic_api * api, int which) char * mirror_flip_get_name(magic_api * api, int which) { if (which == TOOL_MIRROR) - return(strdup(gettext("Mirror"))); + return(strdup(gettext_noop("Mirror"))); else if (which == TOOL_FLIP) - return(strdup(gettext("Flip"))); + return(strdup(gettext_noop("Flip"))); return(NULL); } @@ -104,10 +103,10 @@ char * mirror_flip_get_description(magic_api * api, int which) { if (which == TOOL_MIRROR) return(strdup( - gettext("Click to make a mirror image."))); + gettext_noop("Click to make a mirror image."))); else return(strdup( - gettext("Click to flip the picture upside-down."))); + gettext_noop("Click to flip the picture upside-down."))); return(NULL); } diff --git a/magic/src/negative.c b/magic/src/negative.c index 93b39fc60..5deed5fa1 100644 --- a/magic/src/negative.c +++ b/magic/src/negative.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -70,14 +69,14 @@ SDL_Surface * negative_get_icon(magic_api * api, int which) // Return our name, localized: char * negative_get_name(magic_api * api, int which) { - return(strdup(gettext("Negative"))); + return(strdup(gettext_noop("Negative"))); } // Return our description, localized: char * negative_get_description(magic_api * api, int which) { return(strdup( - gettext("Click and move the mouse around to draw a negative."))); + gettext_noop("Click and move the mouse around to draw a negative."))); } // Callback that does the negative color effect on a circle centered around x,y diff --git a/magic/src/rainbow.c b/magic/src/rainbow.c index 3e6cc99b1..bc7bc0618 100644 --- a/magic/src/rainbow.c +++ b/magic/src/rainbow.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -105,14 +104,14 @@ SDL_Surface * rainbow_get_icon(magic_api * api, int which) // Return our names, localized: char * rainbow_get_name(magic_api * api, int which) { - return(strdup(gettext("Rainbow"))); + return(strdup(gettext_noop("Rainbow"))); } // Return our descriptions, localized: char * rainbow_get_description(magic_api * api, int which) { return(strdup( - gettext("You can draw in rainbow colors!"))); + gettext_noop("You can draw in rainbow colors!"))); } // Do the effect: diff --git a/magic/src/ripples.c b/magic/src/ripples.c index b2100a5c5..140042896 100644 --- a/magic/src/ripples.c +++ b/magic/src/ripples.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -79,13 +78,13 @@ SDL_Surface * ripples_get_icon(magic_api * api, int which) // Return our names, localized: char * ripples_get_name(magic_api * api, int which) { - return(strdup(gettext("Ripples"))); + return(strdup(gettext_noop("Ripples"))); } // Return our descriptions, localized: char * ripples_get_description(magic_api * api, int which) { - return(strdup(gettext("Click to make ripples appear over your picture."))); + return(strdup(gettext_noop("Click to make ripples appear over your picture."))); } // Affect the canvas on drag: diff --git a/magic/src/shift.c b/magic/src/shift.c index 1932742bd..95008ffa9 100644 --- a/magic/src/shift.c +++ b/magic/src/shift.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -102,13 +101,13 @@ SDL_Surface * shift_get_icon(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBU // Return our names, localized: char * shift_get_name(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) { - return(strdup(gettext("Shift"))); + return(strdup(gettext_noop("Shift"))); } // Return our descriptions, localized: char * shift_get_description(magic_api * api ATTRIBUTE_UNUSED, int which ATTRIBUTE_UNUSED) { - return(strdup(gettext("Click and drag to shift your picture around on the canvas."))); + return(strdup(gettext_noop("Click and drag to shift your picture around on the canvas."))); } diff --git a/magic/src/smudge.c b/magic/src/smudge.c index 2f5639bd4..962172687 100644 --- a/magic/src/smudge.c +++ b/magic/src/smudge.c @@ -30,7 +30,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -75,13 +74,13 @@ SDL_Surface * smudge_get_icon(magic_api * api, int which) // Return our names, localized: char * smudge_get_name(magic_api * api, int which) { - return(strdup(gettext("Smudge"))); + return(strdup(gettext_noop("Smudge"))); } // Return our descriptions, localized: char * smudge_get_description(magic_api * api, int which) { - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to smudge the picture."))); } diff --git a/magic/src/tint.c b/magic/src/tint.c index 07097feb1..805a3df36 100644 --- a/magic/src/tint.c +++ b/magic/src/tint.c @@ -29,7 +29,6 @@ #include #include -#include #include "tp_magic_api.h" #include "SDL_image.h" #include "SDL_mixer.h" @@ -75,13 +74,13 @@ SDL_Surface * tint_get_icon(magic_api * api, int which) // Return our names, localized: char * tint_get_name(magic_api * api, int which) { - return(strdup(gettext("Tint"))); + return(strdup(gettext_noop("Tint"))); } // Return our descriptions, localized: char * tint_get_description(magic_api * api, int which) { - return(strdup(gettext( + return(strdup(gettext_noop( "Click and move the mouse around to change the picture’s color."))); } diff --git a/magic/src/waves.c b/magic/src/waves.c index 14ac47c6e..6c56a1d54 100644 --- a/magic/src/waves.c +++ b/magic/src/waves.c @@ -29,7 +29,6 @@ #include #include -#include #include #include "tp_magic_api.h" #include "SDL_image.h" @@ -76,13 +75,13 @@ SDL_Surface * waves_get_icon(magic_api * api, int which) // Return our names, localized: char * waves_get_name(magic_api * api, int which) { - return(strdup(gettext("Waves"))); + return(strdup(gettext_noop("Waves"))); } // Return our descriptions, localized: char * waves_get_description(magic_api * api, int which) { - return(strdup(gettext("Click to make the picture wavy. Click toward the top for shorter waves, the bottom for taller waves, the left for small waves, and the right for long waves."))); + return(strdup(gettext_noop("Click to make the picture wavy. Click toward the top for shorter waves, the bottom for taller waves, the left for small waves, and the right for long waves."))); } diff --git a/src/tp_magic_api.h.in b/src/tp_magic_api.h.in index 25e4c3c98..9dcec42b8 100644 --- a/src/tp_magic_api.h.in +++ b/src/tp_magic_api.h.in @@ -3,7 +3,10 @@ #include "SDL.h" #include "SDL_mixer.h" - +#include "libintl.h" +#ifndef gettext_noop +#define gettext_noop(String) String +#endif /* min() and max() variable comparisons: */