[gcompris] Disambiguation of translation is now handled with the Q_ macro.



commit 9c9eae8138a881b980f8b7df2b66db4bd278309d
Author: GunChleoc <fios foramnagaidhlig net>
Date:   Mon Aug 12 18:17:59 2013 +0200

    Disambiguation of translation is now handled with the Q_ macro.
    
    Added support for string disambiguation in shapegame tooltips.
    Now in tooltip if the string is marked as "Asia|Georgia",
    only the Georgia part will be displayed, the 'Asia' being
    usefull for translators.
    
    Added translation of USA states.

 po/POTFILES.in                                     |    1 +
 src/babymatch-activity/shapegame.c                 |    3 +-
 .../resources/geo_country/board10_0.xml.in         |  104 ++++++++++----------
 .../resources/geography/board10_0.xml.in           |    2 +-
 4 files changed, 56 insertions(+), 54 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 26f6fa8..3ccbc27 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -276,6 +276,7 @@ src/gcompris/timer.c
 src/gcompris/wordlist.c
 src/geo_country-activity/geo_country.xml.in
 src/geo_country-activity/resources/geo_country/board1_0.xml.in
+src/geo_country-activity/resources/geo_country/board10_0.xml.in
 src/geo_country-activity/resources/geo_country/board12_0.xml.in
 src/geo_country-activity/resources/geo_country/board13_0.xml.in
 src/geo_country-activity/resources/geo_country/board15_0.xml.in
diff --git a/src/babymatch-activity/shapegame.c b/src/babymatch-activity/shapegame.c
index 99d669a..abc177e 100644
--- a/src/babymatch-activity/shapegame.c
+++ b/src/babymatch-activity/shapegame.c
@@ -25,6 +25,7 @@
 
 #include "gcompris/gcompris.h"
 #include "gcompris/pixbuf_util.h"
+#include "glib/gi18n.h"
 
 #define SOUNDLISTFILE PACKAGE
 
@@ -1167,7 +1168,7 @@ item_event(GooCanvasItem *item, GooCanvasItem *target,
     case GDK_ENTER_NOTIFY:
       if(shape->tooltip) {
        g_object_set(tooltip_text_item,
-                    "text", gettext(shape->tooltip),
+                    "text", Q_(shape->tooltip),
                     NULL);
        g_object_set (tooltip_root_item, "visibility", GOO_CANVAS_ITEM_VISIBLE, NULL);
 
diff --git a/src/geo_country-activity/resources/geo_country/board10_0.xml.in 
b/src/geo_country-activity/resources/geo_country/board10_0.xml.in
index b80134b..7257b6c 100644
--- a/src/geo_country-activity/resources/geo_country/board10_0.xml.in
+++ b/src/geo_country-activity/resources/geo_country/board10_0.xml.in
@@ -1,109 +1,109 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <ShapeGame><!-- Created with GComprisShapegame gimp script -->
 <title justification="GTK_JUSTIFY_CENTER" x="600" y="495">
-<name>United States of America</name></title>
+<_name>United States of America</_name></title>
 <shape name="Connecticut" pixmapfile="geo_country/usa/connecticut.png" position="0" 
sound="geo_country/usa/Connecticut.ogg" x="677.0" y="173.5">
-<tooltip>Connecticut</tooltip></shape>
+<_tooltip>Connecticut</_tooltip></shape>
 <shape name="Rhode Island" pixmapfile="geo_country/usa/rhode_island.png" position="0" 
sound="geo_country/usa/Rhode Island.ogg" x="690.5" y="167.5">
-<tooltip>Rhode Island</tooltip></shape>
+<_tooltip>Rhode Island</_tooltip></shape>
 <shape name="Massachusetts" pixmapfile="geo_country/usa/massachusetts.png" position="0" 
sound="geo_country/usa/Massachusetts.ogg" x="686.0" y="158.0">
-<tooltip>Massachusetts</tooltip></shape>
+<_tooltip>Massachusetts</_tooltip></shape>
 <shape name="Wyoming" pixmapfile="geo_country/usa/wyoming.png" position="0" 
sound="geo_country/usa/Wyoming.ogg" x="269.0" y="175.0">
-<tooltip>Wyoming</tooltip></shape>
+<_tooltip>Wyoming</_tooltip></shape>
 <shape name="Utah" pixmapfile="geo_country/usa/utah.png" position="0" sound="geo_country/usa/Utah.ogg" 
x="213.0" y="224.0">
-<tooltip>Utah</tooltip></shape>
+<_tooltip>Utah</_tooltip></shape>
 <shape name="Nevada" pixmapfile="geo_country/usa/nevada.png" position="0" sound="geo_country/usa/Nevada.ogg" 
x="152.0" y="226.5">
-<tooltip>Nevada</tooltip></shape>
+<_tooltip>Nevada</_tooltip></shape>
 <shape name="California" pixmapfile="geo_country/usa/california.png" position="0" 
sound="geo_country/usa/California.ogg" x="117.0" y="237.0">
-<tooltip>California</tooltip></shape>
+<_tooltip>California</_tooltip></shape>
 <shape name="Washington D.C." pixmapfile="geo_country/usa/washington_dc.png" position="0" 
sound="geo_country/usa/WahingtonDC.ogg" x="710.0" y="292">
-<tooltip>Wahington D.C.</tooltip></shape>
+<_tooltip>Wahington D.C.</_tooltip></shape>
 <shape name="Maine" pixmapfile="geo_country/usa/maine.png" position="0" sound="geo_country/usa/Maine.ogg" 
x="703.5" y="107.5">
-<tooltip>Maine</tooltip></shape>
+<_tooltip>Maine</_tooltip></shape>
 <shape name="New Hampshire" pixmapfile="geo_country/usa/new_hampshire.png" position="0" 
sound="geo_country/usa/New Hampshire.ogg" x="684.0" y="132.5">
-<tooltip>New Hampshire</tooltip></shape>
+<_tooltip>New Hampshire</_tooltip></shape>
 <shape name="Vermont" pixmapfile="geo_country/usa/vermont.png" position="0" 
sound="geo_country/usa/Vermont.ogg" x="668.5" y="136.0">
-<tooltip>Vermont</tooltip></shape>
+<_tooltip>Vermont</_tooltip></shape>
 <shape name="New York" pixmapfile="geo_country/usa/new_york.png" position="0" sound="geo_country/usa/New 
York.ogg" x="640.5" y="156.0">
-<tooltip>New York</tooltip></shape>
+<_tooltip>New York</_tooltip></shape>
 <shape name="Pennsylvania" pixmapfile="geo_country/usa/pennsylvania.png" position="0" 
sound="geo_country/usa/Pennsylvania.ogg" x="623.0" y="195.5">
-<tooltip>Pennsylvania</tooltip></shape>
+<_tooltip>Pennsylvania</_tooltip></shape>
 <shape name="Delaware" pixmapfile="geo_country/usa/delaware.png" position="0" 
sound="geo_country/usa/Delaware.ogg" x="657.0" y="220.5">
-<tooltip>Delaware</tooltip></shape>
+<_tooltip>Delaware</_tooltip></shape>
 <shape name="New Jersey" pixmapfile="geo_country/usa/new_jersey.png" position="0" sound="geo_country/usa/New 
Jersey.ogg" x="660.5" y="199.5">
-<tooltip>New Jersey</tooltip></shape>
+<_tooltip>New Jersey</_tooltip></shape>
 <shape name="Maryland" pixmapfile="geo_country/usa/maryland.png" position="0" 
sound="geo_country/usa/Maryland.ogg" x="638.5" y="222.5">
-<tooltip>Maryland</tooltip></shape>
+<_tooltip>Maryland</_tooltip></shape>
 <shape name="Alabama" pixmapfile="geo_country/usa/alabama.png" position="0" 
sound="geo_country/usa/Alabama.ogg" x="531.5" y="341.5">
-<tooltip>Alabama</tooltip></shape>
+<_tooltip>Alabama</_tooltip></shape>
 <shape name="Florida" pixmapfile="geo_country/usa/florida.png" position="0" 
sound="geo_country/usa/Florida.ogg" x="577.5" y="407.0">
-<tooltip>Florida</tooltip></shape>
+<_tooltip>Florida</_tooltip></shape>
 <shape name="Georgia" pixmapfile="geo_country/usa/georgia.png" position="0" 
sound="geo_country/usa/Georgia.ogg" x="575.0" y="334.5">
-<tooltip>Georgia</tooltip></shape>
+<_tooltip>USA|Georgia</_tooltip></shape>
 <shape name="South Carolina" pixmapfile="geo_country/usa/south_carolina.png" position="0" 
sound="geo_country/usa/South Carolina.ogg" x="601.5" y="317.5">
-<tooltip>South Carolina</tooltip></shape>
+<_tooltip>South Carolina</_tooltip></shape>
 <shape name="North Carolina" pixmapfile="geo_country/usa/north_carolina.png" position="0" 
sound="geo_country/usa/North Carolina.ogg" x="610.5" y="282.5">
-<tooltip>North Carolina</tooltip></shape>
+<_tooltip>North Carolina</_tooltip></shape>
 <shape name="Virginia" pixmapfile="geo_country/usa/virginia.png" position="0" 
sound="geo_country/usa/Virginia.ogg" x="614.0" y="246.5">
-<tooltip>Virginia</tooltip></shape>
+<_tooltip>Virginia</_tooltip></shape>
 <shape name="West Virginia" pixmapfile="geo_country/usa/west_virginia.png" position="0" 
sound="geo_country/usa/West Virginia.ogg" x="599.5" y="235.0">
-<tooltip>West Virginia</tooltip></shape>
+<_tooltip>West Virginia</_tooltip></shape>
 <shape name="Ohio" pixmapfile="geo_country/usa/ohio.png" position="0" sound="geo_country/usa/Ohio.ogg" 
x="563.0" y="215.0">
-<tooltip>Ohio</tooltip></shape>
+<_tooltip>Ohio</_tooltip></shape>
 <shape name="Michigan" pixmapfile="geo_country/usa/michigan.png" position="0" 
sound="geo_country/usa/Michigan.ogg" x="512.0" y="153.0">
-<tooltip>Michigan</tooltip></shape>
+<_tooltip>Michigan</_tooltip></shape>
 <shape name="Wisconsin" pixmapfile="geo_country/usa/wisconsin.png" position="0" 
sound="geo_country/usa/Wisconsin.ogg" x="470.0" y="154.0">
-<tooltip>Wisconsin</tooltip></shape>
+<_tooltip>Wisconsin</_tooltip></shape>
 <shape name="Illinois" pixmapfile="geo_country/usa/illinois.png" position="0" 
sound="geo_country/usa/Illinois.ogg" x="482.5" y="232.0">
-<tooltip>Illinois</tooltip></shape>
+<_tooltip>Illinois</_tooltip></shape>
 <shape name="Indiana" pixmapfile="geo_country/usa/indiana.png" position="0" 
sound="geo_country/usa/Indiana.ogg" x="521.0" y="228.5">
-<tooltip>Indiana</tooltip></shape>
+<_tooltip>Indiana</_tooltip></shape>
 <shape name="Kentucky" pixmapfile="geo_country/usa/kentucky.png" position="0" 
sound="geo_country/usa/Kentucky.ogg" x="533.0" y="261.0">
-<tooltip>Kentucky</tooltip></shape>
+<_tooltip>Kentucky</_tooltip></shape>
 <shape name="Tennessee" pixmapfile="geo_country/usa/tennessee.png" position="0" 
sound="geo_country/usa/Tennessee.ogg" x="533.0" y="289.5">
-<tooltip>Tennessee</tooltip></shape>
+<_tooltip>Tennessee</_tooltip></shape>
 <shape name="Mississippi" pixmapfile="geo_country/usa/mississippi.png" position="0" 
sound="geo_country/usa/Mississippi.ogg" x="488.5" y="343.5">
-<tooltip>Mississippi</tooltip></shape>
+<_tooltip>Mississippi</_tooltip></shape>
 <shape name="Louisiana" pixmapfile="geo_country/usa/louisiana.png" position="0" 
sound="geo_country/usa/Louisiana.ogg" x="467.5" y="371.0">
-<tooltip>Louisiana</tooltip></shape>
+<_tooltip>Louisiana</_tooltip></shape>
 <shape name="Arkansas" pixmapfile="geo_country/usa/arkansas.png" position="0" 
sound="geo_country/usa/Arkansas.ogg" x="452.0" y="312.5">
-<tooltip>Arkansas</tooltip></shape>
+<_tooltip>Arkansas</_tooltip></shape>
 <shape name="Missouri" pixmapfile="geo_country/usa/missouri.png" position="0" 
sound="geo_country/usa/Missouri.ogg" x="448.5" y="257.0">
-<tooltip>Missouri</tooltip></shape>
+<_tooltip>Missouri</_tooltip></shape>
 <shape name="Iowa" pixmapfile="geo_country/usa/iowa.png" position="0" sound="geo_country/usa/Iowa.ogg" 
x="434.0" y="199.0">
-<tooltip>Iowa</tooltip></shape>
+<_tooltip>Iowa</_tooltip></shape>
 <shape name="Minnesota" pixmapfile="geo_country/usa/minnesota.png" position="0" 
sound="geo_country/usa/Minnesota.ogg" x="431.0" y="128.5">
-<tooltip>Minnesota</tooltip></shape>
+<_tooltip>Minnesota</_tooltip></shape>
 <shape name="Oklahoma" pixmapfile="geo_country/usa/oklahoma.png" position="0" 
sound="geo_country/usa/Oklahoma.ogg" x="369.5" y="305.0">
-<tooltip>Oklahoma</tooltip></shape>
+<_tooltip>Oklahoma</_tooltip></shape>
 <shape name="Texas" pixmapfile="geo_country/usa/texas.png" position="0" sound="geo_country/usa/Texas.ogg" 
x="349.0" y="369.5">
-<tooltip>Texas</tooltip></shape>
+<_tooltip>Texas</_tooltip></shape>
 <shape name="Hawai" pixmapfile="geo_country/usa/hawai.png" position="0" sound="geo_country/usa/Hawai.ogg" 
x="261.5" y="442.0">
-<tooltip>Hawai</tooltip></shape>
+<_tooltip>Hawai</_tooltip></shape>
 <shape name="Alaska" pixmapfile="geo_country/usa/alaska.png" position="0" sound="geo_country/usa/Alaska.ogg" 
x="130.5" y="416.0">
-<tooltip>Alaska</tooltip></shape>
+<_tooltip>Alaska</_tooltip></shape>
 <shape name="Arizona" pixmapfile="geo_country/usa/arizona.png" position="0" 
sound="geo_country/usa/Arizona.ogg" x="196.5" y="308.5">
-<tooltip>Arizona</tooltip></shape>
+<_tooltip>Arizona</_tooltip></shape>
 <shape name="New Mexico" pixmapfile="geo_country/usa/new_mexico.png" position="0" sound="geo_country/usa/New 
Mexico.ogg" x="271.5" y="313.5">
-<tooltip>New Mexico</tooltip></shape>
+<_tooltip>New Mexico</_tooltip></shape>
 <shape name="Colorado" pixmapfile="geo_country/usa/colorado.png" position="0" 
sound="geo_country/usa/Colorado.ogg" x="285.0" y="241.5">
-<tooltip>Colorado</tooltip></shape>
+<_tooltip>Colorado</_tooltip></shape>
 <shape name="Kansas" pixmapfile="geo_country/usa/kansas.png" position="0" sound="geo_country/usa/Kansas.ogg" 
x="374.0" y="255.0">
-<tooltip>Kansas</tooltip></shape>
+<_tooltip>Kansas</_tooltip></shape>
 <shape name="Nebraska" pixmapfile="geo_country/usa/nebraska.png" position="0" 
sound="geo_country/usa/Nebraska.ogg" x="359.0" y="206.0">
-<tooltip>Nebraska</tooltip></shape>
+<_tooltip>Nebraska</_tooltip></shape>
 <shape name="South Dakota" pixmapfile="geo_country/usa/south_dakota.png" position="0" 
sound="geo_country/usa/South Dakota.ogg" x="354.5" y="161.0">
-<tooltip>South Dakota</tooltip></shape>
+<_tooltip>South Dakota</_tooltip></shape>
 <shape name="North Dakota" pixmapfile="geo_country/usa/north_dakota.png" position="0" 
sound="geo_country/usa/North Dakota.ogg" x="355.5" y="110.5">
-<tooltip>North Dakota</tooltip></shape>
+<_tooltip>North Dakota</_tooltip></shape>
 <shape name="Montana" pixmapfile="geo_country/usa/montana.png" position="0" 
sound="geo_country/usa/Montana.ogg" x="255.0" y="106.5">
-<tooltip>Montana</tooltip></shape>
+<_tooltip>Montana</_tooltip></shape>
 <shape name="Idaho" pixmapfile="geo_country/usa/idaho.png" position="0" sound="geo_country/usa/Idaho.ogg" 
x="196.5" y="124.0">
-<tooltip>Idaho</tooltip></shape>
+<_tooltip>Idaho</_tooltip></shape>
 <shape name="Oregon" pixmapfile="geo_country/usa/oregon.png" position="0" sound="geo_country/usa/Oregon.ogg" 
x="127.0" y="129.0">
-<tooltip>Oregon</tooltip></shape>
+<_tooltip>Oregon</_tooltip></shape>
 <shape name="Washington" pixmapfile="geo_country/usa/washington.png" position="0" 
sound="geo_country/usa/Washington.ogg" x="141.0" y="79.0">
-<tooltip>Washington</tooltip></shape>
+<_tooltip>Washington</_tooltip></shape>
 <shape name="background" pixmapfile="geo_country/usa/background.png" position="0" type="SHAPE_BACKGROUND" 
x="400.0" y="259.5">
 </shape>
 </ShapeGame>
diff --git a/src/geography-activity/resources/geography/board10_0.xml.in 
b/src/geography-activity/resources/geography/board10_0.xml.in
index 25c6f80..f5f1e55 100644
--- a/src/geography-activity/resources/geography/board10_0.xml.in
+++ b/src/geography-activity/resources/geography/board10_0.xml.in
@@ -53,7 +53,7 @@
   <shape name="Turkey" pixmapfile="geography/asia/turkey.png" 
sound="voices/$LOCALE/geography/asia/turkey.ogg" x="118.5" y="222.5">
   <_tooltip>Turkey</_tooltip></shape>
   <shape name="Georgia" pixmapfile="geography/asia/georgia.png" 
sound="voices/$LOCALE/geography/asia/georgia.ogg" x="155.5" y="202.5">
-  <_tooltip>Georgia</_tooltip></shape>
+  <_tooltip>Asia|Georgia</_tooltip></shape>
   <shape name="Azerbaijan" pixmapfile="geography/asia/azerbaijan.png" 
sound="voices/$LOCALE/geography/asia/azerbaijan.ogg" x="175.5" y="215.5">
   <_tooltip>Azerbaijan</_tooltip></shape>
   <shape name="Iran" pixmapfile="geography/asia/iran.png" sound="voices/$LOCALE/geography/asia/iran.ogg" 
x="216.0" y="262.5">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]