Problemas de traducción en archivo comments.php utilizando .PO

  • Autor Autor Damin
  • Fecha de inicio Fecha de inicio
D

Damin

Curioso
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Que tal, tengo el archivo comments.php y la traducción que hice manualmente del es_AR del .po.

Bien, me traduce todo salvo unas lineas de las cuales no puedo encontrar el porque, nose si es que tengo el cerebro quemado ya o que, pero hace horas que estoy tratando de encontrarle la vuelta de tuerca y no lo logro.

Traduce bien excepto estas lineas:

Código:
Insertar CODE, HTML o PHP:
[LEFT] <h3 class="comments-h"><?php printf( _n( '1 Response', '%1$s Responses', get_comments_number(), 'cherry' ),
[/LEFT]
 
 Código: [LEFT] <?php
// Do not delete these lines
    if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
        die ('Please do not load this page directly. Thanks!');

    if ( post_password_required() ) { ?>
      <?php echo '<p class="nocomments">' . __('This post is password protected. Enter the password to view comments.', 'cherry') . '</p>'; ?>
    <?php
        return;
    }
?>
<!-- BEGIN Comments -->    
    <?php if ( have_comments() ) : ?>
    <div class="comment-holder">
        <h3 class="comments-h"><?php printf( _n( '1 Response', '%1$s Responses', get_comments_number(), 'cherry' ),
                number_format_i18n( get_comments_number() ), '' );?></h3>
        <ol class="comment-list">
            <?php wp_list_comments('type=comment&callback=mytheme_comment'); ?>
        </ol>
    </div>
    <?php else : // this is displayed if there are no comments so far ?>

    <?php if ( comments_open() ) : ?>
            <!-- If comments are open, but there are no comments. -->
       <?php echo '<p class="nocomments">' . __('No Comments Yet.', 'cherry') . '</p>'; ?>
        <?php else : // comments are closed ?>
            <!-- If comments are closed. -->
       <?php echo '<p class="nocomments">' . __('Comments are closed.', 'cherry') . '</p>'; ?>

        <?php endif; ?>
    
    <?php endif; ?>
    

    <?php if ( comments_open() ) : ?>

    <div id="respond">

    <h3><?php comment_form_title( _e('Leave a reply','cherry')); ?></h3>

    <div class="cancel-comment-reply">
        <small><?php cancel_comment_reply_link(); ?></small>
    </div>

    <?php if ( get_option('comment_registration') && !is_user_logged_in() ) : ?>
    <p><?php _e('You must be', 'cherry'); ?> <a href="<?php echo wp_login_url( get_permalink() ); ?>"><?php _e('logged in', 'cherry'); ?></a> <?php _e('to post a comment.', 'cherry'); ?></p>
    <?php else : ?>

    <form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">

    <?php if ( is_user_logged_in() ) : ?>

    <p><?php _e('Logged in as', 'cherry'); ?> <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="<?php _e('Log out of this account', 'cherry'); ?>"><?php _e('Log out &raquo;', 'cherry'); ?></a></p>

    <?php else : ?>

    <p class="field"><input type="text" name="author" id="author" value="<?php _e('Name', 'cherry'); ?><?php if ($req) _e('*', 'cherry'); ?>" onfocus="if(this.value=='<?php _e('Name', 'cherry'); ?><?php if ($req) _e('*', 'cherry'); ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?php _e('Name', 'cherry'); ?><?php if ($req) _e('*', 'cherry'); ?>'}" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> /></p>

    <p class="field"><input type="text" name="email" id="email" value="<?php _e('Email (will not be published)', 'cherry'); ?><?php if ($req) _e('*', 'cherry'); ?>" onfocus="if(this.value=='<?php _e('Email (will not be published)', 'cherry'); ?><?php if ($req) _e('*', 'cherry'); ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?php _e('Email (will not be published)', 'cherry'); ?><?php if ($req) _e('*', 'cherry'); ?>'}" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> /></p>

    <p class="field"><input type="text" name="url" id="url" value="<?php _e('Website', 'cherry'); ?>" onfocus="if(this.value=='<?php _e('Website', 'cherry'); ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?php _e('Website', 'cherry'); ?>'}" size="22" tabindex="3" /></p>

    <?php endif; ?>

    <!--<p><small><strong>XHTML:</strong> You can use these tags: <code><?php echo allowed_tags(); ?></code></small></p>-->

    <p><textarea name="comment" id="comment" cols="58" rows="10" tabindex="4" onfocus="if(this.value=='<?php _e('Your comment*', 'cherry'); ?>'){this.value=''}" onblur="if(this.value==''){this.value='<?php _e('Your comment*', 'cherry'); ?>'}"><?php _e('Your comment*', 'cherry'); ?></textarea></p>

    <p><input name="submit" type="submit" class="btn btn-primary" id="submit" tabindex="5" value="<?php _e('Submit Comment', 'cherry'); ?>" />
    <?php comment_id_fields(); ?>
    </p>
    <?php do_action('comment_form', $post->ID); ?>

    </form>

    <?php endif; // If registration required and not logged in ?>
    </div>
    

<!-- END Comments -->

<?php endif; ?>
[/LEFT]


En el medio tengo otros fields que si me traduce como "Name" (Nombre) y "Website" (Sitio Web).

Estas son las lineas del .PO

Código:
Insertar CODE, HTML o PHP:
 [LEFT] #: ../comments.php:62
msgid "Name"
msgstr "Nombre"

#: ../comments.php:62 ../comments.php:64
msgid "(required)"
msgstr "(requerido)"

#: ../comments.php:64
msgid "Mail"
msgstr "E-mail"

#: ../comments.php:64
msgid "(will not be published)"
msgstr "(no será publicado)"

#: ../comments.php:66
msgid "Website"
msgstr "Sitio web"

#: ../comments.php:72
msgid "Message"
msgstr "Tu Mensaje"
[/LEFT]


Si traduzco directamente dentro del archivo .php funciona de 10, pero la gracia del .PO es que lo haga automatico sin tener que ver archivo por archivo.

Desde ya, muchas gracias como siempre!!
 
que usas poedit?... le diste escanear todas los archivos a ver si te encuentra las que faltan?
 
Si, al final recargue todo desde los archivos fuente y me aparecieron ahora, solucione eso del formulario de comentarios, pero hay otras páginas como single.php y post-meta.php que por mas que agregue las lineas sigue sin traducir. Ya tengo los ojitos achinados.

Tengo esto así:
Lo unico que si traduce es la linea que dice "Permalink" por "Link permanente" en este caso, yo agregué manualmente las otras lineas y no me las traduce, probe borrando caché, etc, nose que es lo que hago mal, soy medio novato, pero no creo escribiendo mal los códigos...
Insertar CODE, HTML o PHP:
#: ../includes/post-formats/post-meta.php:7
msgid "Permalink"
msgstr "Link permanente"

#: ../includes/post-formats/post-meta.php:5
msgid "No comments"
msgstr "Sin comentarios"

#: ../includes/post-formats/post-meta.php:5
msgid "1 comment"
msgstr "1 comentario"

#: ../includes/post-formats/post-meta.php:5
msgid "% comments"
msgstr "% comentarios"

#: ../includes/post-formats/post-meta.php:5
msgid "Comments are closed"
msgstr "No se puede comentar"

Este es el post-meta.php

Insertar CODE, HTML o PHP:
<?php $post_meta = of_get_option('post_meta'); ?>
<?php if ($post_meta=='true' || $post_meta=='') { ?>
    <!-- Post Meta -->
    <div class="post_meta">
        <span class="post_category"><i class="icon-bookmark"></i><?php the_category(', ') ?></span><span class="post_date"><i class="icon-calendar"></i><time datetime="<?php the_time('Y-m-d\TH:i:s'); ?>"><?php the_time('F j, Y'); ?></time></span><span class="post_author"><i class="icon-user"></i><?php the_author_posts_link() ?></span><span class="post_comment"><i class="icon-comments"></i><?php comments_popup_link('No comments', '1 comment', '% comments', 'comments-link', 'Comments are closed'); ?></span>
        
        <span class="post_permalink"><i class="icon-link"></i><a href="<?php the_permalink(); ?>" title="<?php _e('Permalink to:', 'cherry');?> <?php the_title(); ?>"><?php _e('Permalink', 'cherry') ?></a></span>
    </div>
    <!--// Post Meta -->
<?php } ?>

y de single.php tengo esto en el .po

Insertar CODE, HTML o PHP:
#: ../single.php:18
msgid "Written by"
msgstr "Escrito por"
Esto si lo traduce pero lo que agregue debajo no...

este es el single.php

Insertar CODE, HTML o PHP:
<?php get_header(); ?>

<div class="container container_single_post">

    <div class="row">        

        <div id="content" class="span8 <?php echo of_get_option('blog_sidebar_pos') ?> clearfix">            

            <div class="wrapper">

                <?php if (have_posts()) : while (have_posts()) : the_post();                 

                    // The following determines what the post format is and shows the correct file accordingly

                    $format = get_post_format();

                    get_template_part( 'includes/post-formats/'.$format );                    

                    if($format == '')

                        get_template_part( 'includes/post-formats/standard' );

                        get_template_part( 'includes/post-formats/share-buttons' );

                        wp_link_pages('before=<div class="pagination">&after=</div>');

                ?>

            </div>

            <?php /* If a user fills out their bio info, it's included here */ ?>

              <div class="post-author clearfix">

                <h3 class="post-author_h"><?php _e('Written by', 'cherry'); ?> <?php the_author_posts_link() ?></h3>

                <p class="post-author_gravatar"><?php if(function_exists('get_avatar')) { echo get_avatar( get_the_author_meta('email'), '80' ); /* This avatar is the user's gravatar (http://gravatar.com) based on their administrative email address */  } ?></p>

                <div class="post-author_desc">

                  <?php the_author_meta('description') ?> 

                      <div class="post-author_link">

                        <p>View all posts by: <?php the_author_posts_link() ?></p>

                      </div>

                </div>

              </div><!--.post-author-->

              

              <?php get_template_part( 'includes/post-formats/related-posts' ); ?>            

            <?php comments_template('', true); ?>                       

            <?php endwhile; endif; ?>

        </div><!--#content-->        

    <?php get_sidebar(); ?>    

    </div><!--.row-->

</div><!--.container-->  

<?php get_footer(); ?>
Yo quiero traducir "<p>View all posts by: <?php the_author_posts_link() ?></p>"

Agradezco muchisimo tu tiempo y tu respuesta, estuve volviendome loco, posteando en foros que solo leen y nadie responde, al fin encontre uno que me ayudo a solucionar, jeje.

Gracias!
 
Atrás
Arriba