Difference between revisions of "Debugging a translation/es"

From Joomla! Documentation

(Created page with "'''Consultas SQL ejecutadas.''' Todas las consultas SQL ejecutadas en el proceso de construcción de la página.")
(Created page with "'''Archivos de idioma cargados.''' Una lista de todos los archivos de idioma cargado en el proceso de construcción de la página, incluyendo la información de la ruta de acc...")
Line 37: Line 37:
 
* '''Uso de la memoria.''' La cantidad de RAM del sistema utilizada.
 
* '''Uso de la memoria.''' La cantidad de RAM del sistema utilizada.
 
* '''Consultas SQL ejecutadas.''' Todas las consultas SQL ejecutadas en el proceso de construcción de la página.
 
* '''Consultas SQL ejecutadas.''' Todas las consultas SQL ejecutadas en el proceso de construcción de la página.
* '''Language files loaded.''' A list of all the language files loaded in the process of building the page, including full path information. This can be useful to check that the expected files have been loaded. The number after each file path is the number of times that the file was referenced.
+
* '''Archivos de idioma cargados.''' Una lista de todos los archivos de idioma cargado en el proceso de construcción de la página, incluyendo la información de la ruta de acceso completa. Esto puede ser útil para comprobar que los archivos se han cargado. El número después de cada ruta de acceso del archivo es el número de veces que se hace referencia al archivo.
 
* '''Untranslated strings diagnostic.'''  A list of all the untranslated strings found and the likely file location given where the '''JText''' call was made.
 
* '''Untranslated strings diagnostic.'''  A list of all the untranslated strings found and the likely file location given where the '''JText''' call was made.
 
* '''Untranslated strings designer.'''  A list of all the untranslated strings found but listed in a KEY=Value format so they can be copy-pasted directly into a language definition file (INI).
 
* '''Untranslated strings designer.'''  A list of all the untranslated strings found but listed in a KEY=Value format so they can be copy-pasted directly into a language definition file (INI).

Revision as of 14:28, 21 September 2015

Other languages:
English • ‎Nederlands • ‎español • ‎français • ‎português • ‎русский
Split-icon.png
Split Page into Specific Joomla! Versions - J2.5 and 3.x

It has been suggested that this article or section be split into specific version Namespaces. (Discuss). If version split is not obvious, please allow split request to remain for 1 week pending discussions. Proposed since 8 years ago.


Info non-talk.png
General Information

¿Es esta versión específica? ¿Hay diferencias en la depuración de 1.5, 2.5 y 3.x? Si es así, vamos a dividirlo o marcar, es mejor.

Joomla! es compatible con algunosmecanismos de depuración útiles que pueden facilitar la localización de cadenas sin traducir y diagnosticar los problemas con las traducciones en las extensiones instaladas.

Depurar el Idioma

Global-config-language-debug-es.png

Activa la depuración del idioma a través de la Administración del Lado Servidor, entra en Configuración Global y has clic en la pestaña Sistema. Encuentra el campo la Depuración de Idioma, cambia el valor a "Sí" y guardar los cambios.

Con esta opción activa todas las cadenas traducibles se muestra rodeado de caracteres especiales que indican su estado

Código Estado
●Joomla CMS● (El texto rodeado por viñetas) indica que la clave ha sido encontrada en el archivo de definición de idioma y la cadena valor ha sido traducida.
??Joomla CMS?? (texto rodeado por pares de signos de interrogación) indica que la cadena es traducible, pero no se encontró concordancia de clave en el archivo de definición de idioma.
Joomla CMS (texto sin caracteres adyacentes) indica que la cadena no es traducible.

Depuración del Sistema

Información adicional para depuración del idioma puede ser obtenida mediante la activación de la depuración del sistema. Esto se hace yendo a la Configuración Global y has clic en la pestaña Sistema. Encuentra el campo Depuración del Sistema, cambia el valor a "Sí" y guarda los cambios.

Con esta opción activa todas las pantallas tienen información de depuración adicional al final de cada página. Actualmente, esto incluye

  • Información del perfil. Esta el tiempo necesario para ejecutar código en diferentes puntos marcados en el código.
  • Uso de la memoria. La cantidad de RAM del sistema utilizada.
  • Consultas SQL ejecutadas. Todas las consultas SQL ejecutadas en el proceso de construcción de la página.
  • Archivos de idioma cargados. Una lista de todos los archivos de idioma cargado en el proceso de construcción de la página, incluyendo la información de la ruta de acceso completa. Esto puede ser útil para comprobar que los archivos se han cargado. El número después de cada ruta de acceso del archivo es el número de veces que se hace referencia al archivo.
  • Untranslated strings diagnostic. A list of all the untranslated strings found and the likely file location given where the JText call was made.
  • Untranslated strings designer. A list of all the untranslated strings found but listed in a KEY=Value format so they can be copy-pasted directly into a language definition file (INI).

Debug Plugin

Debug-plugin-en.png

This system plugin controls what is displayed when debugging is activated in Global Configuration. It is enabled by default. You can access the parameters for the plugin from Extensions → Plugin Manager. Locate the “System - Debug” plugin and click on it. There are three settings of interest to translators.

  • Display loaded language files. If set to “Yes” then the debug information will include a list of the language files that were requested as the current page was being generated.
  • Display undefined language strings. If set to “diagnostic mode” then a list of untranslated strings and the location of the file containing the call to JText is included in the debug information. If set to “designer mode” then a list of untranslated strings in a format that can be copy-pasted directly into a language definition file is included in the debug information. That is, it displays the list in KEY=String format. If set to “All modes” then both the diagnostic mode and designer mode lists are included in the debug information.
  • Strip Key Prefix. Only used when Display undefined language strings is set to “Designer mode” or "All modes". This allows you to strip a prefix from the string to form the key. This is useful if the designer uses a common prefix for their extensions when using JText methods. See example below.

Note that the display of untranslated strings will only display the value passed to the appropriate JText method. For example, with the following code:

echo JText::_( 'Reports Import Configuration' );

If untranslated, Designer mode will display this as:

# /administrator/components/com_reports/views/reports/tmpl/default.php
REPORTS IMPORT CONFIGURATION=Reports Import Configuration

If the Strip Key Prefix is set to "Reports", then the display would change slightly to:

# /administrator/components/com_reports/views/reports/tmpl/default.php
REPORTS IMPORT CONFIGURATION=Import Configuration

Note that the path shown is only a best guess based on a call to the PHP debug_backtrace function. Sometimes it is accurate, sometimes it is not and there are also cases where no file could be determined. In those cases you have to use your best judgement.