~ubuntu-branches/ubuntu/quantal/glom/quantal

« back to all changes in this revision

Viewing changes to docs/user-guide/es/glom.xml

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane
  • Date: 2009-01-11 17:12:01 UTC
  • mfrom: (1.1.39 upstream)
  • Revision ID: james.westby@ubuntu.com-20090111171201-0ov9zh1fxfueshxc
Tags: 1.8.5-0ubuntu1
* New upstream release (LP: #256701), fixes LP bugs: 
  + Clear the text in property dialogs for text items (LP: #309147)
  + Don't crash when showing and then hiding the grid (LP: #303453)
  + Temporarily remember the sort order so it is the same when navigating 
    away and back (LP: #303422)
  + Use the list's sort order for the top-level records in the report 
    (LP: #303425)
  + Users/Groups: Disable drag-and-drop for the treeview, because it is
    useless and confusing (LP: #299573)
  + Import: Sort the fields list alphabetically (LP: #306593)
  + delete primary key make unusuable the database (LP: #299549)
  + Spanish translate incomplete (LP: #299556)
  + import date format error (LP: #299591)
  + can't delete data from table list view (LP: #299853)
  + Field definition: default value not saved (LP: #299896)
  + reports crashing (LP: #300054)
  + Year error with date fields (LP: #300057)
  + list view: 2 records added instead of 1 (LP: #300819)
* debian/control: Refreshed dependencies for libglom-dev.
* debian/control: Updated build-deps to match configure checks. goocavnasmm
  build-dep bumped to version without .la files.
* debian/rules: Don't delete the directory containing the templates.
* debian/control, debian/rules, debian/glom-doc.*: Split out
  arch-independent manual and examples into separate package glom-doc, which
  is now recommended by glom (glom will still work if they're not available)
* debian/copyright: Rewritten to new machine-readable format. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
<!-- please do not change the id; for translations, change lang to -->
24
24
<!-- appropriate code -->
25
25
  <articleinfo> 
26
 
    <title>Glom User Guide V0.2</title>       
27
 
    <subtitle>for Glom v1.6</subtitle>
 
26
    <title>Manual del usuario de Glom V0.2</title>       
 
27
    <subtitle>para Glom v1.6</subtitle>
28
28
 
29
29
    <copyright> 
30
30
      <year>2004</year> 
31
31
      <holder>Murray Cumming</holder> 
32
 
    </copyright><copyright><year>2007</year><holder>Jorge González (jorgegonz@svn.gnome.org)</holder></copyright> 
 
32
    </copyright><copyright><year>2008</year><holder>Daniel Mustieles (daniel.mustieles@ie.edu)</holder></copyright><copyright><year>2007</year><holder>Jorge González (jorgegonz@svn.gnome.org)</holder></copyright><copyright><year>2008</year><holder>QA: Jorge González (jorgegonz@svn.gnome.org)</holder></copyright> 
33
33
<!-- translators: uncomment this:
34
34
 
35
35
  <copyright>
67
67
 
68
68
    <authorgroup> 
69
69
      <author role="maintainer"> 
70
 
                <firstname>Murrayc</firstname> 
 
70
                <firstname>Murray</firstname> 
71
71
                <surname>Cumming</surname> 
72
72
                <affiliation> 
73
73
                        <orgname>Equipo de desarrollo de Glom</orgname> 
115
115
                </revision>
116
116
    </revhistory> 
117
117
 
118
 
    <releaseinfo>This manual describes version 1.6 of Glom
119
 
    </releaseinfo> 
 
118
    <releaseinfo>Este manual describe el uso de la versión 1.6 de Glom</releaseinfo> 
120
119
    <legalnotice> 
121
120
      <title>Comentarios</title> 
122
121
      <para>Para informar sobre un error o hacer sugerencias sobre Glom o sobre éste manual, puede enviarlas en la página <ulink url="http://bugzilla.gnome.org" type="http">Gnome Bugzilla</ulink>, seleccionando el producto Glom. Para asegurarse de que otros no han informado antes del mismo fallo, busque en Bugzilla antes de enviar su error.</para>
197
196
 
198
197
    <sect1 id="glom-operator-usage">
199
198
    <title>Uso de Glom como un operador</title>
200
 
    <para>To open an existing Glom document, either open that document from the File Manager, or choose Glom from the Applications menu, and then choose the document when asked. Glom will ask you for a user name and password to access the database. Your administrator will provide your user name and password.</para>
 
199
    <para>Para abrir un documento existente de Glom puede hacerlo con el administrador de archivos o bien puede seleccionar Glom en el  menú de Aplicaciones, y después escoger el documento cuando se le pregunte. Glom le pedirá un nombre de usuario y una contraseña para acceder a la base de datos. El administrador le proporcionará su nombre de usuario y su contraseña.</para>
201
200
 
202
201
    <para>Cuando abra un documento existente, Glom estará ejecutándose a <literal>nivel de usuario</literal><literal>Operador</literal>. Éste nivel le permite buscar y editar registros pero no le permite cambiar la estructura fundamental de la base de datos.</para>
203
202
 
204
203
    <sect2 id="navigation">
205
204
    <title>Navegación</title>
206
 
    <para>Each database has several tables. To look at a different table, choose <literal>Tables</literal> from the <literal>Navigate</literal> menu. Then double-click on the table, or select it and click the <literal>Open</literal> button.</para>
 
205
    <para>Cada base de datos tiene varias tablas. Para ver una tabla diferente, escoja <literal>Tablas</literal> del menú de <literal>Navegación</literal>. Después pulse dos veces sobre la tabla o bien selecciónela y pulse el botón <literal>Abrir</literal>.</para>
207
206
 
208
207
    <figure id="operator-navigation-tables"> 
209
 
        <title>Navigating to a Table</title> 
 
208
        <title>Navegar a una tabla</title> 
210
209
        <screenshot> 
211
210
          <mediaobject> 
212
211
            <imageobject><imagedata fileref="figures/glom_tables.png" format="PNG"/> 
213
212
            </imageobject>
214
213
            <textobject> 
215
 
              <phrase>Navigating to a Table.</phrase> 
 
214
              <phrase>Navegar a una tabla.</phrase> 
216
215
            </textobject> 
217
216
          </mediaobject> 
218
217
        </screenshot> 
221
220
    </sect2>
222
221
 
223
222
    <sect2 id="viewing-and-entering-data">
224
 
    <title>Viewing and Entering Data</title>
225
 
    <para>When in <literal>Data Mode</literal>, you can view or enter information in either the <literal>List</literal> or <literal>Details</literal> view.</para>
 
223
    <title>Ver e introducir datos</title>
 
224
    <para>Cuando trabaje en el <literal>Modo de datos</literal>, puede introducir información en la <literal>Lista</literal> o en la vista de <literal>Detalles</literal>.</para>
226
225
 
227
226
      <sect3 id="the-list-view">
228
 
      <title>The List View</title>
229
 
      <para>The List view shows many records at once and usually shows only the most important fields.</para>
 
227
      <title>La vista de lista</title>
 
228
      <para>La vista de lista muestra cuántos registros a la vez y habitualmente muestra sólo los campos más importantes.</para>
230
229
      <para>Cuando introduzca datos en un campo se guardarán en la base de datos inmediatamente después de que termine de editarlo. Si es un campo de fecha u hora el formato se comprobará automáticamente.</para> 
231
 
      <para>To create a new record just click the <literal>New</literal> button, or start typing into a field in the last empty row. A new record row will be created with blank fields for you to fill in.</para>
 
230
      <para>Para crear un nuevo registro simplemente pulse el botón <literal>Nuevo</literal>, o empiece a escribir en un campo en la última fila vacía. Se creará un nuevo registro con los campos en blanco para que los rellene.</para>
232
231
 
233
232
      <figure id="operator-data-list"> 
234
 
        <title>The List View</title> 
 
233
        <title>La vista de lista</title> 
235
234
        <screenshot> 
236
235
          <mediaobject> 
237
236
            <imageobject><imagedata fileref="figures/glom_data_list.png" format="PNG"/> 
238
237
            </imageobject>
239
238
            <textobject> 
240
 
              <phrase>The List View.</phrase> 
 
239
              <phrase>La vista de lista.</phrase> 
241
240
            </textobject> 
242
241
          </mediaobject> 
243
242
        </screenshot> 
244
243
      </figure>
245
244
 
246
 
      <para>To sort the records just click on a column header. For instance, you could might click on a date column to list invoices in order of their date, and click again to list them in reverse order.</para>
 
245
      <para>Para ordenar los registros, simplemente pulse en la cabecera de una columna. Por ejemplo, puede querer pulsar sobre una columna de fecha para listar facturas por su fecha, y pulsar de nuevo para listarlas en orden inverso.</para>
247
246
      </sect3>
248
247
 
249
248
      <sect3 id="the-details-view">
250
 
      <title>The Details View</title>
251
 
      <para>The details view shows only one record and usually shows all the fields arranged suitably.</para>
 
249
      <title>La vista de detalles</title>
 
250
      <para>La vista de detalles muestra un único registro, y habitualmente muestra todos los campos ordenados adecuadamente.</para>
252
251
      <para>Cuando introduzca datos en un campo se guardarán en la base de datos inmediatamente después de que termine de editarlo. Si es un campo de fecha u hora el formato se comprobará automáticamente.</para>
253
252
      <para>Para crear un nuevo registro pulse el botón <literal>Nuevo</literal>. Se creará un nuevo registro con los campos vacíos para que los pueda rellenar.</para>
254
253
 
255
254
  <figure id="operator-data-details"> 
256
 
        <title>The Details View</title> 
 
255
        <title>La vista de detalles</title> 
257
256
        <screenshot> 
258
257
          <mediaobject> 
259
258
            <imageobject><imagedata fileref="figures/glom_data_details.png" format="PNG"/> 
260
259
            </imageobject>
261
260
            <textobject> 
262
 
              <phrase>The Details View.</phrase> 
 
261
              <phrase>La vista de detalles.</phrase> 
263
262
            </textobject> 
264
263
          </mediaobject> 
265
264
        </screenshot> 
273
272
    <title>Buscar datos</title>
274
273
    <para>Elija <literal>Modo de búsqueda</literal> del menú. Los campos en la lista y vista detallada estarán vacíos y un botón de búsqueda aparecerá en la parte inferior de la ventana.</para>
275
274
    <para>Introduzca la información, o parte de la información, en el campo para buscar registros que contengan esa información en ese campo. Por ejemplo, introduzca Javi en un campo de nombre para buscar registros con «Javi» o «Javier» en el campo «Nombre».</para> 
276
 
    <para>When you press the <literal>Find</literal> button, Glom will search for records and then display them. If only one record is found then it will show you that record in the Details view. If several records are found then it will show you those records in the List view.</para>
 
275
    <para>Al pulsar el botón <literal>Buscar</literal>, Glom buscará los registros y después los mostrará.Si sólo se encuentra un registro entonces se mostrará con la vista de «Detalles». Si se encuentran varios registros, entonces se mostrarán con la vista de «Lista».</para>
277
276
    <!-- TODO: screenshot -->
278
277
    </sect2>
279
278
 
280
279
    <sect2 id="glom-operator-printing-reports">
281
 
    <title>Printing Reports</title>
282
 
    <para>If your database developer has defined some reports for a table then you will seem them listed in the <literal>Reports</literal> menu. Just choose the report from the menu to create the report. If you have previously performed a search then the report will contain only the currently-found data. Otherwise it will contain all data in the current report. Remember that each table has its own reports so you may need to switch to the relevant table to use a particular report.</para>
 
280
    <title>Imprimir informes</title>
 
281
    <para>Si el desarrollador de su base de datos ha definido algunos informes para una tabla entonces los verá listados en el menú <literal>Informes</literal>. Simplemente seleccione el informe del menú para crearlo. Si ha realizado previamente una búsqueda, el informe contendrá únicamente los datos encontrados. De otro modo, contendrá todos los datos del informe actual. Recuerde que cada tabla tiene sus propios informes, por lo que puede tener que cambiar a la tabla oportuna para utilizar un informe concreto.</para>
283
282
 
284
283
     <figure id="operator-report-result"> 
285
 
        <title>A report</title> 
 
284
        <title>Un informe</title> 
286
285
        <screenshot> 
287
286
          <mediaobject> 
288
287
            <imageobject><imagedata fileref="figures/glom_report_result.png" format="PNG"/> 
289
288
            </imageobject>
290
289
            <textobject> 
291
 
              <phrase>A report.</phrase> 
 
290
              <phrase>Un informe.</phrase> 
292
291
            </textobject> 
293
292
          </mediaobject> 
294
293
        </screenshot> 
305
304
 
306
305
    <sect2 id="adding-tables">
307
306
    <title>Añadir tablas</title>
308
 
    <para>You can see the list of existing tables by choosing <literal>Tables</literal> from the <literal>Navigate</literal> menu. You will also see this window after connecting to a database server, after creating a new document. To create a new table, click the <literal>Add</literal> button and enter the name for the new table. Glom will suggest a human-readable title for this table. <literal>Operators</literal> will see this title instead of the actual table name. You can also mark a tables as <literal>hidden</literal> from Operators. For instance, Operators should see "Invoice Lines" as related records from the "Invoices" table, but they should never be able to navigate directly to the "Invoice Lines" table.</para>
 
307
    <para>Puede ver la lista de las tablas existentes escogiendo <literal>Tablas</literal> del menú de <literal>Navegación</literal>. También verá esta ventana después de conectarse a un servidor de bases de datos, después de crear un documento nuevo. Para crear una tabla nueva, pulse en el botón <literal>Añadir</literal> e introduzca un nombre para la tabla nueva. Éste nombre no debería contener espacios ni caracteres especiales. Glom le sugerirá un título legible por humanos para esta tabla. Los <literal>Operadores</literal> verán éste título en lugar del nombre actual de la tabla. También puede marcar una tabla como <literal>oculta</literal> para los Operadores. Por ejemplo, los Operadores deberían ver «Lista de facturas» como un registro relacionado de la tabla «Facturas», pero nunca deberán poder navegar directamente por la tabla «Lista de facturas».</para>
309
308
    <!-- TODO: screenshot -->
310
309
    <para>Puede especificar una tabla como la <literal>tabla predeterminada</literal>. Esta tabla e mostrará siempre que un operador abra un documento existente, sin preguntarle que seleccione una tabla de la lista.</para>
311
310
    <para>También puede usar esta ventana para renombrar una tabla existente.</para>
315
314
    <sect2 id="editing-fields">
316
315
    <title>Editar campos</title>
317
316
    <para>Elija <literal>Campos</literal> del menú de <literal>Desarrollador</literal>. Esto mostrará la lista de campos en la tabla. Las tablas nuevas tienen un campo de clave primaria automáticamente, pero puede cambiar el campo si es necesario.</para>
318
 
    <para>Click the <literal>Add</literal> button to add a new field, then enter the name of the new field. Glom will guess an appropriate human-readable title for this field, but you can edit this. <literal>Operators</literal> will see this title instead of the actual field name.</para> 
 
317
    <para>Para añadir un campo nuevo pulse el botón <literal>Añadir</literal> e introduzca el nombre del campo nuevo. Glom supondrá un título apropiado y legible por humanos para este campo, pero puede editarlo. Los <literal>Operadores</literal> verán este nombre en lugar del nombre actual del campo.</para> 
319
318
    <para>Para especificar más detalles de un campo, seleccione el campo y pulse en el botón de <literal>Detalles</literal>.</para>
320
319
 
321
320
    <figure id="developer-editing-fields"> 
362
361
    <para>Cada tabla tiene una vista de <literal>Lista</literal> y de <literal>Detalles</literal>, por omisión ambas muestran todos los campos de la tabla por fecha de creación. Puede editar la distribución escogiendo <literal>Distribución</literal> del menú de <literal>Desarrollador</literal>.</para>
363
362
 
364
363
    <sect3 id="arranging-the-list-view">
365
 
    <title>Arranging the List View</title>
 
364
    <title>Ordenar la vista de lista</title>
366
365
    <para>Para la vista de <literal>Lista</literal>, puede especificar la secuencia de los campos columna, y también si hay algún campo oculto.</para>
367
366
 
368
367
    <figure id="developer-layout-list"> 
369
 
        <title>Editing the List Layout</title> 
 
368
        <title>Editar la disposición de la lista</title> 
370
369
        <screenshot> 
371
370
          <mediaobject> 
372
371
            <imageobject><imagedata fileref="figures/glom_design_layout_list.png" format="PNG"/> 
373
372
            </imageobject>
374
373
            <textobject> 
375
 
              <phrase>Editing the list layout.</phrase> 
 
374
              <phrase>Editar la disposición de la lista.</phrase> 
376
375
            </textobject>
377
376
          </mediaobject> 
378
377
        </screenshot> 
380
379
    </sect3>
381
380
 
382
381
    <sect3 id="arranging-the-details-view">
383
 
    <title>Arranging the Details View</title>
 
382
    <title>Ordenar la vista detalles</title>
384
383
    <para>Para la vista de <literal>Detalles</literal>, puede crear grupos o campos y darlos títulos. Después puede colocar campos en esos grupos y especificar la secuencia de los campos en los grupos. También puede especificar la secuencia de los grupos. Por ejemplo, en una tabla de «Contactos» puede crear un grupo llamado «Nombre», y colocar los campos «Título», «Nombre» y «Apellido» en ese grupo. Puede tener otros grupos para los campos «Direcciones».</para>
385
384
 
386
385
    <figure id="developer-layout-details"> 
387
 
        <title>Editing the details Layout</title> 
 
386
        <title>Editar la disposición de los detalles</title> 
388
387
        <screenshot> 
389
388
          <mediaobject> 
390
389
            <imageobject><imagedata fileref="figures/glom_design_layout_details.png" format="PNG"/> 
391
390
            </imageobject>
392
391
            <textobject> 
393
 
              <phrase>Editing the Details Layout.</phrase> 
 
392
              <phrase>Editar la disposición de los detalles.</phrase> 
394
393
            </textobject>
395
394
          </mediaobject> 
396
395
        </screenshot> 
402
401
    <sect2 id="sec-developer-relationships">
403
402
    <title>Crear relaciones</title>
404
403
    <para>Muchas veces las tablas de una base de datos están relacionadas entre sí. Por ejemplo, una tabla de «Facturas» podrá tener un campo «ID del cliente». El valor de ese campo especifica un registro en la tabla «Clientes» el cual tiene el mismo valor. Glom puede mostrar información adicional, como el nombre del cliente, de ese registro relacionado. O puede mostrar una lista de varios registros relacionados - por ejemplo, algún registro de la «Lista de facturas» que está relacionado con otro registro de «Facturas».</para>
405
 
    <para>Para crear relaciones, escoja <literal>Relaciones</literal> del menú de <literal>Desarrollador. Esto le mostrarA e introduzca un nombre para ella. Debe elegir un campo de la tabla actual y un campo de otra tabla con el que se crear</literal></para>
 
404
    <para>Para crear relaciones, escoja <literal>Relaciones</literal> del menú de <literal>Desarrollador</literal>. Esto le mostrará la lista de relaciones existentes. Para crear una nueva relación pulse el botón de <literal>Añadir</literal> e introduzca un nombre para ella. Debe elegir un campo de la tabla actual y un campo de otra tabla con el que se creará la relación. Esta relación buscará cualquier registro en la otra tabla para los que los valores de ambos campos sean iguales.</para>
406
405
    <!-- TODO: screenshot -->
407
406
   <para>Puede usar las relaciones en los siguientes lugares. <orderedlist>
408
407
<listitem><simpara>Para mostrar un campo relacionado en la lista o en la vista detallada.</simpara></listitem>
414
413
 
415
414
   <sect2 id="users-administration">
416
415
   <title>Administración de usuarios</title>
417
 
   <para>To define the <literal>Operators</literal> who can use your database, and to specify what access they have to the various tables, choose <literal>Users</literal> from the <literal>Developer</literal> menu.</para>
 
416
   <para>Para definir los <literal>Operadores</literal> que pueden utilizar su base de datos y para especificar que acceso tienen a las distintas tablas, seleccione <literal>Usuarios</literal> del menú <literal>Desarrollador</literal>.</para>
418
417
    <!-- TODO: screenshot -->
419
418
   </sect2>
420
419
 
421
420
   <sect2 id="translations">
422
 
   <title>Translations</title>
423
 
   <para>Glom's user interface (and this document) is translated into several languages, as you should see already if you are using your computer with a non-English user interface. In addition, Glom automatically shows and understands numbers and dates according to the current user's local conventions. For instance, a user in the USA might enter a price as 1.99 and a date as 1/13/2008, but a German user of the same database will later see that as 1,99 and 13.1.2008.</para>
424
 
   <para>However, the Glom system that you create also contains text that must be translated if it will be used by people who speak different languages. For instance, you must provide translations for the titles of your tables, fields, and reports. All of these text items can be seen in a list when you choose <literal>Translations</literal> from the <literal>Developer</literal> menu. In this window you can specify the language that you used for the original text, and enter translations for each text item for additional languages. When the Glom system is opened by a user of that language then these 
425
 
text items will be shown in the user interface.</para>
 
421
   <title>Traducciones</title>
 
422
   <para>La interfaz de usuario de Glom (y este documento) está traducido a varios idiomas, como ya debería poder ver si utiliza un equipo con un interfaz de usuario que no esté en inglés. Además, Glom entiende y muestra automáticamente números y fechas de acuerdo a las convenciones actuales de localización del usuario. Por ejemplo, un usuario en EE. UU. debe introducir un precio como 1.99 y una fecha como 1/13/2008, pero un usuario alemán de la misma base de datos lo verá más adelante como 1,99 y 13.1.2008.</para>
 
423
   <para>Sin embargo, el sistema Glom que crea contiene también texto que debe traducirse si personas que hablan diferentes idiomas lo van a usar.Por ejemplo, puede proporcionar traducciones para los títulos de sus tablas, campos e informes. Todos estos elementos de texto se pueden ver en una lista cuando selecciona <literal>Traducciones</literal> en el menú <literal>Desarrollador</literal>. En esta ventana puede especificar el idioma que ha utilizado para el texto original, e introducir las traducciones adicionales en cada idioma para cada elemento de texto. Cuando un usuario de ese idioma abre el sistema Glom, se mostrarán esos elementos de texto en la interfaz de usuario.</para>
426
424
 
427
425
   <!-- TODO: Update this screenshot -->
428
426
   <figure id="developer-translations"> 
429
 
        <title>Translations</title> 
 
427
        <title>Traducciones</title> 
430
428
        <screenshot> 
431
429
          <mediaobject> 
432
430
            <imageobject><imagedata fileref="figures/glom_design_translations.png" format="PNG"/> 
433
431
            </imageobject>
434
432
            <textobject> 
435
 
              <phrase>Translations.</phrase> 
 
433
              <phrase>Traducciones.</phrase> 
436
434
            </textobject>
437
435
          </mediaobject> 
438
436
        </screenshot> 
439
437
     </figure>
440
438
 
441
 
    <para>Experienced translators may be more familiar with the .po file format, or you might wish to use the many tools that work with the .po file format. By using the <literal>Export</literal> button you can create a .po file to use in a separate tool or to send to a translator. You can then import the resulting translation by using the <literal>Import</literal> button.</para>  
 
439
    <para>Los traductores experimentados pueden estar más familiarizados con el formato .po, o puede desear utilizar la mayoría de las herramientas que funcionan con el formato .po. Al usar el botón <literal>Exportar</literal> puede crear un archivo .po para utilizarlo en una herramienta aparte o para enviárselo a un traductor. Puede importar la traducción resultante usando el botón <literal>Importar</literal>.</para>  
442
440
 
443
441
   </sect2>
444
442
 
445
443
   <sect2 id="defining-reports">
446
 
   <title>Defining Reports</title>
 
444
   <title>Definir informes</title>
447
445
 
448
446
   <sect3 id="adding-or-editing-reports">
449
 
   <title>Adding or Editing Reports</title>
 
447
   <title>Añadir o editar informes</title>
450
448
 
451
 
   <para>Glom can produce reports to show specific fields for sets of records, sorted and grouped. 
452
 
For instance, a shop might need a report listing all products sold in one month, grouped by product type, and sorted by price inside each group. Each table has its own reports, which are available to the operator from the <literal>Reports</literal> menu.</para>
453
 
   <para>To define a report, or to change the definition of an existing report, choose <literal>Reports</literal> from the <literal>Developer</literal> menu.</para>
 
449
   <para>Glom puede generar informes para mostrar campos específicos o conjuntos de registros, ordenados y agrupados. Por ejemplo, una tienda puede necesitar un informe que liste todos los productos vendidos en un mes, agrupados por tipo de producto, y ordenados por precio dentro de cada grupo. Cada tabla tiene sus propios informes, que están a disposición del operador en el menú <literal>Informes</literal>.</para>
 
450
   <para>Para definir un informe, o para cambiar la definición de un informe existente, seleccione <literal>Informes</literal> en el menú <literal>Desarrollador</literal>.</para>
454
451
   <figure id="developer-editing-reports"> 
455
 
        <title>Creating or Editing Reports</title> 
 
452
        <title>Crear o editar informes</title> 
456
453
        <screenshot> 
457
454
          <mediaobject> 
458
455
            <imageobject><imagedata fileref="figures/glom_design_reports.png" format="PNG"/> 
459
456
            </imageobject>
460
457
            <textobject> 
461
 
              <phrase>Creating or editing reports.</phrase> 
 
458
              <phrase>Crear o editar informes.</phrase> 
462
459
            </textobject>
463
460
          </mediaobject> 
464
461
        </screenshot> 
465
462
     </figure>
466
463
 
467
 
    <para>Notice that each report has an ID as well as a human-readable name. This allows your report to have a translated title when used on a computer that uses a different language.</para>
 
464
    <para>Tenga en cuenta que cada informe tiene un ID, así como un nombre legible por humanos. Esto permite que su informe tenga un título traducido cuando se utiliza en un ordenador que trabaja con un idioma diferente.</para>
468
465
 
469
466
    </sect3>
470
467
 
471
468
    <sect3 id="editing-a-report">
472
 
    <title>Editing a Report</title>
473
 
 
474
 
    <para>A Glom report has three areas:
475
 
    <orderedlist>
476
 
      <listitem><simpara>The Header, which appears at the start of the report</simpara></listitem>
477
 
      <listitem><simpara>The Main area, in which the records and summary lines are shown, with the actual data from the database.</simpara></listitem>
478
 
      <listitem><simpara>The Footer, which appears at the end of the report.</simpara></listitem>
479
 
    </orderedlist>
480
 
    </para>
481
 
 
482
 
    <para>Inside an area, such as the Main part, you may add report <literal>Parts</literal>, such as fields, text, or images. These will usually appear in a row on the printed report, with one row for each record. In the simple case, this will look much like Glom's list view. You can add parts to your report by selecting them from the <literal>Available Parts</literal> list and then clicking the <literal>Add</literal> button. The part will then be added to the <literal>Parts</literal> list, in the selected area.</para>
483
 
    <para>To specify details for the parts, such as the text or image to display, or to choose the field to display, select the part in the <literal>Parts</literal> list and click the <literal>Edit</literal> button. You may also specify field formatting by clicking the <literal>Formatting</literal> button, just as you would when defining a details or list layout.</para>
 
469
    <title>Editar un informe</title>
 
470
 
 
471
    <para>Un informe de Glom tiene tres áreas: <orderedlist>
 
472
      <listitem><simpara>La cabecera, que aparecerá al principio del informe</simpara></listitem>
 
473
      <listitem><simpara>El área principal, donde se muestran los registros y las líneas de resumen, con los datos actuales de la base de datos.</simpara></listitem>
 
474
      <listitem><simpara>El pie, que aparecerá al final del informe.</simpara></listitem>
 
475
    </orderedlist></para>
 
476
 
 
477
    <para>Dentro de un área, como la parte principal, puede añadir <literal>Partes</literal> de un informe, tales como campos, texto o imágenes. Habitualmente aparecerán en una fila en el informe impreso, con una fila para cada registro. En el caso simple, se parecerá mucho a la vista de lista de Glom. Puede añadir partes a su informe seleccionándolas de la lista <literal>Partes disponibles</literal> y pulsando en el botón <literal>Añadir</literal>. Se añadirá la parte a la lista <literal>Partes</literal>, en el área seleccionada.</para>
 
478
    <para>Para especificar los detalles de las partes, tales como el texto o la imagen que mostrar, o seleccionar el campo que mostrar, seleccione la parte en la lista <literal>Partes</literal> y pulse el botón <literal>Editar</literal>. También puede especificar el formato del campo pulsando el botón <literal>Formato</literal>, simplemente como lo haría cuando define la disposición de los detalles o la disposición de una lista.</para>
484
479
 
485
480
    <figure id="developer-editing-reports-details"> 
486
 
        <title>Editing a Report</title> 
 
481
        <title>Editar un informe</title> 
487
482
        <screenshot> 
488
483
          <mediaobject> 
489
484
            <imageobject><imagedata fileref="figures/glom_design_reports_details.png" format="PNG"/> 
490
485
            </imageobject>
491
486
            <textobject> 
492
 
              <phrase>Editing a report.</phrase> 
 
487
              <phrase>Editar un informe.</phrase> 
493
488
            </textobject> 
494
489
          </mediaobject> 
495
490
        </screenshot> 
496
491
     </figure>
497
492
 
498
 
    <para>Some parts may contain other parts and have extra properties to control how they present their child parts. For instance, the <literal>Group By</literal> part groups records together by a field. For instance, a products report might group a list of products by product type. You can even add a second sub-grouping inside the main <literal>Group By</literal> part, by selecting your top-level <literal>Group By</literal> part in the <literal>Parts</literal> list while adding a new <literal>Group By</literal> part from the <literal>Available Parts</literal> list. For instance, you might group your products by manufacturer, inside each product type group.</para>
499
 
    <para>To specify the field by which the records should be grouped, select your <literal>Group By</literal> part in the <literal>Parts</literal> list and click the <literal>Edit</literal> button. You can then choose the field by which the records should be grouped, and select the fields by which these records should be sorted within the group. You may also specify some additional fields to be displayed in the group's title row. For instance, you might want to group products by a manufacturer ID, but also show the manufacturer name.</para>
 
493
    <para>Algunas partes pueden contener otras partes y tener propiedades adicionales para controlar como se presentan su partes hijas. Por ejemplo, la parte <literal>Agrupar por</literal> agrupa registros juntos por un campo. Por ejemplo, un informe de productos debe agrupar una lista de productos por tipo de producto. También puede añadir una segunda agrupación dentro de la parte <literal>Agrupar por</literal> principal, seleccionando la primera parte <literal>Agrupar por</literal> en la lista <literal>Partes</literal> mientras añade una nueva parte <literal>Agrupar por</literal> de la lista <literal>Partes disponibles</literal>. Por ejemplo, puede agrupar sus productos por fabricante, dentro de cada grupo de tipo de producto.</para>
 
494
    <para>Para especificar el campo por el que se agruparán los registros, seleccione su parte <literal>Agrupar por</literal> en la lista <literal>Partes</literal> y pulse el botón <literal>Editar</literal>. Entonces puede seleccionar el campo por el que quiere que se ordenen los registros, y seleccionar los campos por los que esos registros deberán ordenarse dentro del grupo. También debe especificar algunos campos adicionales para mostrar en el título de la fila del grupo. Por ejemplo, puede querer agrupar productos por ID de fabricante, pero mostrar también el nombre del fabricante.</para>
500
495
 
501
496
    <figure id="developer-editing-reports-group_by"> 
502
 
        <title>Editing a Group By Part</title> 
 
497
        <title>Editar un grupo por partes</title> 
503
498
        <screenshot> 
504
499
          <mediaobject> 
505
500
            <imageobject><imagedata fileref="figures/glom_design_reports_group_by.png" format="PNG"/> 
506
501
            </imageobject>
507
502
            <textobject> 
508
 
              <phrase>Editing a report.</phrase> 
 
503
              <phrase>Editar un informe.</phrase> 
509
504
            </textobject> 
510
505
          </mediaobject> 
511
506
        </screenshot> 
512
507
     </figure>
513
508
 
514
 
   <para>The <literal>Vertical Group</literal> part may contain other items. For instance, it allows you to arrange fields below each other instead of just one after the other in the horizontal row. This is useful for grouping related fields such as address lines, or just to squeeze more information into the records's row on the report.</para>
 
509
   <para>La parte <literal>Grupo vertical</literal> puede contener otros elementos. Por ejemplo, le permite ordenar campos junto a otros en lugar de uno detrás de otro en la fila horizontal. Ésto es útil para agrupar campos relacionados tales como direcciones, o simplemente apretar más información dentro de la fila del registro del informe.</para>
515
510
   
516
511
   <figure id="developer-editing-reports-vertical_group"> 
517
 
        <title>A Report with Vertical Groups</title> 
 
512
        <title>Un informe con grupos verticales</title> 
518
513
        <screenshot> 
519
514
          <mediaobject> 
520
515
            <imageobject><imagedata fileref="figures/glom_design_reports_vertical_group.png" format="PNG"/> 
521
516
            </imageobject>
522
517
            <textobject> 
523
 
              <phrase>A Report with Vertical Groups.</phrase> 
 
518
              <phrase>Un informe con grupos verticales.</phrase> 
524
519
            </textobject> 
525
520
          </mediaobject> 
526
521
        </screenshot> 
527
522
     </figure> 
528
523
 
529
 
   <para>When you have finished, click the <literal>Close</literal> button to save the report's definition. Your report can then be chosen from the <literal>Reports</literal> menu. See the <link linkend="glom-operator-printing-reports">Printing Reports</link> section for more details.</para>
 
524
   <para>Cuando haya acabado, pulse el botón <literal>Cerrar</literal> para guardar la definición del informe. Puede seleccionar su informe desde el menú <literal>Informes</literal>. Para obtener más detalles vea la sección </para>
530
525
 
531
526
 
532
527
 
543
538
<title>Diálogos</title>
544
539
 
545
540
<sect2 id="dialog_existing_or_new">
546
 
<title>Dialog: Initial dialog</title>
547
 
<para>This dialog allows the user to choose an existing document or create a new document. Existing documents may be selecting from the list of recently opened documents or by select a file with the file chooser dialog. Documents can also be opened via the network if other users are running Glom on the local network. Finally, a new document can be created either by opening a template file which already contains some initial tables and records, or by creating an empty document.</para>
 
541
<title>Diálogo: Diálogo inicial</title>
 
542
<para>Este diálogo permite al usuario seleccionar un documento existente o crear un documento nuevo. Los documentos existentes se deben seleccionar de la lista de documentos abiertos recientemente, o seleccionando un archivo con el diálogo de selección de archivos. También se pueden abrir los documentos a través de la red, si otros usuarios están ejecutando Glom en la red local. Finalmente, se puede crear un documento nuevo abriendo una plantilla que ya contenga algunas tablas o registros iniciales, o creando un documento vacío.</para>
548
543
</sect2>
549
544
 
550
545
<sect2 id="dialog_new_database">
551
 
<title>Dialog: New database</title>
 
546
<title>Diálogo: Nueva base de datos</title>
552
547
<para/>
553
548
</sect2>
554
549
 
555
550
<sect2 id="dialog_error_create_database">
556
 
<title>Dialog: Create database</title>
 
551
<title>Diálogo: Crear base de datos</title>
557
552
<para/>
558
553
</sect2>
559
554
 
560
555
<sect2 id="dialog_connection">
561
 
<title>Dialog: Connection</title>
562
 
<para>This dialog requests a user name and password for connection to a database server. This is usually not the same username and password combination with which you log in to your system. All Glom systems require a database server on which the actual data will be stored. If the database server is not running on your local computer ("localhost"), then you must also provide its network hostname, such as "glomserver.openismus.com", though your hostname will be different.</para>
563
 
<para>Your system administrator can provide these database login details.</para>
564
 
<para>If you are the system administrator, see Glom's <ulink url="http://www.glom.org/wiki/index.php?title=Initial_Postgres_Configuration" type="http">Postgres Configuration</ulink> web page for help with installing and configuring a database server.</para>
 
556
<title>Diálogo: Conexión</title>
 
557
<para>Este cuadro de diálogo solicita un nombre de usuario y una contraseña para conectar a un servidor de bases de datos. Normalmente no es la misma combinación de usuario y contraseña que utiliza para autenticarse en su sistema. Todos los sistemas Glom requieren un servidor de bases de datos en el que almacenar los datos actuales. Si el servidor de bases de datos no se está ejecutando en el equipo local («localhost»), debe proporcionar el nombre del equipo, tal como "glomserver.openismus.com", aunque su nombre del equipo sea diferente.</para>
 
558
<para>Su administrador de sistemas puede proporcionarle esos detalles de conexión a la base de datos.</para>
 
559
<para>Si es el administrador del sistema. lea la página web de Glom <ulink url="http://www.glom.org/wiki/index.php?title=Initial_Postgres_Configuration" type="http">Configuración de Postgres</ulink> para obtener ayuda con la instalación y configuración del servidor de bases de datos.</para>
565
560
</sect2>
566
561
 
567
562
<sect2 id="dialog_error_connection">
568
 
<title>Dialog: Connection Error</title>
569
 
<para>This dialog is shown when Glom could not connect to the specified database server. Either the database server is not running at the specified hostname, or the user name and password were not accepted by the database server. See the <link linkend="dialog_connection">Connection Dialog</link> section for more details.</para>
 
563
<title>Diálogo: Error de conexión</title>
 
564
<para>Este diálogo se muestra cuando Glom no puede conectar con el servidor de bases de datos especificado. O el servidor de bases de datos no está funcionando en el equipo especificado, o el servidor de bases de datos no aceptó el nombre de usuario y la contraseña. Para obtener más detalles consulte la sección <link linkend="dialog_connection">Diálogo de conexión</link>.</para>
570
565
 
571
566
<para/>
572
567
</sect2>
573
568
 
574
569
<sect2 id="dialog_database_preferences">
575
 
<title>Dialog: Database preferences</title>
 
570
<title>Diálogo: Preferencias de la base de datos</title>
576
571
<para/>
577
572
</sect2>
578
573
 
579
574
<sect2 id="dialog_change_language">
580
 
<title>Dialog: Change language</title>
 
575
<title>Diálogo: Cambiar idioma</title>
581
576
<para/>
582
577
</sect2>
583
578
 
584
579
<sect2 id="window_textobject">
585
 
<title>Window: Textobject</title>
 
580
<title>Ventana: Objeto de texto</title>
586
581
<para/>
587
582
</sect2>
588
583
 
589
584
<sect2 id="window_imageobject">
590
 
<title>Window: Imageobject</title>
 
585
<title>Ventana: Objeto de imagen</title>
591
586
<para/>
592
587
</sect2>
593
588
 
594
589
<sect2 id="dialog_notebook">
595
 
<title>Dialog: Notebook</title>
 
590
<title>Diálogo: Cuaderno de notas</title>
596
591
<para/>
597
592
</sect2>
598
593
 
599
594
<sect2 id="dialog_data_invalid_format">
600
 
<title>Dialog: Data invalid format</title>
 
595
<title>Diálogo: Formato de datos inválido</title>
601
596
<para/>
602
597
</sect2>
603
598
 
604
599
<sect2 id="dialog_relationship_overview">
605
 
<title>Dialog: Relationship overview</title>
 
600
<title>Diálogo: Descripción de la relación</title>
606
601
<para/>
607
602
</sect2>
608
603
 
609
604
<sect2 id="window_groups">
610
 
<title>Window: Groups</title>
 
605
<title>Ventana: Grupos</title>
611
606
<para/>
612
607
</sect2>
613
608
 
614
609
<sect2 id="dialog_groupby_sort_fields">
615
 
<title>Dialog: Group by sort fields</title>
 
610
<title>Diálogo: Agrupar por campos ordenados</title>
616
611
<para/>
617
612
</sect2>
618
613
 
619
614
<sect2 id="dialog_groupby_secondary_fields">
620
 
<title>Dialog: Group by secondary fields</title>
 
615
<title>Diálogo: Agrupar por campos secundarios</title>
621
616
<para/>
622
617
</sect2>
623
618
 
624
619
<sect2 id="window_button_script">
625
 
<title>Window: Button script</title>
 
620
<title>Ventana: Botón de script</title>
626
621
<para/>
627
622
</sect2>
628
623
 
629
624
<sect2 id="window_field_calculation">
630
 
<title>Window: Field calculation</title>
 
625
<title>Ventana: Cálculo de campos</title>
631
626
<para/>
632
627
</sect2>
633
628
 
634
629
<sect2 id="dialog_new_group">
635
 
<title>Dialog: New group</title>
 
630
<title>Diálogo: Grupo nuevo</title>
636
631
<para/>
637
632
</sect2>
638
633
 
639
634
<sect2 id="dialog_choose_user">
640
 
<title>Dialog: Choose user</title>
 
635
<title>Diálogo: Elegir usuario</title>
641
636
<para/>
642
637
</sect2>
643
638
 
644
639
<sect2 id="dialog_user">
645
 
<title>Dialog: User</title>
 
640
<title>Diálogo: Usuario</title>
646
641
<para/>
647
642
</sect2>
648
643
 
649
644
<sect2 id="dialog_translation_identify_original">
650
 
<title>Dialog: Translation identify original</title>
 
645
<title>Diálogo: La traducción identifica al original</title>
651
646
<para/>
652
647
</sect2>
653
648
 
654
649
<sect2 id="dialog_translation_copy">
655
 
<title>Dialog: Translation copy</title>
 
650
<title>Diálogo: Copia de la traducción</title>
656
651
<para/>
657
652
</sect2>
658
653
 
659
654
<sect2 id="dialog_choose_date">
660
 
<title>Dialog: Choose Date</title>
 
655
<title>Diálogo: Elegir fecha</title>
661
656
<para/>
662
657
</sect2>
663
658
 
 
659
<sect2 id="dialog_import_csv">
 
660
<title>Diálogo: Importar a una tabla</title>
 
661
<para>Este diálogo permite al usuario importar un archivo CSV (valores separados por comas) en la tabla de la base de datos actual. Muestra las primeras filas del archivo para importar y permite al usuario seleccionar el campo destino en la base de datos para cada columna del archivo CSV. Para autoincrementar las claves primarias, el campo de la clave primaria no se puede utilizar como campo destino, de lo contrario se debe importar una columna en el campo de la clave primaria.</para>
 
662
</sect2>
 
663
 
664
664
</sect1>
665
665
 
666
666
<!-- ============= Bugs ================================== -->
693
693
  <appendix id="sec-concepts">
694
694
  <title>Conceptos</title>
695
695
  <para>Glom es fácil de usar, pero debe entender los siguientes conceptos básicos. <orderedlist>
696
 
<listitem><simpara><literal>Database</literal>: Each Glom document allows access to one database.</simpara></listitem>
 
696
<listitem><simpara><literal>Base de datos</literal>: Cada documento de Glom permite el acceso a una base de datos.</simpara></listitem>
697
697
<listitem><simpara><literal>Tabla</literal>: Cada base de datos contiene varias tablas, tales como, por ejemplo, las tablas «Clientes» y «Facturas».</simpara></listitem>
698
698
<listitem><simpara><literal>Campo</literal>: Cada tabla tiene varios campos, tales como «ID del cliente», «Nombre» y «Fecha de nacimiento», en otros documentos y aplicaciones, se suele denominar a estos campos «columnas».</simpara></listitem>
699
699
<listitem><simpara><literal>Registros</literal>: Cada tabla tiene varios registros, cada uno de los cuales contiene valores para cada uno de los campos. Por ejemplo la tabla de «Clientes» tendrá un registro para cada cliente. En otros documentos y aplicaciones, a los registros se los suele denominar <literal>filas</literal>.</simpara></listitem>
702
702
  </appendix>
703
703
 
704
704
  <appendix id="sec-calculated-fields">
705
 
  <title>Calculated fields and button scripts</title>
706
 
  <para>Calculated fields and button scripts use the Python programming language. The calculation or script is the implementation of a function whose signature is provided for you.</para>
 
705
  <title>Campos calculados y botones de script</title>
 
706
  <para>Los campos calculados y los botones de scripts usan el lenguaje de programación Python.El cálculo o el script es la implementación de una función cuya firma se le proporciona.</para>
707
707
 
708
708
     <figure id="developer-editing-fields-calculated"> 
709
 
        <title>Editing the definition of a calculated field</title> 
 
709
        <title>Editar la definición de un campo calculado</title> 
710
710
        <screenshot> 
711
711
          <mediaobject> 
712
712
            <imageobject><imagedata fileref="figures/glom_design_fields_dialog_calculated.png" format="PNG"/> 
713
713
            </imageobject>
714
714
            <textobject> 
715
 
              <phrase>Editing the definition of a calculated field.</phrase> 
 
715
              <phrase>Editar la definición de un campo calculado.</phrase> 
716
716
            </textobject> 
717
717
          </mediaobject> 
718
718
        </screenshot> 
719
719
     </figure>
720
720
 
721
721
  <sect1 id="field-values">
722
 
  <title>Field values</title>
723
 
  <para>For instance, <programlisting>record["name_first"]</programlisting> is the value of the name_first field in the current record.</para>
 
722
  <title>Valores de campo</title>
 
723
  <para>Por ejemplo, <programlisting>record["name_first"]</programlisting> es el valor del campo name_first en el registro actual.</para>
724
724
  </sect1>
725
725
 
726
726
  <sect1 id="related-records">
727
 
  <title>Related Records</title>
728
 
  <para>For instance, <programlisting>record.related["location"]</programlisting> provides the related records for the current record.</para>
 
727
  <title>Registros relacionados</title>
 
728
  <para>Por ejemplo, <programlisting>record.related["ubicación"]</programlisting> proporciona los registros relacionados con el registro actual.</para>
729
729
 
730
730
  <sect2 id="single-related-records">
731
 
  <title>Single related records</title>
732
 
  <para>For relationships that specify a single record, you can get the value of a field in that record. For instance, <programlisting>record.related["location"]["name"]</programlisting> is the value of the name field in the table indicated by the location relationship (often called location::name).</para>
 
731
  <title>Un sólo registro relacionado</title>
 
732
  <para>Para relaciones que especifican un único registro puede obtener el valor de un campo en ese registro. Por ejemplo, <programlisting>record.related["ubicación"]["nombre"]</programlisting> es el valor del nombre del campo en la tabla indicada por la relación de ubicación (habitualmente denominada ubicación::nombre).</para>
733
733
  </sect2>
734
734
 
735
735
  <sect2 id="multiple-related-records">
736
 
  <title>Multiple related records</title>
737
 
  <para>For relationships that specify multiple records, you can use the aggregate functions (sum, count, average) to get overall values. For instance, <programlisting>record.related["invoice_lines"].sum("total_price")</programlisting>.</para>
 
736
  <title>Múltiples registros relacionados</title>
 
737
  <para>Para relaciones que especifican múltiples registros, puede utilizar las funciones de adición (sum, count, average) para obtener todos los valores. Por ejemplo, <programlisting>record.related["lineas_de_factura"].sum("precio_total")</programlisting>.</para>
738
738
  </sect2>
739
739
 
740
740
  </sect1>
741
741
 
742
742
  <sect1 id="testing-for-empty-values">
743
 
  <title>Testing for empty values</title>
744
 
  <para>
745
 
  How you test for empty values depends on the type of field:
746
 
  </para>
 
743
  <title>Probando para valores vacíos</title>
 
744
  <para>La manera de probar para valores vacíos depende del tipo de campo:</para>
747
745
 
748
746
  <sect2 id="non-text-fields">
749
 
  <title>Non-text fields</title>
750
 
  <para>Non-text fields may be empty, indicating that the user has not entered any value in the field. For instance, Glom does not assume that an empty value in a numeric field should mean 0.</para>
751
 
  <para>You can test whether a field is empty by using Python's None. For instance:</para>
 
747
  <title>Campos que no son de texto</title>
 
748
  <para>Los campos que no sean de texto deben estar vacíos, indicando que el usuario no ha introducido ningún valor en el campo. Por ejemplo, Glom no asume que un valor vacío en un campo numérico deba valer 0.</para>
 
749
  <para>Puede probar si un campo está vacío usando el código Python «None». Por ejemplo:</para>
752
750
  <para>
753
751
  <programlisting>
754
752
  if(record["contact_id"] == None):
755
 
    return "No Contact"
 
753
    return "Sin contacto"
756
754
  else:
757
755
    return record.related["contacts"]["name_full"]
758
756
  </programlisting>
759
757
  </para>
760
 
  <para>You might also test whether there are any related records. For instance:</para>
 
758
  <para>También puede comprobar si hay algunos registros relacionados. Por ejemplo:</para>
761
759
  <para>
762
760
  <programlisting>
763
761
  if(record.related["contacts"] == None):
764
 
    return "No Contact"
 
762
    return "Sin contacto"
765
763
  else:
766
764
    return record.related["contacts"]["name_full"]
767
765
  </programlisting>
769
767
  </sect2>
770
768
 
771
769
  <sect2 id="text-fields">
772
 
  <title>Text fields</title>
773
 
  <para>For text fields, you should check for zero-length strings. It is not possible in Glom to distinguish between zero-length strings and the absence of any string, because there is no advantage to doing so. For instance:</para>
 
770
  <title>Campos de texto</title>
 
771
  <para>Para campos de texto debe comprobar las cadenas de longitud cero. En Glom no es posible distinguir entre cadenas de longitud cero y ausencia de cadena, ya que no hay diferencia. Por ejemplo:</para>
774
772
  <para>
775
773
  <programlisting>
776
774
  if(record["name_full"] == ""):
777
 
    return "No Name"
 
775
    return "Sin nombre"
778
776
  else:
779
777
    return record["name_full"]
780
778
  </programlisting>
784
782
 
785
783
 
786
784
<sect1 id="using-the-full-pygda-api">
787
 
  <title>Using the full pygda API</title>
788
 
  <para>pygda is a python API for the libgda API. The record's <literal>connection</literal> attribute provides a gda.connection that can be used to access the current database directly. This allows you to run any SQL query, for instance to read data from the database with a SELECT, or to change values in the database with an UPDATE. Note that the connection is already open so you can avoid the difficult work of specifying the connection details.</para>
789
 
  <para>The record's <literal>table_name</literal> attribute also provides the name of the current table.</para>
790
 
  <para>(Note that the <literal>record.connection</literal> and <literal>record.table_name</literal> attributes are only available since Glom 1.1.6.)</para>
791
 
  <para>This example reads all data from the current table and prints the values to the terminal: </para>
 
785
  <title>Usando la API pydga completa</title>
 
786
  <para>pygda es una API de Python para la API libgda. Los atributos de los registros <literal>connection</literal> proporcionan una conexión gda que puede usarse para acceder directamente a la base de datos actual. Esto le permite ejecutar cualquier consulta SQL, por ejemplo para leer datos de la base de datos con un SELECT o cambiar valores en la base de datos con un UPDATE. Nótese que la conexión ya está abierta, por lo que puede evitar el difícil trabajo de especificar los detalles de la conexión.</para>
 
787
  <para>El atributo del registro <literal>table_name</literal> también proporciona el nombre de la tabla actual.</para>
 
788
  <para>(Nótese que los atributos <literal>record.connection</literal> y <literal>record.table_name</literal> sólo están disponibles desde la versión 1.1.6 de Glom.)</para>
 
789
  <para>Este ejemplo lee todos los datos de la tabla actual e imprime los valores en la terminal:</para>
792
790
  <para>
793
791
  <programlisting>
794
 
# Use the current database's connection 
795
 
# to get all the data for the current table.
 
792
# Usa la conexión actual a la base de datos 
 
793
# para obtener todos los datos de la tabla actual.
796
794
#
797
 
# record.connection is an already-open gda.connection object,
798
 
# saving us the bother of opening the connection,
799
 
# or even knowing the name of the database.
 
795
# la conexión de registros es un objeto gda.connection ya abierto,
 
796
# evitando la incomodidad de abrir la conexión,
 
797
# o incluso conociendo el nombre de la base de datos.
800
798
 
801
799
query = "SELECT * FROM %s" % record.table_name
802
800
command = gda.Command(query)
804
802
 
805
803
rows = data_model.get_n_rows()
806
804
columns = data_model.get_n_columns()
807
 
print "    Number of columns: ", columns
 
805
print "    Número de columnas: ", columns
808
806
 
809
807
for i in range(columns):
810
 
    print "      column ", i;
811
 
    print "        name=", data_model.get_column_title(i)
 
808
    print "      columna ", i;
 
809
    print "        nombre=", data_model.get_column_title(i)
812
810
 
813
 
    # Find out whether it's the primary key:
 
811
    # Comprueba si es la clave primaria:
814
812
    field = data_model.describe_column(i)
815
813
    if field.get_primary_key():
816
 
        print "        (primary key)"
 
814
        print "        (clave primaria)"
817
815
 
818
816
    print "\n";
819
817
     
820
 
print "    Number of rows: ", rows
 
818
print "    Número de filas: ", rows
821
819
 
822
820
for row_index in range(rows):
823
 
    print "      row ", row_index;
 
821
    print "      fila ", row_index;
824
822
 
825
823
    for col_index in range(columns):
826
 
        print "        value=", data_model.get_value_at(col_index, row_index).get()
 
824
        print "        valor=", data_model.get_value_at(col_index, row_index).get()
827
825
 
828
826
    print "\n";
829
827
  </programlisting>