Support » Theme: Celestial - Lite » Date format will not be translated – and the solution

  • Resolved joru


    First of all: Thanks for the nice theme

    I think I’ve found a bug during my translation process. The date format in blog pages is not prepared for translation. In my case I want to change the default ‘F j, Y’ to ‘j. M Y’. The string is in the .pot file but translating the string does not change anything.
    Looking in the source I relaized that the date format string is not prepared for translating.
    So I made the following changes:
    content.php, line 31
    <span><?php the_date('F j, Y, __('Date: ', 'celestial') ); ?></span>
    <span><?php the_date(__('F j, Y', 'celestial'), __('Date: ', 'celestial') ); ?></span>
    content-single.php, line 25
    <span><?php the_date('F j, Y', __('Date: ', 'celestial') ); ?></span>
    <span><?php the_date(__('F j, Y', 'celestial'), __('Date: ', 'celestial') ); ?></span>

    Maybe you can integrate that in further updates.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Styled Themes


    Thank you for that effort, I will apply that to my next update (which is coming up shortly). Thanks again Joerg.

    Found a third date format string
    content-single.php, line 52
    <?php the_modified_date( __('F j, Y', 'celestial'), __( '<span class="modified-date">Last Modified: </span> ', 'celestial') ); ?>
    Maybe there are some more

    There is also an error in the language file. In functions.php, line 576, you use the function
    _x( 'Comment', 'noun', 'celestial' )
    But the correspondent
    msgctxt "noun"
    in the language file is missing. Should be inserted after line 286 in celestial.pot. So that it looks like

    #: functions.php:573
    msgctxt "noun"
    msgid "Comment"
    msgstr ""

    Not sure if you use _x() somewhere else.

    Hope that helps.

    Theme Author Styled Themes


    I’m actually working on an update right now. There are a couple other locations with the date strong as well. Thanks for the update.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Date format will not be translated – and the solution’ is closed to new replies.