Category label not shown in single event view

Home Forums Calendar Products Events Calendar PRO Category label not shown in single event view

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #998208
    Oliver
    Participant

    Hi,

    in the latest version of TEC I might found a bug in the single event view.

    The category label is not shown when there is more that one category selected.

    Example:
    A) Only one category (works):
    https://www.dropbox.com/s/nvs7q0mc4n4p1sg/Screenshot%202015-08-22%2023.12.36.png?dl=0
    https://www.dropbox.com/s/js1hxf6rgyhemd5/Screenshot%202015-08-22%2023.13.23.png?dl=0

    B) More than one category (don’t work):
    https://www.dropbox.com/s/zb9bzz218xb3l3k/Screenshot%202015-08-22%2023.14.16.png?dl=0
    https://www.dropbox.com/s/hucvmcocrpds36l/Screenshot%202015-08-22%2023.14.42.png?dl=0

    Do you have any idea how to fix this?

    Best regards,
    Oliver

    #998390
    Barry
    Member

    Hi Oliver,

    This seems to be a translation problem.

    In this particular scenario, we try to pull in the translation of %s Categories with an _n() call (which lets us switch between singular and plural forms).

    However, although we do have a translation in most languages – German included – for %s Categories it has not been setup in such a way that it can be used through _n(). I don’t see an obvious way to get around this on our translation site and it may be we need to reconfigure a couple of things on our end before we can make that happen.

    Please bear with me and we’ll see what we can do to fix this 🙂

    #998476
    Barry
    Member

    Hi Oliver,

    A change to how we use that string within the code should be available in the next release – allowing it to be correctly translated. Until then, could you add this snippet to your theme’s functions.php file (or some other suitable location) and see if that helps?

    function temp_fix_998208( $text ) {
    	return str_replace( '<dt>:</dt>', '<dt>EVENT CATEGORIES:</dt>', $text );
    }
    
    add_filter( 'tribe_get_event_categories', 'temp_fix_998208' );

    Of course, modify EVENT CATEGORIES to whatever makes sense here.

    #998517
    Oliver
    Participant

    Hi Barry!

    That works like a charm! Thanks for the quick bugfix!

    Cheers,
    Oliver

    #998528
    Barry
    Member

    My pleasure (and apologies for the inconvenience) 🙂

    #1002871
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Category label not shown in single event view’ is closed to new replies.