TDF Wiki/Multilingual/jv

    From The Document Foundation Wiki
    This page is a translated version of the page TDF Wiki/Multilingual and the translation is 33% complete.
    Outdated translations are marked like this.

    Esta página se refiere al contenido Wiki Multilingue presente en el esta wikiTDF Wiki.

    Warning.svg

    Information
    Do not use the OrigLang type of translation for newly created pages. We are currently transitioning to the MediaWiki Translate extension.

    Background

    This page contains some important hints for wiki editors. Please read this page before adding translated or localized content to the wiki.

    Content with local focus

    Pages are written in their local language only and won't be translated. They are subpages of a page named by the language code in upper case.

    Ejemplos:

    
     https://wiki.documentfoundation.org/DE/Team
     https://wiki.documentfoundation.org/DE/Veranstaltungen
     ...
     https://wiki.documentfoundation.org/FR/Documentation/Publications
     
    

    Contenido con enfoque global

    Las páginas están configuradas en inglés y se traducen a diferentes idiomas. Las páginas traducidas son subpáginas nombradas por su código de idioma. El proceso de traducción está a cargo de La extensión de traducción.

    Siga estos pasos para hacer una página traducible:

    1. Coloque el contenido que debe traducirse dentro de los bloques <translate></translate>
    2. Use la plantilla {{#translation:}} para agregar sufijos de idioma a elementos como menús
    3. Use el prefijo Special:MyLanguage cuando enlace a páginas traducibles locales
    4. Agregue el bloque de menú de idioma <languages/>
    1. Después de guardar la página, haga clic en el enlace en la parte superior que dice Marcar esta página para traducir
    2. Verifique que todo esté bien y haga clic en el botón en la parte inferior que dice Marcar esta versión para traducción

    Después de marcar la página para traducción, la extensión Translate agregará automáticamente marcadores en forma de <!--T:1--> para indicar cadenas traducibles. Para separarse automáticamente en una cadena, un bloque de texto debe estar rodeado de líneas en blanco. Para forzar la separación de cadenas, puede agregar más bloques <translate></translate>. Preste especial atención a las listas numeradas o con viñetas.

    Cuando agrega o cambia contenido en la página de origen, aparecerá en la parte superior de la página: Esta página tiene cambios desde la última vez que se marcó para traducir. Haga clic en el enlace "marcar para traducción" para actualizar el sistema de traducción siguiendo el mismo proceso que en el marcado inicial para traducción

    Tips

    En una situación ideal, los traductores deberían ver una cantidad mínima de marcado wiki. Tener marcas para una tabla o una plantilla en la cadena traducible es frustrante y confuso para el traductor. Intente dejar dicho marcado fuera de los bloques <translate></translate>.

    El título de la página se hace traducible de manera predeterminada, pero se puede modificar mediante la casilla de verificación "Permitir traducción del título de la página" al marcar una página para su traducción. El título de la página es la primera cadena traducible en la lista de cadenas. En el sistema de traducción y la interfaz, la cadena tiene un nombre como "Translations:Faq/General/127/Page display title/ru" mientras que los otros nombres de cadenas tienen identificadores numéricos como el "4" en "Translations:Faq/General/127/4/ru".

    A veces es necesario dar a una página un título de visualización que sea diferente del nombre en la ruta de la página. Tenga en cuenta que esto no se recomienda y debe evitarse. En estos casos, utilice la plantilla Renombrar así: {{Rename|Mi nuevo nombre}}. La plantilla se asegurará de que no haya errores en las páginas traducidas con respecto al título.

    You can do a partial update of a translation while still leaving the status as outdated by clicking the downward-pointing triangle next to the translation unit name and selecting Show in wiki editor. You will be taken to a separate editing page where you can make your changes and save them while leaving the !!FUZZY!! special word at the start of the text intact.

    A veces es necesario acceder a la fuente wiki en inglés sin los marcadores <!--T:1-->. Esto se puede hacer agregando /en al final de la ruta de la página y luego editando la fuente. Esto le permitirá copiar una estructura de página en una página nueva (como las notas de la versión).

    When working on a page with many translation blocks, it sometimes happens that you make a mistake with opening or closing translate tags. In a situation like this, the page preview will show all the translate markup alongside the content. Clicking Save changes has a suprisingly useful effect, however: instead of saving, it will display a reduced view of the source text, helping you to find your error.

    Si tiene bloques que solo contienen un solo número, puede usar magic word {{formatnum:1234}} en lugar de un bloque de traducción. El número se formateará automáticamente en estilos no occidentales, cuando sea necesario.

    Below is an example of a page prepared for translation. Notice the separation of the bulleted list and contents in a table.

     {{TopMenu}}
     {{Menu}}
     {{Menu.Documentation}}
     <languages/>
    
     <translate>
     == Hello World ==
    
     * We must take the world as we find it
     * When we are gone, let the world be flooded
     * The world is as fools wish it to be
     * It's a small world!
     </translate>
     <translate>
     * Crows are black the world over
     * He slipped once and all the world knew about it
     * The world is like a market, the one does business and the other does none
     * Huge though the world is, I always miss when I hit at it
     </translate>
    
    
     {| class="wikitable"
     |-
     | <translate>Cell content</translate>
     |-
     | {{sometemplate|<translate>Text content for a template</translate>}}
     |-
     | <bdi>{{formatnum:-1.10714871779409}}</bdi>
     |-
     | {{formatnum:110714871779409|NOSEP}}
     |}
    
     [[Special:MyLanguage/Development/Create_a_Hello_World_LibreOffice_extension|<translate>Tutorial on creating a Hello World extension</translate>]]
    
     [[Category:Documentation]]
     
    

    As table content can be annoying to prepare for translation, a helper script has been created. Use it by copying a wiki article into a local text file and giving the file name as an argument for the script. The file contents will be rewritten in place. The formatnum magic word will be applied for integer, floating point and complex numbers, if they are the only content in a table cell. The script depends on wikitextparser, regex and wcwidth packages. Click Expand to see the script.

    
    #!/usr/bin/env python3
    #
    # uses the library https://github.com/5j9/wikitextparser
    import sys
    import wikitextparser as wtp
    
    def is_float_or_complex(value):
        try:
            float(value)
            return True
        except:
            return False
        try:
            complex(value)
            return True
        except:
            return False
    
    def wrap_translate(string):
        if string.endswith(('}}', '</translate>')) or (len(string) < 2 and not string.isnumeric()):
            return string
        elif string.isnumeric() or is_float_or_complex(string):
            if string.isnumeric():
                format_end = '|NOSEP}}'
            else:
                format_end = '}}'
            # Add bdi element so minuses will stay in place with RTL languages
            if string[0] == '-':
                return ' <bdi>{{formatnum:' + string + format_end + '</bdi> '
            else:
                return ' {{formatnum:' + string + format_end + ' '
        else:
            return ' <translate>' + string + '</translate> '
    
    with open(sys.argv[1]) as f:
        doc = f.read()
    
    p = wtp.parse(doc)
    tables = p.get_tables()
    
    for t in tables:
        if t.caption:
            caption = t.caption.strip()
            if len(caption) > 0:
                t.caption = wrap_translate(caption)
        for row in t.cells():
            for cell in row:
                c = cell.value.strip()
                if len(c) > 0:
                    cell.value = wrap_translate(c)
    
    with open(sys.argv[1], 'w') as f:
        f.write(p.string)
    
    

    Migrating old translated content to the current system

    In the past, TDF wiki employed a translation process that used templates called OrigLang and Lang. The templates displayed a menu that linked the source page with the translated ones. You can find all the translated content that use the Lang template in this list: Special:WhatLinksHere/Template:Lang. Likewise, you can list the pages with OrigLang template.

    Translate extension has a migration tool, which helps in moving already translated content to the new system. If the source and translation blocks match exactly, the migration will be very easy. Otherwise you have to cut and paste strings between the input boxes.

    The migration goes as follows:

    1. After marking a page for translation, wait for some minutes, so the server will have processed the page
    2. Navigate to Special:PageMigration
    3. In the input box, input the language path of the page you want to migrate, like: Mypath/Mypage/de for some imaginary German translation
    4. Click the Import button
    1. Clean up the contents in the input boxes containing the old translations (for example, remove any useless menu templates)
    2. In the column with the translations, you can't leave empty or extra input boxes at the end, so delete them by clicking the trashcan icon next to them
    3. After you cleaned up and put everything in order, click the Save button

    Remember that you can always view the old version of a translated page using its View history link and clicking on an old revision.

    If you want to view the source of an old revision, copy its link from the history and visit the link after adding this to the end:

    &action=edit

    Sometimes it does not make sense to use the migration tool. Leaving wiki markup outside the translate elements often confuses the tool. In these cases, the suggestions presented by the translation memory can be more useful.

    Messages in the Sidebar

    To translate the messages ”Get Involved” and ”Support LibreOffice!”, you need to send the translations to one of the wiki administrators. The others are system messages which are translated in upstream MediaWiki.

    The translation of the additional Sidebar elements has been set up using the steps in the Translate extension help page for unstructured element translation. The administrators just need to visit Special:Translate/wiki-sidebar in order to translate the messages.

    The ”Main Page” and ”Get Involved” links use the Special:MyLanguage prefix, which makes them direct to a translated page, if it is available.