Support » Plugin: Ultimate Tag Cloud Widget » make '%d topics' text for the title translatable

  • Resolved andamira


    Hi, first of all, thank you for your fantastic plugin,

    I found some untranslatable text. The text that shows the number of topics of the labels is hardcoded and therefore can’t be translated using gettext.

    To fix that, in the file src/Render.php:251 these two lines:

    $term_title_singular = $this->plugin->applyFilters('utcw_render_term_title_singular', '%d topic');
                    $term_title_plural   = $this->plugin->applyFilters('utcw_render_term_title_plural', '%d topics');

    should be:

    $term_title_singular = $this->plugin->applyFilters('utcw_render_term_title_singular', __('%d topic', 'utcw') );
                    $term_title_plural   = $this->plugin->applyFilters('utcw_render_term_title_plural', __('%d topics','utcw') );

    Tested after that change and it works

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Rickard Andersson


    Thanks, will include it in the next version.

    Just looked closer at this now, you should be able to translate the strings passed to _n() here:

    $title = _n($term_title_singular, $term_title_plural, $term->count);

    However domain is missing so I will add that there instead of your suggested solution.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘make '%d topics' text for the title translatable’ is closed to new replies.