]> saetta.ns0.it Git - libgdaex/commitdiff
Gettexized GdaExQueryEditor.
authorAndrea Zagli <azagli@libero.it>
Mon, 24 Oct 2011 16:19:13 +0000 (18:19 +0200)
committerAndrea Zagli <azagli@libero.it>
Mon, 24 Oct 2011 16:19:13 +0000 (18:19 +0200)
data/libgdaex/gui/libgdaex.ui
po/POTFILES.in
po/it.po
src/gdaex.c
src/queryeditor.c

index b3f532e72704a1b2830182030cbaafc43500d6fc..d32342e33edde0eaa7c482defcfa048d5ef5ab65 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <requires lib="gtk+" version="2.16"/>
+  <requires lib="gtk+" version="2.24"/>
   <!-- interface-naming-policy project-wide -->
   <object class="GtkListStore" id="lstore_order">
     <columns>
@@ -92,7 +92,7 @@
                 <property name="tooltip_column">3</property>
                 <child>
                   <object class="GtkTreeViewColumn" id="treeviewcolumn1">
-                    <property name="title">Fields</property>
+                    <property name="title" translatable="yes">Fields</property>
                     <child>
                       <object class="GtkCellRendererText" id="cellrenderertext1"/>
                       <attributes>
                             <property name="search_column">2</property>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn2">
-                                <property name="title">Field</property>
+                                <property name="title" translatable="yes">Field</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext2"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn10">
-                                <property name="title">Alias</property>
+                                <property name="title" translatable="yes">Alias</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext9"/>
                                   <attributes>
                             <property name="search_column">4</property>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn11">
-                                <property name="title">Link</property>
+                                <property name="title" translatable="yes">Link</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext10"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn5">
-                                <property name="title">Field</property>
+                                <property name="title" translatable="yes">Field</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext5"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn9">
-                                <property name="title">Not</property>
+                                <property name="title" translatable="yes">Not</property>
                                 <child>
                                   <object class="GtkCellRendererToggle" id="cellrenderertoggle1"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn6">
-                                <property name="title">Condition</property>
+                                <property name="title" translatable="yes">Condition</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext6"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn7">
-                                <property name="title">From</property>
+                                <property name="title" translatable="yes">From</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext7"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn8">
-                                <property name="title">To</property>
+                                <property name="title" translatable="yes">To</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext8"/>
                                   <attributes>
                             <property name="search_column">2</property>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn3">
-                                <property name="title">Field</property>
+                                <property name="title" translatable="yes">Field</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext3"/>
                                   <attributes>
                             </child>
                             <child>
                               <object class="GtkTreeViewColumn" id="treeviewcolumn4">
-                                <property name="title">Order</property>
+                                <property name="title" translatable="yes">Order</property>
                                 <child>
                                   <object class="GtkCellRendererText" id="cellrenderertext4"/>
                                   <attributes>
index 79e52618f317689db031fa2e0eb80d8efaba92e5..648a5bdaa1959147f150f48c4a68a55eab79305f 100644 (file)
@@ -1,2 +1,4 @@
 # List of source files which contain translatable strings.
 src/gdaex.c
+src/queryeditor.c
+[type: gettext/glade]data/libgdaex/gui/libgdaex.ui
index 52f3b486fd5e32b931c143ff8fec82422590c0c0..932760028523609e9b7fadb8db49b7ff9e79e5c5 100644 (file)
--- a/po/it.po
+++ b/po/it.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: libgdaex 0.4.0\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-10-22 10:42+0200\n"
-"PO-Revision-Date: 2011-10-22 10:52+0200\n"
+"POT-Creation-Date: 2011-10-24 17:40+0200\n"
+"PO-Revision-Date: 2011-10-24 17:44+0200\n"
 "Last-Translator: Andrea Zagli <azagli@libero.it>\n"
 "Language-Team: Italian <tp@lists.linux.it>\n"
 "Language: \n"
@@ -18,59 +18,61 @@ msgstr ""
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 
 #. TO DO
-#: ../src/gdaex.c:206
+#: ../src/gdaex.c:218
 msgid "Datasource cannot be empty."
 msgstr "Datasource non può essere vuota."
 
 #. TO DO
-#: ../src/gdaex.c:214 ../src/gdaex.c:307
+#: ../src/gdaex.c:226 ../src/gdaex.c:319
 msgid "Unable to create GdaEx object."
 msgstr "Impossibile creare l'oggetto GdaEx."
 
-#: ../src/gdaex.c:273 ../src/gdaex.c:322
+#: ../src/gdaex.c:285 ../src/gdaex.c:334
 #, c-format
 msgid "Error creating database connection: %s"
 msgstr "Errore nella creazione della connessione al database: %s"
 
-#: ../src/gdaex.c:274 ../src/gdaex.c:677 ../src/gdaex.c:694
-#: ../src/gdaex.c:1016 ../src/gdaex.c:1056 ../src/gdaex.c:1095
-#: ../src/gdaex.c:1134 ../src/gdaex.c:1186 ../src/gdaex.c:1281
-#: ../src/gdaex.c:1341 ../src/gdaex.c:1407 ../src/gdaex.c:1457
-#: ../src/gdaex.c:2283 ../src/gdaex.c:2393 ../src/gdaex.c:2440
-#: ../src/gdaex.c:2458 ../src/gdaex.c:2511 ../src/gdaex.c:2570
-#: ../src/gdaex.c:2623 ../src/gdaex.c:2887 ../src/gdaex.c:2905
+#: ../src/gdaex.c:286 ../src/gdaex.c:689 ../src/gdaex.c:706
+#: ../src/gdaex.c:1028 ../src/gdaex.c:1068 ../src/gdaex.c:1107
+#: ../src/gdaex.c:1146 ../src/gdaex.c:1198 ../src/gdaex.c:1293
+#: ../src/gdaex.c:1353 ../src/gdaex.c:1419 ../src/gdaex.c:1469
+#: ../src/gdaex.c:2295 ../src/gdaex.c:2405 ../src/gdaex.c:2452
+#: ../src/gdaex.c:2470 ../src/gdaex.c:2523 ../src/gdaex.c:2582
+#: ../src/gdaex.c:2635 ../src/gdaex.c:2923 ../src/gdaex.c:2941
+#: ../src/queryeditor.c:323 ../src/queryeditor.c:1224
+#: ../src/queryeditor.c:1236
 msgid "no details"
 msgstr "nessun dettaglio"
 
 #. TO DO
-#: ../src/gdaex.c:299
+#: ../src/gdaex.c:311
 msgid "cnc_string must not be empty."
 msgstr "cnc_string non può essere vuota."
 
-#: ../src/gdaex.c:323 ../src/gdaex.c:377 ../src/gdaex.c:411
+#: ../src/gdaex.c:335 ../src/gdaex.c:389 ../src/gdaex.c:423
 msgid "no details."
 msgstr "nessun dettaglio."
 
-#: ../src/gdaex.c:376
+#: ../src/gdaex.c:388
 #, c-format
 msgid "Error on writing on log file: %s"
 msgstr "Errore nella scrittura del file di registro: %s"
 
-#: ../src/gdaex.c:410
+#: ../src/gdaex.c:422
 #, c-format
 msgid "Error on opening log file: %s"
 msgstr "Errore nell'apertura del file di registro: %s"
 
-#: ../src/gdaex.c:528
+#: ../src/gdaex.c:540
 msgid "Unable to get the GdaSqlStatement from the GdaStatement."
 msgstr "Impossibile ottenere il GdaSqlStatement dal GdaStatement."
 
-#: ../src/gdaex.c:642
+#: ../src/gdaex.c:654
 #, c-format
 msgid "Statement type %s not implemented."
 msgstr "Tipo di istruzione %s non implementato."
 
-#: ../src/gdaex.c:676
+#: ../src/gdaex.c:688
 #, c-format
 msgid ""
 "Error parsing query string: %s\n"
@@ -79,7 +81,7 @@ msgstr ""
 "Errore nell'analisi della stringa della query: %s\n"
 "%s"
 
-#: ../src/gdaex.c:693
+#: ../src/gdaex.c:705
 #, c-format
 msgid ""
 "Error executing selection query: %s\n"
@@ -88,24 +90,24 @@ msgstr ""
 "Errore nell'esecuzione della query di selezione: %s\n"
 "%s"
 
-#: ../src/gdaex.c:701
+#: ../src/gdaex.c:713
 #, c-format
 msgid "Selection query executed: %s"
 msgstr "Query di selezione eseguita: %s"
 
-#: ../src/gdaex.c:732 ../src/gdaex.c:763 ../src/gdaex.c:793 ../src/gdaex.c:823
-#: ../src/gdaex.c:853 ../src/gdaex.c:883 ../src/gdaex.c:914 ../src/gdaex.c:945
-#: ../src/gdaex.c:976 ../src/gdaex.c:1488 ../src/gdaex.c:1520
-#: ../src/gdaex.c:1551 ../src/gdaex.c:1582 ../src/gdaex.c:1613
-#: ../src/gdaex.c:1644 ../src/gdaex.c:1676 ../src/gdaex.c:1708
-#: ../src/gdaex.c:1740
+#: ../src/gdaex.c:744 ../src/gdaex.c:775 ../src/gdaex.c:805 ../src/gdaex.c:835
+#: ../src/gdaex.c:865 ../src/gdaex.c:895 ../src/gdaex.c:926 ../src/gdaex.c:957
+#: ../src/gdaex.c:988 ../src/gdaex.c:1500 ../src/gdaex.c:1532
+#: ../src/gdaex.c:1563 ../src/gdaex.c:1594 ../src/gdaex.c:1625
+#: ../src/gdaex.c:1656 ../src/gdaex.c:1688 ../src/gdaex.c:1720
+#: ../src/gdaex.c:1752
 #, c-format
 msgid "No column found with name «%s»."
 msgstr "Nessuna colonna trovata con il nome «%s»."
 
-#: ../src/gdaex.c:1014 ../src/gdaex.c:1054 ../src/gdaex.c:1093
-#: ../src/gdaex.c:1132 ../src/gdaex.c:1184 ../src/gdaex.c:1279
-#: ../src/gdaex.c:1339 ../src/gdaex.c:1405 ../src/gdaex.c:1455
+#: ../src/gdaex.c:1026 ../src/gdaex.c:1066 ../src/gdaex.c:1105
+#: ../src/gdaex.c:1144 ../src/gdaex.c:1196 ../src/gdaex.c:1291
+#: ../src/gdaex.c:1351 ../src/gdaex.c:1417 ../src/gdaex.c:1467
 #, c-format
 msgid ""
 "Error on retrieving field's value: «%s».\n"
@@ -114,7 +116,7 @@ msgstr ""
 "Errore nell'ottenere il valore del campo: «%s»\n"
 "%s\n"
 
-#: ../src/gdaex.c:1272 ../src/gdaex.c:1332 ../src/gdaex.c:1398
+#: ../src/gdaex.c:1284 ../src/gdaex.c:1344 ../src/gdaex.c:1410
 #, c-format
 msgid ""
 "Error on retrieving field's value: «%s».\n"
@@ -123,40 +125,40 @@ msgstr ""
 "Errore nell'ottenere il valore del campo: «%s».\n"
 "Tipo GValue sconosciuto."
 
-#: ../src/gdaex.c:1767 ../src/gdaex.c:1805 ../src/gdaex.c:1843
-#: ../src/gdaex.c:1881 ../src/gdaex.c:1919 ../src/gdaex.c:1972
-#: ../src/gdaex.c:2065 ../src/gdaex.c:2123 ../src/gdaex.c:2183
+#: ../src/gdaex.c:1779 ../src/gdaex.c:1817 ../src/gdaex.c:1855
+#: ../src/gdaex.c:1893 ../src/gdaex.c:1931 ../src/gdaex.c:1984
+#: ../src/gdaex.c:2077 ../src/gdaex.c:2135 ../src/gdaex.c:2195
 #, c-format
 msgid "Error on retrieving field's value: «%s»."
 msgstr "Errore nell'ottenere il valore del campo: «%s»."
 
-#: ../src/gdaex.c:2034 ../src/gdaex.c:2090 ../src/gdaex.c:2154
+#: ../src/gdaex.c:2046 ../src/gdaex.c:2102 ../src/gdaex.c:2166
 msgid "Error on retrieving field's value: unknown GValue type."
 msgstr "Impossibile ottenere il valore del campo: tipo GValue sconosciuto."
 
-#: ../src/gdaex.c:2281
+#: ../src/gdaex.c:2293
 #, c-format
 msgid "Error on retrieving column %d: %s"
 msgstr "Errore nell'ottenere la colonna %d: %s"
 
-#: ../src/gdaex.c:2331
+#: ../src/gdaex.c:2343
 msgid "Invalid GdaDataModel."
 msgstr "GdaDataModel non valido."
 
-#: ../src/gdaex.c:2345
+#: ../src/gdaex.c:2357
 msgid "Unable to create the GtkTreeModel."
 msgstr "Impossibile creare il GtkTreeModel."
 
-#: ../src/gdaex.c:2392
+#: ../src/gdaex.c:2404
 #, c-format
 msgid "Error opening transaction: %s\n"
 msgstr "Errore nell'apertura della transazione: %s\n"
 
-#: ../src/gdaex.c:2399
+#: ../src/gdaex.c:2411
 msgid "Transaction opened."
 msgstr "Transazione aperta."
 
-#: ../src/gdaex.c:2433
+#: ../src/gdaex.c:2445
 #, c-format
 msgid ""
 "REMAINS:\n"
@@ -169,7 +171,7 @@ msgstr ""
 "da\n"
 "%s"
 
-#: ../src/gdaex.c:2439 ../src/gdaex.c:2510
+#: ../src/gdaex.c:2451 ../src/gdaex.c:2522
 #, c-format
 msgid ""
 "Error parsing sql: %s\n"
@@ -178,7 +180,7 @@ msgstr ""
 "Errore nell'analisi dell'sql: %s\n"
 "%s"
 
-#: ../src/gdaex.c:2457
+#: ../src/gdaex.c:2469
 #, c-format
 msgid ""
 "Error executing command query: %s\n"
@@ -187,39 +189,227 @@ msgstr ""
 "Errore nell'esecuzione della query di comando: %s\n"
 "%s"
 
-#: ../src/gdaex.c:2465
+#: ../src/gdaex.c:2477
 #, c-format
 msgid "Query executed: %s"
 msgstr "Query eseguita: %s"
 
-#: ../src/gdaex.c:2559 ../src/gdaex.c:2612
+#: ../src/gdaex.c:2571 ../src/gdaex.c:2624
 msgid "No transaction opened."
 msgstr "Nessuna transazione aperta."
 
-#: ../src/gdaex.c:2569
+#: ../src/gdaex.c:2581
 #, c-format
 msgid "Error committing transaction: %s"
 msgstr "Errore nel committare la transazione: %s"
 
-#: ../src/gdaex.c:2577
+#: ../src/gdaex.c:2589
 msgid "Transaction committed."
 msgstr "Transazione committata."
 
-#: ../src/gdaex.c:2622
+#: ../src/gdaex.c:2634
 #, c-format
 msgid "Error rollbacking transaction: %s"
 msgstr "Errore nel rollbacking della transazione: %s"
 
-#: ../src/gdaex.c:2630
+#: ../src/gdaex.c:2642
 msgid "Transaction rolled back."
 msgstr "Transazione rolled back."
 
-#: ../src/gdaex.c:2886
+#: ../src/gdaex.c:2922
 #, c-format
 msgid "Error on creating regex: %s"
 msgstr "Errore nella creazione dell'espressione regolare: %s"
 
-#: ../src/gdaex.c:2904
+#: ../src/gdaex.c:2940
 #, c-format
 msgid "Error on regex replacing: %s"
 msgstr "Errore nell'espressione regolare di sostituzione: %s"
+
+#: ../src/queryeditor.c:322
+#, c-format
+msgid "Error on gui initialization: %s."
+msgstr "Errore nell'inizializzazione dell'interfaccia grafica: %s."
+
+#: ../src/queryeditor.c:554 ../src/queryeditor.c:637 ../src/queryeditor.c:645
+#, c-format
+msgid "Table «%s» doesn't exists."
+msgstr "La tabella «%s» non esiste."
+
+#: ../src/queryeditor.c:563 ../src/queryeditor.c:571
+msgid "No field added: the field must have a name."
+msgstr "Nessun campo aggiunto: il campo deve avere un nome."
+
+#: ../src/queryeditor.c:681
+msgid "Relation not created: no field added to the relation."
+msgstr "Relazione non creata: nesuun campo aggiunto alla relazione."
+
+#: ../src/queryeditor.c:1146 ../src/queryeditor.c:1539
+#, c-format
+msgid "Where type «%d» not valid."
+msgstr "Tipo where «%d» non valido."
+
+#: ../src/queryeditor.c:1223
+#, c-format
+msgid "Unable to create GdaStatement: %s."
+msgstr "Impossibile creare l'oggetto GdaStatement: %s."
+
+#: ../src/queryeditor.c:1235
+#, c-format
+msgid "Unable to create sql: %s."
+msgstr "Impossibile creare l'sql: %s."
+
+#: ../src/queryeditor.c:1474
+#, c-format
+msgid "Link type «%d» not valid."
+msgstr "Tipo collegamento «%d» non valido."
+
+#: ../src/queryeditor.c:1634
+#, c-format
+msgid "Table «%s» not found."
+msgstr "Tabella «%s» non trovata."
+
+#: ../src/queryeditor.c:1642
+#, c-format
+msgid "Field «%s» not found in table «%s»."
+msgstr "Campo «%s» non trovato nella tabella «%s»."
+
+#: ../src/queryeditor.c:2081
+msgid "Are you sure you want to remove the selected field?"
+msgstr "Eliminare il campo selezionato?"
+
+#: ../src/queryeditor.c:2102 ../src/queryeditor.c:2198
+#: ../src/queryeditor.c:2841 ../src/queryeditor.c:3012
+#: ../src/queryeditor.c:3557
+msgid "You must select a field before."
+msgstr "Occorre prima selezione un campo."
+
+#: ../src/queryeditor.c:2260
+msgid "Equal"
+msgstr "uguale a"
+
+#: ../src/queryeditor.c:2264
+msgid "Starts with"
+msgstr "inizia per"
+
+#: ../src/queryeditor.c:2268
+msgid "Contains"
+msgstr "contiene"
+
+#: ../src/queryeditor.c:2272
+msgid "Ends with"
+msgstr "finisce con"
+
+#: ../src/queryeditor.c:2276
+msgid "Case-insensitive starts with"
+msgstr "inizia per (no maiuscole/minuscole)"
+
+#: ../src/queryeditor.c:2280
+msgid "Case-insensitive contains"
+msgstr "contiene (no maiuscole/minuscole)"
+
+#: ../src/queryeditor.c:2284
+msgid "Case-insensitive ends with"
+msgstr "finisce con (no maiuscole/minuscole)"
+
+#: ../src/queryeditor.c:2288
+msgid "Greater"
+msgstr "maggiore di"
+
+#: ../src/queryeditor.c:2292
+msgid "Greater or equal"
+msgstr "maggiore di o uguale a"
+
+#: ../src/queryeditor.c:2296
+msgid "Lesser"
+msgstr "minore di"
+
+#: ../src/queryeditor.c:2300
+msgid "Lesser or equal"
+msgstr "minore di o uguale a"
+
+#: ../src/queryeditor.c:2304
+msgid "Between"
+msgstr "compreso tra"
+
+#: ../src/queryeditor.c:2308
+msgid "Is NULL"
+msgstr "è NULL"
+
+#: ../src/queryeditor.c:2325
+msgid "And"
+msgstr "e"
+
+#: ../src/queryeditor.c:2329
+msgid "Or"
+msgstr "o"
+
+#: ../src/queryeditor.c:2643
+msgid "You must select a link's type before."
+msgstr "Occorre selezionare prima un tipo di collegamento."
+
+#: ../src/queryeditor.c:2665
+msgid "You must select a condition's type before."
+msgstr "Occorre selezionare prima un tipo di condizione."
+
+#. if it is the first condition, "link" isn't visibile
+#: ../src/queryeditor.c:3144 ../data/libgdaex/gui/libgdaex.ui.h:6
+msgid "Link"
+msgstr "Collegamento"
+
+#: ../src/queryeditor.c:3148 ../data/libgdaex/gui/libgdaex.ui.h:7
+msgid "Not"
+msgstr "Non"
+
+#: ../src/queryeditor.c:3151 ../data/libgdaex/gui/libgdaex.ui.h:2
+msgid "Condition"
+msgstr "Condizione"
+
+#: ../src/queryeditor.c:3154
+msgid "Value"
+msgstr "Valore"
+
+#: ../src/queryeditor.c:3399
+#, c-format
+msgid "Field's type «%d» not valid."
+msgstr "Il tipo campo «%d» non è valido."
+
+#: ../src/queryeditor.c:3649
+msgid "Ascending"
+msgstr "ascendente"
+
+#: ../src/queryeditor.c:3652
+msgid "Descending"
+msgstr "discendente"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:1
+msgid "Alias"
+msgstr "Alias"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:3
+msgid "Field"
+msgstr "Campo"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:4
+msgid "Fields"
+msgstr "Campi"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:5
+msgid "From"
+msgstr "da"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:8
+msgid "Order"
+msgstr "Ordinamento"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:9
+msgid "Show"
+msgstr "Mostra"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:10
+msgid "To"
+msgstr "a"
+
+#: ../data/libgdaex/gui/libgdaex.ui.h:11
+msgid "Where"
+msgstr "Condizioni"
index 40a584406d46e323a9a9d22f64456ab7f798446c..867cf3de70c5dc684aa0c048d47f2062e90c5781 100644 (file)
@@ -177,14 +177,14 @@ static GdaEx
 
 #endif
 
-       priv->guifile = g_build_filename (priv->guidir, "libgdaex.ui", NULL);
-       priv->gtkbuilder = gtk_builder_new ();
-
-
        bindtextdomain (GETTEXT_PACKAGE, localedir);
        textdomain (GETTEXT_PACKAGE);
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 
+       priv->guifile = g_build_filename (priv->guidir, "libgdaex.ui", NULL);
+       priv->gtkbuilder = gtk_builder_new ();
+       gtk_builder_set_translation_domain (priv->gtkbuilder, GETTEXT_PACKAGE);
+
        g_free (localedir);
 
        return gdaex;
index 7411d0384f35bf37364dda345afb44df82295147..75f5a962b5426c83fa8af891c809bb9c38b72608 100644 (file)
@@ -22,6 +22,9 @@
 
 #include <stdarg.h>
 #include <string.h>
+
+#include <glib/gi18n-lib.h>
+
 #include <gtkdateentry.h>
 
 #include "queryeditor.h"
@@ -315,8 +318,8 @@ GdaExQueryEditor
                                           &error);
        if (error != NULL)
                {
-                       g_warning ("Error on gui initialization: %s.",
-                                  error->message != NULL ? error->message : "no details");
+                       g_warning (_("Error on gui initialization: %s."),
+                                  error->message != NULL ? error->message : _("no details"));
                        return NULL;
                }
 
@@ -547,7 +550,7 @@ gdaex_query_editor_table_add_field (GdaExQueryEditor *qe,
        table = g_hash_table_lookup (priv->tables, table_name);
        if (table == NULL)
                {
-                       g_warning ("Table «%s» doesn't exists.", table_name);
+                       g_warning (_("Table «%s» doesn't exists."), table_name);
                        return FALSE;
                }
 
@@ -556,7 +559,7 @@ gdaex_query_editor_table_add_field (GdaExQueryEditor *qe,
 
        if (_field->name == NULL)
                {
-                       g_warning ("No field added: the field must have a name.");
+                       g_warning (_("No field added: the field must have a name."));
                        g_free (_field);
                        return FALSE;
                }
@@ -564,7 +567,7 @@ gdaex_query_editor_table_add_field (GdaExQueryEditor *qe,
                {
                        if (g_strcmp0 (g_strstrip (_field->name), "") == 0)
                                {
-                                       g_warning ("No field added: the field must have a name.");
+                                       g_warning (_("No field added: the field must have a name."));
                                        g_free (_field);
                                        return FALSE;
                                }
@@ -630,7 +633,7 @@ gdaex_query_editor_add_relation (GdaExQueryEditor *qe,
        table = g_hash_table_lookup (priv->tables, table1);
        if (table == NULL)
                {
-                       g_warning ("Table «%s» doesn't exists.", table1);
+                       g_warning (_("Table «%s» doesn't exists."), table1);
                        return FALSE;
                }
        relation->table1 = table;
@@ -638,7 +641,7 @@ gdaex_query_editor_add_relation (GdaExQueryEditor *qe,
        table = g_hash_table_lookup (priv->tables, table2);
        if (table == NULL)
                {
-                       g_warning ("Table «%s» doesn't exists.", table2);
+                       g_warning (_("Table «%s» doesn't exists."), table2);
                        return FALSE;
                }
        relation->table2 = table;
@@ -674,7 +677,7 @@ gdaex_query_editor_add_relation (GdaExQueryEditor *qe,
                }
        else
                {
-                       g_warning ("Relation not created: no field added to the relation.");
+                       g_warning (_("Relation not created: no field added to the relation."));
                        g_free (relation);
                        return FALSE;
                }
@@ -1139,7 +1142,7 @@ GdaSqlBuilder
                                                                break;
 
                                                        default:
-                                                               g_warning ("Where type «%d» not valid.", where_type);
+                                                               g_warning (_("Where type «%d» not valid."), where_type);
                                                                continue;
                                                }
 
@@ -1216,8 +1219,8 @@ const gchar
        if (stmt == NULL || error != NULL)
                {
                        g_object_unref (sqlbuilder);
-                       g_warning ("Unable to create GdaStatement: %s.",
-                                  error != NULL && error->message != NULL ? error->message : "no details");
+                       g_warning (_("Unable to create GdaStatement: %s."),
+                                  error != NULL && error->message != NULL ? error->message : _("no details"));
                        return NULL;
                }
 
@@ -1228,8 +1231,8 @@ const gchar
        if (error != NULL)
                {
                        ret = NULL;
-                       g_warning ("Unable to create sql: %s.",
-                                  error->message != NULL ? error->message : "no details");
+                       g_warning (_("Unable to create sql: %s."),
+                                  error->message != NULL ? error->message : _("no details"));
                }
 
        g_object_unref (sqlbuilder);
@@ -1467,7 +1470,7 @@ xmlNode
                                                                indices = gtk_tree_path_get_indices (path);
                                                                if (indices[0] != 0)
                                                                        {
-                                                                               g_warning ("Link type «%d» not valid.", link_type);
+                                                                               g_warning (_("Link type «%d» not valid."), link_type);
                                                                                continue;
                                                                        }
                                                                else
@@ -1532,7 +1535,7 @@ xmlNode
                                                                break;
 
                                                        default:
-                                                               g_warning ("Where type «%d» not valid.", where_type);
+                                                               g_warning (_("Where type «%d» not valid."), where_type);
                                                                continue;
                                                }
 
@@ -1627,7 +1630,7 @@ gdaex_query_editor_load_choices_from_xml (GdaExQueryEditor *qe, xmlNode *root,
                                                                table = g_hash_table_lookup (priv->tables, table_name);
                                                                if (table == NULL)
                                                                        {
-                                                                               g_warning ("Table «%s» not found.", table_name);
+                                                                               g_warning (_("Table «%s» not found."), table_name);
                                                                                continue;
                                                                        }
 
@@ -1635,7 +1638,7 @@ gdaex_query_editor_load_choices_from_xml (GdaExQueryEditor *qe, xmlNode *root,
                                                                field = g_hash_table_lookup (table->fields, field_name);
                                                                if (field == NULL)
                                                                        {
-                                                                               g_warning ("Field «%s» not found in table «%s».", field_name, table_name);
+                                                                               g_warning (_("Field «%s» not found in table «%s»."), field_name, table_name);
                                                                                continue;
                                                                        }
 
@@ -2074,7 +2077,7 @@ gdaex_query_editor_store_remove_iter (GdaExQueryEditor *qe,
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_MESSAGE_QUESTION,
                                                         GTK_BUTTONS_YES_NO,
-                                                        "Are you sure you want to remove the selected field?");
+                                                        _("Are you sure you want to remove the selected field?"));
                        risp = gtk_dialog_run (GTK_DIALOG (dialog));
                        if (risp == GTK_RESPONSE_YES)
                                {
@@ -2095,7 +2098,7 @@ gdaex_query_editor_store_remove_iter (GdaExQueryEditor *qe,
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_MESSAGE_WARNING,
                                                         GTK_BUTTONS_OK,
-                                                        "You must select a field before.");
+                                                        _("You must select a field before."));
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
                }
@@ -2191,7 +2194,7 @@ gdaex_query_editor_store_move_iter_up_down (GdaExQueryEditor *qe,
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_MESSAGE_WARNING,
                                                         GTK_BUTTONS_OK,
-                                                        "You must select a field before.");
+                                                        _("You must select a field before."));
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
                }
@@ -2253,55 +2256,55 @@ gdaex_query_editor_get_where_type_str_from_type (guint where_type)
        switch (where_type)
                {
                        case GDAEX_QE_WHERE_TYPE_EQUAL:
-                               ret = g_strdup ("Equal");
+                               ret = g_strdup (_("Equal"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_STARTS:
-                               ret = g_strdup ("Starts with");
+                               ret = g_strdup (_("Starts with"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_CONTAINS:
-                               ret = g_strdup ("Contains");
+                               ret = g_strdup (_("Contains"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_ENDS:
-                               ret = g_strdup ("Ends with");
+                               ret = g_strdup (_("Ends with"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_ISTARTS:
-                               ret = g_strdup ("Case-insensitive starts with");
+                               ret = g_strdup (_("Case-insensitive starts with"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_ICONTAINS:
-                               ret = g_strdup ("Case-insensitive contains");
+                               ret = g_strdup (_("Case-insensitive contains"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_IENDS:
-                               ret = g_strdup ("Case-insensitive ends with");
+                               ret = g_strdup (_("Case-insensitive ends with"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_GREAT:
-                               ret = g_strdup ("Greater");
+                               ret = g_strdup (_("Greater"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_GREAT_EQUAL:
-                               ret = g_strdup ("Greater or equal");
+                               ret = g_strdup (_("Greater or equal"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_LESS:
-                               ret = g_strdup ("Lesser");
+                               ret = g_strdup (_("Lesser"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_LESS_EQUAL:
-                               ret = g_strdup ("Lesser or equal");
+                               ret = g_strdup (_("Lesser or equal"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_BETWEEN:
-                               ret = g_strdup ("Between");
+                               ret = g_strdup (_("Between"));
                                break;
 
                        case GDAEX_QE_WHERE_TYPE_IS_NULL:
-                               ret = g_strdup ("Is NULL");
+                               ret = g_strdup (_("Is NULL"));
                                break;
                };
 
@@ -2318,11 +2321,11 @@ gdaex_query_editor_get_link_type_str_from_type (guint link_type)
        switch (link_type)
                {
                        case GDAEX_QE_LINK_TYPE_AND:
-                               ret = g_strdup ("And");
+                               ret = g_strdup (_("And"));
                                break;
 
                        case GDAEX_QE_LINK_TYPE_OR:
-                               ret = g_strdup ("Or");
+                               ret = g_strdup (_("Or"));
                                break;
                };
 
@@ -2636,7 +2639,7 @@ gdaex_query_editor_on_btn_save_clicked (GtkButton *button,
                                                                                                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                                                                                                 GTK_MESSAGE_WARNING,
                                                                                                                 GTK_BUTTONS_OK,
-                                                                                                                "You must select a link's type before.");
+                                                                                                                _("You must select a link's type before."));
                                                                                gtk_dialog_run (GTK_DIALOG (dialog));
                                                                                gtk_widget_destroy (dialog);
                                                                                return;
@@ -2658,7 +2661,7 @@ gdaex_query_editor_on_btn_save_clicked (GtkButton *button,
                                                                                                 GTK_DIALOG_DESTROY_WITH_PARENT,
                                                                                                 GTK_MESSAGE_WARNING,
                                                                                                 GTK_BUTTONS_OK,
-                                                                                                "You must select a condition's type before.");
+                                                                                                _("You must select a condition's type before."));
                                                                gtk_dialog_run (GTK_DIALOG (dialog));
                                                                gtk_widget_destroy (dialog);
                                                                return;
@@ -2834,7 +2837,7 @@ gdaex_query_editor_on_btn_show_add_clicked (GtkButton *button,
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_MESSAGE_WARNING,
                                                         GTK_BUTTONS_OK,
-                                                        "You must select a field before.");
+                                                        _("You must select a field before."));
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
                }
@@ -3005,7 +3008,7 @@ gdaex_query_editor_on_btn_where_add_clicked (GtkButton *button,
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_MESSAGE_WARNING,
                                                         GTK_BUTTONS_OK,
-                                                        "You must select a field before.");
+                                                        _("You must select a field before."));
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
                }
@@ -3137,17 +3140,17 @@ gdaex_query_editor_on_sel_where_changed (GtkTreeSelection *treeselection,
                                        gtk_box_pack_start (GTK_BOX (priv->hbox_where), priv->tbl, TRUE, TRUE, 0);
 
                                        /* if it is the first condition, "link" isn't visibile */
-                                       priv->lbl_link_type = gtk_label_new ("Link");
+                                       priv->lbl_link_type = gtk_label_new (_("Link"));
                                        gtk_widget_set_no_show_all (priv->lbl_link_type, TRUE);
                                        gtk_table_attach (GTK_TABLE (priv->tbl), priv->lbl_link_type, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
 
-                                       lbl = gtk_label_new ("Not");
+                                       lbl = gtk_label_new (_("Not"));
                                        gtk_table_attach (GTK_TABLE (priv->tbl), lbl, 2, 3, 0, 1, GTK_FILL, 0, 0, 0);
 
-                                       lbl = gtk_label_new ("Condition");
+                                       lbl = gtk_label_new (_("Condition"));
                                        gtk_table_attach (GTK_TABLE (priv->tbl), lbl, 3, 4, 0, 1, GTK_FILL, 0, 0, 0);
 
-                                       priv->lbl_txt1 = gtk_label_new ("Value");
+                                       priv->lbl_txt1 = gtk_label_new (_("Value"));
                                        gtk_table_attach (GTK_TABLE (priv->tbl), priv->lbl_txt1, 4, 5, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
 
                                        /* link */
@@ -3392,7 +3395,7 @@ gdaex_query_editor_on_sel_where_changed (GtkTreeSelection *treeselection,
                                                break;
 
                                        default:
-                                               g_warning ("Field's type «%d» not valid.", field->type);
+                                               g_warning (_("Field's type «%d» not valid."), field->type);
                                                break;
                                };
 
@@ -3550,7 +3553,7 @@ gdaex_query_editor_on_btn_order_add_clicked (GtkButton *button,
                                                         GTK_DIALOG_DESTROY_WITH_PARENT,
                                                         GTK_MESSAGE_WARNING,
                                                         GTK_BUTTONS_OK,
-                                                        "You must select a field before.");
+                                                        _("You must select a field before."));
                        gtk_dialog_run (GTK_DIALOG (dialog));
                        gtk_widget_destroy (dialog);
                }
@@ -3642,10 +3645,10 @@ gdaex_query_editor_on_sel_order_changed (GtkTreeSelection *treeselection,
                                        lbl = gtk_label_new (field_name);
                                        gtk_box_pack_start (GTK_BOX (priv->hbox_order), lbl, FALSE, FALSE, 0);
 
-                                       priv->opt_asc = gtk_radio_button_new_with_label (NULL, "Ascending");
+                                       priv->opt_asc = gtk_radio_button_new_with_label (NULL, _("Ascending"));
                                        gtk_box_pack_start (GTK_BOX (priv->hbox_order), priv->opt_asc, FALSE, FALSE, 0);
 
-                                       priv->opt_desc = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (priv->opt_asc), "Descending");
+                                       priv->opt_desc = gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON (priv->opt_asc), _("Descending"));
                                        gtk_box_pack_start (GTK_BOX (priv->hbox_order), priv->opt_desc, FALSE, FALSE, 0);
 
                                        if (g_strcmp0 (order, "ASC") == 0)