Home / Forums / DynamiX Support / Better localization of archives

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts

  • Pavel
    Participant

    Could you please change the way of localization of archive titles?

    Current:
    <?php _e('Archive for ', 'NorthVantage' ); ?> ‘<?php single_cat_title(); ?>’

    Expected:
    <?php printf( __( 'Archive for ‘%s’', 'NorthVantage' ), single_cat_title() ); ?>

    Translators can easily change order of words and apostrophes.
    It would be nice to change it for all archive titles and breadcrumbs.
    Thank you very much!


    Tom ( Support)
    Keymaster

    Thanks, I will pass this on to Andy.


    Pavel
    Participant

    Thank you, but I found another problem:

    File lib/inc/classes/post-title-class.php, line 19:

    echo '<h2> 0) ) .'">'. htmlspecialchars( $NV_posttitle ) .'</h2>';

    String “Permanent Link to…” is not allowed for localization.

    Thank you for your help!


    Tom ( Support)
    Keymaster

    Hi,

    Do you mean the actual title of the link? If so, Andy will get this rectified.

    Kind regards,
    Tom


    Tom ( Support)
    Keymaster

    Hi,

    Do you mean the actual title of the link? If so, Andy will get this rectified.

    Kind regards,
    Tom

    Andy
    Andy
    Keymaster

    Hi Pavel,

    I’ve updated the file here:

    http://help.themeva.com/tmp/post-title-class.php.zip ( unzip and place into DynamiX/lib/inc/classes/ )


    Pavel
    Participant

    Hi,

    thank you!
    I really appreciate your support.
    But there is better way with sprintf() function, see for example here (Twenty Twelve):

    http://core.trac.wordpress.org/browser/tags/3.5.2/wp-content/themes/twentytwelve/content.php#L23

    And could you please also repair archive.php file with printf() function? See for example here (Twenty Twelve):

    http://core.trac.wordpress.org/browser/tags/3.5.2/wp-content/themes/twentytwelve/category.php#L21

    It would be really great for translators…

    Thank you very much!

    Andy
    Andy
    Keymaster

    Hi,

    Thank you for bringing this to my attention, I’m currently re-doing a few areas like this to fall inline with the standards. The next version will use the sprintf function instead.


    Pavel
    Participant

    Great, thank you!

    In current 3.0.5 there are some other problems:

    archive.php, line 72: Two spaces in string “Archive for ” + missing #8216 entity (there is only #8217 in the end).

    lib/inc/breadcrumbs.php, beginning line 24: There are untranslatable entities #39.

    Andy
    Andy
    Keymaster

    I’ve changed the “Archive for” now and removed the quotes, you can add your own in now if required. It now looks like this:

    if ( is_day() ) :
    printf( __( 'Daily Archives: %s', 'themeva' ), '<span>' . get_the_date() . '</span>' );
    elseif ( is_month() ) :
    printf( __( 'Monthly Archives: %s', 'themeva' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'themeva' ) ) . '</span>' );
    elseif ( is_year() ) :
    printf( __( 'Yearly Archives: %s', 'themeva' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'themeva' ) ) . '</span>' );
    elseif ( is_category() ) :
    printf( __( 'Archive For: %s', 'themeva' ), '<span>' . single_cat_title( '', false ) . '</span>' );
    else :
    _e( 'Archives', 'themeva' );
    endif;

    I can’t see the error with breadcrumbs.php – I’ve ran it through POEDIT and I do not receive this error?

    Andy
    Andy
    Keymaster

    If you require quote still, you could have:

    printf( __( 'Archive For " %s "', 'themeva' ), '<span>' . single_cat_title( '', false ) . '</span>' );


    Pavel
    Participant

    Nice, thank you very much!

    I am not sure about textdomain? It used to be “Nortvantage” and not “themeva”?

    Ad breadcrumbs.php: There is no error, only problems with localization, please see lines 25, 27 and 32. There are quotes represented by entity #39 and we would like to change/remove it. It would be helpfull to include this entity into localizable string. It is the same example as above, instead of using:

    __('Archive by category ', 'NorthVantage' )

    it would be better to use printf() and include quotes and category into one localizable string.

    Thank you for your help.


    Pavel
    Participant

    Localization of archives was fixed in 3.1, but breadcrumbs are still wrong. Could you please use printf() for localization and remove/include entities #39 ? Thank you very much!


    Tom ( Support)
    Keymaster

    Hi Pavel,

    Andy will fix this and provide the fix tomorrow.

    Kind regards,
    Tom

    Andy
    Andy
    Keymaster

    Hi Pavel,

    Please try this file for breadcrumbs.

    http://help.themeva.com/tmp/breadcrumbs.php.zip

    Replace:

    DynamiX/lib/inc/breadcrumbs.php

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.