Support » Plugin: Quotes Collection » [Plugin: Quotes Collection] [Bug] "Next quote" never translated

  • Hello, there is a tiny bug regarding the translation of particular string: “Next quote”.

    Since you have

    $quotescollection_next_quote = __(‘Next quote’, ‘quotes-collection’).’ »’;

    at the very top of your plugin, you call the __ function before the init hook is actually invoked. Therefore, at that point the dictionaries haven’t been loaded yet, and the string “Next quote” doesn’t get translated.

    To fix it, I changed the line above to a simple

    $quotescollection_next_quote = NULL;

    Then I added this

    global $quotescollection_next_quote;
    $quotescollection_next_quote = __(‘Next quote’, ‘quotes-collection’).’ »’;

    right after

    load_plugin_textdomain(‘quotes-collection’, ‘wp-content/plugins/quotes-collection/languages/’);

    I should have probably filed a bug somewhere and proposed a decent patch, but I am in kinda rush 🙂



Viewing 3 replies - 1 through 3 (of 3 total)
  • Lucker


    I did a bit easier: just replaced “Next quote” in the quotes collection.php to the local language text and switched encoding in the file to UTF-8. That’s it! Just replace file on the host.



    Should it not be saves as “UTF-8 without BOM”?


    Is there any other way of achieving it?



    Plugin Author Srini G


    This is fixed in v1.4.3. Here’s the changes if anybody is interested.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Quotes Collection] [Bug] "Next quote" never translated’ is closed to new replies.