Localisation/es: Difference between revisions

From FreeCAD Documentation
(Created page with "Añade una barra inclinada y el código de tu idioma en las categorías, como <nowiki>Category:Developer Documentation/es</nowiki>")
(Updating to match new version of source page)
(35 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
"Localización" es en general el proceso de proveer un software con una interfaz de usuario de con múltiples lenguajes. En FreeCAD puedes cambiar el lenguaje de la interfaz en "Editar→Preferencias→Aplicación". FreeCAD usa [[wikipedia:Qt (toolkit)|Qt]] para facilitar el soporte de múltiples lenguajes. En Unix/Linux, FreeCAD utiliza la configuración local actual de tu sistema como predeterminado.
{{Docnav
|[[Branding|Branding]]
|[[Extra python modules|Extra python modules]]
}}
{{TOCright}}
<div class="mw-translate-fuzzy">
"Localización" es en general el proceso de proveer un software con una interfaz de usuario con múltiples lenguajes. En FreeCAD puedes cambiar el lenguaje de la interfaz en "Editar→Preferencias→Aplicación". FreeCAD usa [[wikipedia:Qt (toolkit)|Qt]] para facilitar el soporte de múltiples lenguajes. En Unix/Linux, FreeCAD utiliza la configuración local actual de tu sistema como predeterminado.
</div>


== Ayudando a traducir FreeCAD ==
== Ayudando a traducir FreeCAD ==


<div class="mw-translate-fuzzy">
Una de las cosas más importantes que puedes hacer por FreeCAD si no eres un programador es ayudar a traducir el programa a tu idioma. Hacerlo es más fácil que antes, con el uso del sistema de traducción colaborativo en línea [http://crowdin.net Crowdin].
Una de las cosas más importantes que puedes hacer por FreeCAD si no eres un programador es ayudar a traducir el programa a tu idioma. Hacerlo es más fácil que antes, con el uso del sistema de traducción colaborativo en línea [http://crowdin.net Crowdin].
</div>

<div class="mw-translate-fuzzy">
=== Cómo traducir ===
</div>


[[File:Logo-crowdin.png|320px]]
=== Como traducir ===


It is proprietary software but free to FOSS projects. Below are instructions on how to use it:

<div class="mw-translate-fuzzy">
*Ve a [http://crowdin.net/project/freecad la página del proyecto de traducción de FreeCAD en Crowdin];
*Ve a [http://crowdin.net/project/freecad la página del proyecto de traducción de FreeCAD en Crowdin];
* Ingresa creando un nuevo perfil, o utilizando una cuenta terciaria como tu dirección de Gmail;
* Ingresa creando un nuevo perfil, o utilizando una cuenta terciaria como tu dirección de Gmail;
* Da clic en el lenguaje en que deseas trabajar;
* Da clic en el lenguaje en que deseas trabajar;
* Comienza a traducir al dar clic en el botón de Traducir, al lado de alguno de los archivos. Por ejemplo, ''FreeCAD.ts'' contiene todos los strings para GUI principal de FreeCAD.
* Comienza a traducir al dar clic en el botón de Traducir, al lado de alguno de los archivos. Por ejemplo, ''FreeCAD.ts'' contiene todos los strings para GUI principal de FreeCAD.
* Puedes votar por une traducción existente, o puedes la tuya.
* Puedes votar por une traducción existente, o puedes crear la tuya.
</div>


<div class="mw-translate-fuzzy">
'''Nota''': Si estás participando activamente en la taducción de FreeCAD y quieres ser informado antes de que la nueva versión sea liberada, para que tengas tiempo de revisar tu traducción, porfavor suscríbete a este reporte: http://www.freecadweb.org/tracker/view.php?id=137
'''Nota''': Si estás participando activamente en la taducción de FreeCAD y quieres
ser informado antes de que la nueva versión sea liberada, para que tengas tiempo
de revisar tu traducción, por favor suscríbete a este reporte:
http://www.freecadweb.org/tracker/view.php?id=137
</div>


== Translating external workbenches ==


Visit [[Translating_an_external_workbench|Translating an external workbench]].
=== Traduciendo con Qt-Linguist (la manera antigua) ===


<div class="mw-translate-fuzzy">
La siguiente información no se debe utilizar y posiblemente se vuelva obsoleta. Se mantiene aquí para que los programadores puedan familiarizarse con su forma de funcionar.
== Traduciendo la wiki ==
</div>


<div class="mw-translate-fuzzy">
* Abre todos los directorios de lenguaje de FreeCAD que se muestran abajo
Esta wiki contiene un montón de contenido. El material más importante y actualizado es recopilado en el [[Online_Help_Toc/es|manual]].
* Verifica que un archivo .ts con tu código de lenguaje no existe ("fr" para francés, "de" para alemán, etc...)
</div>
* Si existe, puedes descargar el archivo, si quieres modificar/revisar/mejorar la traducción (pulsa en el archivo y descargalo).
* Si no existe, descarga el archivo .ts si código de lenguaje (o cualquier otro .ts disponible, también funcionará)
* Renombra ese archivo con tu código de lenguaje
* Abrelo con el programa Qt-Linguist
* Inicia la traducción (Qt Linguist es muy sencillo de utilizar)
* Una vez esté completamente terminada, guarda tu archivo
* [http://www.freecadweb.org/tracker/main_page.php Envíanos los archivos] así podremos incluirlos en el código fuente de FreeCAD beneficiando también a otros usuarios.


To translate the wiki, you must have wiki edit permissions; see [[FAQ#How can I get edit permission on the wiki?|How can I get edit permission on the wiki?]].
==== Archivos de traducción disponibles ====


You should also have enough knowledge of wiki markup and follow the general styling guidelines described on [[WikiPages|WikiPages]].
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Gui/Language/ FreeCAD main GUI]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Complete/Gui/Resources/translations/ Complete Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Drawing/Gui/Resources/translations/ Drawing Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Draft/Languages/ Draft Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/ReverseEngineering/Gui/Resources/translations/ Reverse Engineering Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Fem/Gui/Resources/translations/ FEM Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Robot/Gui/Resources/translations/ Robot Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Image/Gui/Resources/translations/ Image Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Sketcher/Gui/Resources/translations/ Sketcher Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Mesh/Gui/Resources/translations/ Mesh Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Test/Gui/Resources/translations/ Test Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Points/Gui/Resources/translations/ Points Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Raytracing/Gui/Resources/translations/ Raytracing Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Part/Gui/Resources/translations/ Part Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/PartDesign/Gui/Resources/translations/ PartDesign Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/Assembly/Gui/Resources/translations/ Assembly Workbench]
* [http://free-cad.svn.sourceforge.net/viewvc/free-cad/trunk/src/Mod/MeshPart/Gui/Resources/translations/ MeshPart Workbench]


=== Mediawiki Translation Extension===
== Preparando tus propios módulos/aplicaciones para la traducción ==


When the wiki moved away from SourceForge, [[User:Yorik|Yorik]] installed [http://www.mediawiki.org/wiki/Help:Extension:Translate MediaWiki's Translation extension] which facilitates translating pages. Advantages of the translation extension are that the page title can now be translated, it keeps track of translations, it notifies if the original page has been updated, and it maintains translations in sync with the original English page.
=== Prerequisitos ===


The tool is documented in [http://www.mediawiki.org/wiki/Help:Extension:Translate Help:Extension:Translate], and is part of [http://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle MediaWiki Language Extension Bundle].
Para realizar la localización de tu módulo de aplicación necesitas unas utilidades que vienen con ''Qt''. Puedes descargarlos desde [http://www.trolltech.com/products/qt/downloads Trolltech-Website], pero también están contenidos en [[Third_Party_Libraries/es#LibPack|LibPack]]:
;qmake: Genera los archivos de proyecto
;lupdate: Extrae o actualiza los textos originales en tu proyecto escaneando el código fuente
;Qt-Linguist: 'Qt-Linguist'' es muy sencillo de utilizar y te ayuda en la traducción con buenas características como un libro de frases para las expresiones habituales.


To quickly get started on preparing a page for translation, please read the [http://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example Page translation example].
=== Setup del proyecto ===
Essentially, a pair of
<pre><nowiki>
<translate> ... </translate></nowiki></pre>
tags need to surround the entire page to activate the translation system, and the page needs to be marked for translation.


To see an example of how the translation tool works, visit the [[Main Page|Main Page]]. You will see an automatically generated language bar at the top. Click on [[Main Page/de|Hauptseite]] (German), it will get you to [[Main Page/de]]. Right under the title, you can read <small>{{Emphasis|This page is a translated version of the page Main Page and the translation is XX% complete}}</small>, XX being the current percentage of translation. Click on "Translate" at the top of the page to start the translation utility to update, correct and review the existing translation.
Para iniciar la localización de tu proyecto ve al GUI-Part de tu módulo y escribe en la línea de comandos:
<syntaxhighlight>
qmake -project
</syntaxhighlight>
Esto escanea tu directorio de proyecto buscando archivos que contengan cadenas de texto y crea un archivo de proyecto como el del siguiente ejemplo:
<syntaxhighlight>
######################################################################
# Automatically generated by qmake (1.06c) Do 2. Nov 14:44:21 2006
######################################################################
TEMPLATE = app
DEPENDPATH += .\Icons
INCLUDEPATH += .
# Input
HEADERS += ViewProvider.h Workbench.h
SOURCES += AppMyModGui.cpp \
Command.cpp \
ViewProvider.cpp \
Workbench.cpp
TRANSLATIONS += MyMod_de.ts
</syntaxhighlight>


If you go to [[Main Page]], you will notice that you cannot edit the page directly anymore by clicking the [Edit] tags, and the top link "Edit" has been substituted by the "Translate" link that opens the translation utility.
Puedes añadir archivos aquí manualmente. Esta sección <tt>TRANSLATIONS</tt> contiene una lista de los archivos con la traducción para cada idioma. En el ejemplo de arriba ''MyMod_de.ts'' es la traducción al alemán.


When adding new content, the English page should be created first, then translated into another language. If someone wants to change or add content in a page, the English page should be modified first.
Ahora necesitas ejecutar <tt>lupdate</tt> para extraer todas las literales de las cadenas de texto en tu interfaz gráfica de usuario. La ejecución de <tt>lupdate</tt> después hacer cambios en el código fuente es siempre segura ya que nunca borra cadenas de texto de tu traducción. Sólo añade nuevas cadenas de texto.


<div class="mw-translate-fuzzy">
Ahora necesitas añadir los archivos <tt>.ts</tt> a tu proyecto de VisualStudio. Especifica el siguiente método de construcción personalizado para ellos:
Si no estas seguro de como proceder, no dudes en solicitar ayuda en los [http://forum.freecadweb.org/ foros].
<syntaxhighlight>
</div>
python ..\..\..\Tools\qembed.py "$(InputDir)\$(InputName).ts"
"$(InputDir)\$(InputName).h" "$(InputName)"
</syntaxhighlight>
Nota: Introduce el texto en una única línea de comandos, el salto de línea es sólo para propósitos de presentación.


===Important notes===
Compilando el archivo <tt>.ts</tt> de los ejemplos de arriba, se crea un archivo de encabezamiento ''MyMod_de.h''. El mejor sitio para añadirlo es en ''App<Modul>Gui.cpp''. En nuestro ejemplo esto podría ser ''AppMyModGui.cpp''. Allí añades la línea
<syntaxhighlight>
new Gui::LanguageProducer("Deutsch", <Modul>_de_h_data, <Modul>_de_h_len);
</syntaxhighlight>
para publicar tu traducción en la aplicación.


Every wiki user that has "Editor" permissions is able to launch the translate utility and write, save, and review translations.
=== Configurando los archivos de Python para la traducción ===


However, only users with "Administrator" permissions are able to mark pages for translation. A page that is not marked for translation won't make use of the translation extension and won't be correctly synchronized to the English information.
Para facilitar el proceso de localización de los archivo .py puedes utilizar la herramienta "pylupdate4" que acepta uno o más archivos .py. Con la opción -ts puedes preparar/actualizar uno o más archivos .ts. Por ejemplo para preparar un archivo .ts para la traducción al francés simplemente introduce lo siguiente en la línea de comandos:
<syntaxhighlight>
pylupdate4 *.py -ts YourModule_fr.ts
</syntaxhighlight>
la herramienta pylupdate escaneará tus archivos .py para las funciones translate() o tr() y crea un archivo YourModule_fr.ts. Este archivo puede ser el traducido con QLinguist y un archivo YourModule_fr.qm producido desde QLinguist o con el comando
<syntaxhighlight>
lrelease YourModule_fr.ts
</syntaxhighlight>
Ten en cuenta que la herramienta pylupdate4 no es muy buena reconociendo las funciones translate(), estas necesitan formatearse de forma muy específica (mira los archivos del módulo de croquizado como ejemplo). Dentro de tu archivo, puedes configurar un traductor como este (después de cargar tu QApplication pero ANTES de crear cualquier complemento o widget Qt):
<syntaxhighlight>
translator = QtCore.QTranslator()
translator.load("YourModule_"+languages[ln])
QtGui.QApplication.installTranslator(translator)
</syntaxhighlight>
Opcionalmente, también puedes crear el archivo XML Draft.qrc con este contenido:
<syntaxhighlight>
<RCC>
<qresource prefix="/translations" >
<file>Draft_fr.qm</file>
</qresource>
</RCC>
</syntaxhighlight>
y ejecutar pyrcc4 Draft.qrc -o qrc_Draft.py crea un gran archivo en Python conteniendo todos los recursos. Por otra parte esta aproximación también funciona para poner archivos de iconos en un archivo de recursos


The left sidebar is also translatable, but only Administrators can modify this element of the site. Please follow the dedicated instructions on [[Localisation Sidebar|Localisation Sidebar]].
== Traduciendo la wiki ==


The first time you switch a page to the new translation system, it loses all its old "manual" translations. To recover a translation, you should save an offline copy of the old text before the switch. Then you can use this old translated text to fill in the translation units in the new system. You can also open an earlier version from the history, and get the old text in this way. This has to be done for every language that had a translated page.
Esta wiki contiene un montón de contenido. El material más importante y actualizado es recopilado en el [[Online_Help_Toc/es|manual]].


=== Translate the FreeCAD documentation ===
===Translation plugin===


As per general consensus, the reference page in the wiki is the English page, which should be created first. If you want to change or add content to a page, you should do it to the English page first, and only once the update is completed, port the modification to the translated page.
When the Wiki moved away from SourceForge, [[User:Yorik|Yorik]] installed a [http://www.mediawiki.org/wiki/Help:Extension:Translate Translation plugin] which allows to ease translations between pages. For example, the page title can now be translated. Other advantages of the Translation plugin are that it keeps track of translations, notifies if the original page has been updated, and maintains translations in sync with the original English page.

The tool is documented in [http://www.mediawiki.org/wiki/Help:Extension:Translate Extension:Translate], and is part of a [http://www.mediawiki.org/wiki/MediaWiki_Language_Extension_Bundle Language Extension Bundle].

To quickly get started on preparing a page for translation and activating the plugin, please read the [http://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example Page translation example].

To see an example of how the Translation tool works once the translation plugin is activated on a page, you can visit the [[Main Page]]. You will see a new language menu bar at the bottom. It is automatically generated. Click for instance on the German link, it will get you to [[Main Page/de]]. Right under the title, you can read "This page is a '''translated version''' of a page Main Page and the translation is xx% complete." (xx being the actual percentage of translation). Click on the "translated version" link to start translation, or to update or correct the existing translation.

You will notice that you cannot directly edit a page anymore once it's been marked as a translation. You have to go through the translation utility.

When adding new content, the English page should be created first, then translated into another language. If someone wants to change/add content in a page, he should do the English one first.

'''REMARK: The first time you switch a page to the new translation system, it looses all its old 'manual' translations. To recover the translation, you need to open an earlier version from the history, and copy/paste manually the paragraphs to the new translation system.'''

Remark: to be able to translate in the wiki, you must of course [[FAQ#How_can_I_get_edit_permission_on_the_wiki.3F|gain wiki edit permission]].


===Old translation instructions===
===Old translation instructions===
These instructions are for historical background only, while the pages are being passed to the new translation plugin.


{| class="mw-collapsible mw-collapsed wikitable"
So the first step is to '''check if the manual translation has already been started for your language''' (look in the left sidebar, under "manual").
|These instructions are for historical background only. Translations should use the new system with the [[#Mediawiki Translation Extension]] described above.
|-
|
So the first step is to '''check if the manual translation has already been started for your language''' (look in the left sidebar, under "manual").<br />
If not, head to the [http://forum.freecadweb.org/ forum] and say that you want to start a new translation, we'll create the basic setup for the language you want to work on.<br />
You must then [[FAQ#How_can_I_get_edit_permission_on_the_wiki.3F|gain wiki edit permission]].<br />
If your language is already listed, see what pages are still missing a translation (they will be listed in red). The technique is simple: '''go into a red page, and copy/paste the contents of the corresponding English page, and start translating'''.<br />
Do not forget to include all the tags and templates from the original English page. Some of those templates will have an equivalent in your language (for example, there is a French Docnav template called Docnav/fr). You should use '''a slash and your language code''' in almost all the links. Look at other already translated pages to see how they did it.<br />
Add a slash and your language code in the categories, like <nowiki>[[Category:Developer Documentation/fr]]</nowiki> <br />
And if you are unsure, head to the forums and ask people to check what you did and tell you if it's right or not.<br />
Four templates are commonly used in manual pages. These 4 templates have localized versions (Template:Docnav/fr, Template:fr, etc...)
* [[Template:GuiCommand]] : is the Gui Command information block in upper-right of command documentation.
* [[Template:Docnav]] : it is the navigation bar at the bottom of the pages, showing previous and next pages.
* [[Template:Userdocnavi]] : gives direct links to the main base pages<br />
''' Page Naming Convention '''<br />
Please take note that, due to limitations in the Sourceforge implementation of the MediaWiki engine, we require that your pages all keep their original English counterpart's name, appending a slash and your language code. For example, the translated page for About FreeCAD should be About Freecad/es for Spanish, About FreeCAD/pl for polish, etc. The reason is simple: so that if translators go away, the wiki's administrators, who do not speak all languages, will know what these pages are for. This will facilitate maintenance and avoid lost pages.<br />
If you want the Docnav template to show linked pages in your language, you can use '''redirect pages'''. They are basically shortcut links to the actual page. Here is an example with the French page for About FreeCAD.<br />
* The page About FreeCAD/fr is the page with content
* The page À propos de FreeCAD contains this code:
#REDIRECT <nowiki>[[About_FreeCAD/fr]]</nowiki>
* In the About FreeCAD/fr page, the Docnav code will look like this:
<nowiki>{{docnav/fr|[[Online_Help_Startpage/fr|Bienvenue dans l'aide en ligne de FreeCAD]]|[[Feature_list/fr|Fonctionnalités]]}}</nowiki>
The page "Bienvenue dans l'aide en ligne de FreeCAD" redirects to Online_Help_Startpage/fr, and the page "Fonctionnalités" redirects to Feature_list/fr.
|}


== Translate the FreeCAD website ==
If not, head to the [http://forum.freecadweb.org/ forum] and say that you want to start a new translation, we'll create the basic setup for the language you want to work on.
Translation of the FreeCAD website is now done through [https://crowdin.com/translate/freecad/561/en-en Crowdin]. The file is named {{FileName|homepage.po}}.


== Development - How to Add Localisation ==
You must then [[FAQ#How_can_I_get_edit_permission_on_the_wiki.3F|gain wiki edit permission]].
This section is for developers who want to add localisation to their code.


<div class="mw-translate-fuzzy">
If your language is already listed, see what pages are still missing a translation (they will be listed in red). The technique is simple: '''go into a red page, and copy/paste the contents of the corresponding English page, and start translating'''.
== Preparando tus propios módulos/aplicaciones para la traducción ==
</div>


All of the above steps are performed by the "translation scripts" which are run by an administrator periodically.
Do not forget to include all the tags and templates from the original English page. Some of those templates will have an equivalent in your language (for example, there is a French Docnav template called Docnav/fr). You should use '''a slash and your language code''' in almost all the links. Look at other already translated pages to see how they did it.


Preparing your module for translation is quite easy. First, you need to ensure that you have a "translations" directory in {{FileName|myModule/Gui/Resources}}. Then open a terminal window (or Windows/OSX equivalent) in your "translations" directory and enter the following command:
Añade una barra inclinada y el código de tu idioma en las categorías, como <nowiki>[[Category:Developer Documentation/es]]</nowiki>
{{Code|code=lupdate -ts myModule.ts}}


This creates an empty translation file. Once this is done, you need to ensure that the translation scripts are updated as in this [https://github.com/FreeCAD/FreeCAD/pull/810 pull request].
Y si no estas seguro, dirígete a los foros y pregunta a la gente para verificar lo que hiciste y que te digan si está bien o no.


Everything after this is automatic as far as a developer is concerned. The administrator will extract the text strings, the translators will translate them, then the administrator will extract the translations and update FreeCAD/master.
Four templates are commonly used in manual pages. These 4 templates have localized versions (Template:Docnav/fr, Template:fr, etc...)
* [[Template:GuiCommand]] : is the Gui Command information block in upper-right of command documentation.
* [[Template:Docnav]] : it is the navigation bar at the bottom of the pages, showing previous and next pages.


<div class="mw-translate-fuzzy">
=== Convenciones de los nombres de las páginas ===
=== Prerequisitos ===
</div>


=== Older module translation techniques ===
Por favor, apunta esto, debido a limitaciones en la implementación en Sourceforge del motor de MediaWiki, necesitamos que todas tus páginas mantengan el nombre homólogo de la página en inglés, añadiéndole una barra inclinada y tu código de idioma. Por ejemplo, la página traducida para """About FreeCAD""" debería ser """About Freecad/es""" en español, """About FreeCAD/pl""" en polaco, etc. La razón es simple: así si los traductores se van, los administradores del wiki, que no hablan todos los idiomas, sabrán para que son esas páginas. Esto facilitará el mantenimiento y evitará páginas perdidas.
[[Localization Older Methods|Localization Older Methods]] describes the use of translation tools such as Qt Linguist, lupdate, lrelease, pylupdate4, etc in detail. Most of this is no longer required for FreeCAD/master modules, but may be helpful preparing and updating 3rd party modules.


== Automating Crowdin Translation Updates ==
Si quieres que la plantilla Docnav muestre las páginas vinculadas en tu lenguaje, puedes utilizar '''páginas redirigidas'''. Estas son básicamente enlaces a la página actual. Aquí está un ejemplo con la página en francés para About FreeCAD.
Currently FreeCAD maintainers use the Crowdin API via [[Crowdin Scripts|Crowdin Scripts]] to pull and push translations in to Crowdin and back in to the Github repo. The Crowdin API gives FreeCAD maintainers the ability to automate aspects of the project's translation workflow, for more info refer to the [https://support.crowdin.com/api/api-integration-setup/ Crowdin API documentation].


== Related Pages ==
* La página '''About FreeCAD/fr''' es la página con contenido
* [[Crowdin Administration]]
* La página a '''À propos de FreeCAD''' contiene este código:
* [[Crowdin Scripts]]
#REDIRECT <nowiki>[[About FreeCAD/fr]]</nowiki>
* En la página About FreeCAD/fr page, el código de Docnav se parecerá a esto:
<nowiki>{{docnav/fr|Bienvenue sur l'aide en ligne|Fonctionnalités}}</nowiki>
La página "Bienvenue sur l'aide en ligne" redirige a Online Help Startpage/fr, y la página "Fonctionnalités" redirige a Feature list/fr.

Si no estas seguro de como proceder, no dudes en solicitar ayuda en los [http://forum.freecadweb.org/ foros].


<div class="mw-translate-fuzzy">
{{docnav/es|Branding/es|Extra python modules/es}}
{{docnav/es|Branding/es|Extra python modules/es}}
</div>


{{Userdocnavi{{#translation:}}}}
[[Category:Developer Documentation/es]]
[[Category:Developer Documentation{{#translation:}}]]

[[Category:Wiki{{#translation:}}]]
{{clear}}
{{clear}}
<languages/>

Revision as of 12:22, 7 September 2020

"Localización" es en general el proceso de proveer un software con una interfaz de usuario con múltiples lenguajes. En FreeCAD puedes cambiar el lenguaje de la interfaz en "Editar→Preferencias→Aplicación". FreeCAD usa Qt para facilitar el soporte de múltiples lenguajes. En Unix/Linux, FreeCAD utiliza la configuración local actual de tu sistema como predeterminado.

Ayudando a traducir FreeCAD

Una de las cosas más importantes que puedes hacer por FreeCAD si no eres un programador es ayudar a traducir el programa a tu idioma. Hacerlo es más fácil que antes, con el uso del sistema de traducción colaborativo en línea Crowdin.

Cómo traducir

It is proprietary software but free to FOSS projects. Below are instructions on how to use it:

  • Ve a la página del proyecto de traducción de FreeCAD en Crowdin;
  • Ingresa creando un nuevo perfil, o utilizando una cuenta terciaria como tu dirección de Gmail;
  • Da clic en el lenguaje en que deseas trabajar;
  • Comienza a traducir al dar clic en el botón de Traducir, al lado de alguno de los archivos. Por ejemplo, FreeCAD.ts contiene todos los strings para GUI principal de FreeCAD.
  • Puedes votar por une traducción existente, o puedes crear la tuya.

Nota: Si estás participando activamente en la taducción de FreeCAD y quieres

ser informado antes de que la nueva versión sea liberada, para que tengas tiempo
de revisar tu traducción, por favor suscríbete a este reporte:
http://www.freecadweb.org/tracker/view.php?id=137

Translating external workbenches

Visit Translating an external workbench.

Traduciendo la wiki

Esta wiki contiene un montón de contenido. El material más importante y actualizado es recopilado en el manual.

To translate the wiki, you must have wiki edit permissions; see How can I get edit permission on the wiki?.

You should also have enough knowledge of wiki markup and follow the general styling guidelines described on WikiPages.

Mediawiki Translation Extension

When the wiki moved away from SourceForge, Yorik installed MediaWiki's Translation extension which facilitates translating pages. Advantages of the translation extension are that the page title can now be translated, it keeps track of translations, it notifies if the original page has been updated, and it maintains translations in sync with the original English page.

The tool is documented in Help:Extension:Translate, and is part of MediaWiki Language Extension Bundle.

To quickly get started on preparing a page for translation, please read the Page translation example. Essentially, a pair of

<translate> ... </translate>

tags need to surround the entire page to activate the translation system, and the page needs to be marked for translation.

To see an example of how the translation tool works, visit the Main Page. You will see an automatically generated language bar at the top. Click on Hauptseite (German), it will get you to Main Page/de. Right under the title, you can read This page is a translated version of the page Main Page and the translation is XX% complete, XX being the current percentage of translation. Click on "Translate" at the top of the page to start the translation utility to update, correct and review the existing translation.

If you go to Main Page, you will notice that you cannot edit the page directly anymore by clicking the [Edit] tags, and the top link "Edit" has been substituted by the "Translate" link that opens the translation utility.

When adding new content, the English page should be created first, then translated into another language. If someone wants to change or add content in a page, the English page should be modified first.

Si no estas seguro de como proceder, no dudes en solicitar ayuda en los foros.

Important notes

Every wiki user that has "Editor" permissions is able to launch the translate utility and write, save, and review translations.

However, only users with "Administrator" permissions are able to mark pages for translation. A page that is not marked for translation won't make use of the translation extension and won't be correctly synchronized to the English information.

The left sidebar is also translatable, but only Administrators can modify this element of the site. Please follow the dedicated instructions on Localisation Sidebar.

The first time you switch a page to the new translation system, it loses all its old "manual" translations. To recover a translation, you should save an offline copy of the old text before the switch. Then you can use this old translated text to fill in the translation units in the new system. You can also open an earlier version from the history, and get the old text in this way. This has to be done for every language that had a translated page.

Translate the FreeCAD documentation

As per general consensus, the reference page in the wiki is the English page, which should be created first. If you want to change or add content to a page, you should do it to the English page first, and only once the update is completed, port the modification to the translated page.

Old translation instructions

These instructions are for historical background only. Translations should use the new system with the #Mediawiki Translation Extension described above.

So the first step is to check if the manual translation has already been started for your language (look in the left sidebar, under "manual").
If not, head to the forum and say that you want to start a new translation, we'll create the basic setup for the language you want to work on.
You must then gain wiki edit permission.
If your language is already listed, see what pages are still missing a translation (they will be listed in red). The technique is simple: go into a red page, and copy/paste the contents of the corresponding English page, and start translating.
Do not forget to include all the tags and templates from the original English page. Some of those templates will have an equivalent in your language (for example, there is a French Docnav template called Docnav/fr). You should use a slash and your language code in almost all the links. Look at other already translated pages to see how they did it.
Add a slash and your language code in the categories, like [[Category:Developer Documentation/fr]]
And if you are unsure, head to the forums and ask people to check what you did and tell you if it's right or not.
Four templates are commonly used in manual pages. These 4 templates have localized versions (Template:Docnav/fr, Template:fr, etc...)

  • Template:GuiCommand : is the Gui Command information block in upper-right of command documentation.
  • Template:Docnav : it is the navigation bar at the bottom of the pages, showing previous and next pages.
  • Template:Userdocnavi : gives direct links to the main base pages

Page Naming Convention
Please take note that, due to limitations in the Sourceforge implementation of the MediaWiki engine, we require that your pages all keep their original English counterpart's name, appending a slash and your language code. For example, the translated page for About FreeCAD should be About Freecad/es for Spanish, About FreeCAD/pl for polish, etc. The reason is simple: so that if translators go away, the wiki's administrators, who do not speak all languages, will know what these pages are for. This will facilitate maintenance and avoid lost pages.
If you want the Docnav template to show linked pages in your language, you can use redirect pages. They are basically shortcut links to the actual page. Here is an example with the French page for About FreeCAD.

  • The page About FreeCAD/fr is the page with content
  • The page À propos de FreeCAD contains this code:
#REDIRECT [[About_FreeCAD/fr]]
  • In the About FreeCAD/fr page, the Docnav code will look like this:
{{docnav/fr|[[Online_Help_Startpage/fr|Bienvenue dans l'aide en ligne de FreeCAD]]|[[Feature_list/fr|Fonctionnalités]]}}

The page "Bienvenue dans l'aide en ligne de FreeCAD" redirects to Online_Help_Startpage/fr, and the page "Fonctionnalités" redirects to Feature_list/fr.

Translate the FreeCAD website

Translation of the FreeCAD website is now done through Crowdin. The file is named homepage.po.

Development - How to Add Localisation

This section is for developers who want to add localisation to their code.

Preparando tus propios módulos/aplicaciones para la traducción

All of the above steps are performed by the "translation scripts" which are run by an administrator periodically.

Preparing your module for translation is quite easy. First, you need to ensure that you have a "translations" directory in myModule/Gui/Resources. Then open a terminal window (or Windows/OSX equivalent) in your "translations" directory and enter the following command:

lupdate -ts myModule.ts

This creates an empty translation file. Once this is done, you need to ensure that the translation scripts are updated as in this pull request.

Everything after this is automatic as far as a developer is concerned. The administrator will extract the text strings, the translators will translate them, then the administrator will extract the translations and update FreeCAD/master.

Prerequisitos

Older module translation techniques

Localization Older Methods describes the use of translation tools such as Qt Linguist, lupdate, lrelease, pylupdate4, etc in detail. Most of this is no longer required for FreeCAD/master modules, but may be helpful preparing and updating 3rd party modules.

Automating Crowdin Translation Updates

Currently FreeCAD maintainers use the Crowdin API via Crowdin Scripts to pull and push translations in to Crowdin and back in to the Github repo. The Crowdin API gives FreeCAD maintainers the ability to automate aspects of the project's translation workflow, for more info refer to the Crowdin API documentation.

Related Pages

Branding/es
Extra python modules/es