• Resolved qwertysimo

    (@qwertysimo)


    Hi, I have finished Slovak translation but there is a problem. Some strings remain in English on live site although they are translated in po/mo file. To be specific, these remain in English:

    – plugin description
    – descriptions of both widgets
    – substituted {ACTION} in notification email

    I tried reactivate the plugin but no help. Any idea what to try? Thanks.

    http://ww.wp.xz.cn/extend/plugins/subscribe2/

Viewing 15 replies - 16 through 30 (of 37 total)
  • @qwertysimo,

    All of your translated strings worked fine when I rested last night. Have you tried a different theme? Sometimes themes cache regular core and plugin code output.

    Thread Starter qwertysimo

    (@qwertysimo)

    A different theme? I am new to WordPress, but how does theme affect administrator interface?

    When I open Appearance -> Widgets, I see English description of your widgets.

    As I use other installed plugins providing widgets and their descriptions are translated, I do not think this issue is related to theme selection neither caching. See this screencapture of my admin UI. Picture

    Descriptions in green boxes belong to plugins I installed after WP installation. If I change them in their .po/.mo file, they appear updated after browser refresh.

    Any other tip?

    @qwertysimo,

    Themes can sometimes affect the admin area if they globally load code into the header, either because the theme code doesn’t check it’s not the admin interface on loading and uses a WordPress hook that works in both the front end and admin (like ‘init’ or because the theme has it’s own admin page but loads code on all admin pages instead of just the new page created for the theme.

    I saw translation in those places when I used your translation file with the WordPress TwentyThirteen theme and the developmental 3.6 code.

    I’ll double check again tonight with WordPress 3.5.1 and post some screen shots tonight.

    Thread Starter qwertysimo

    (@qwertysimo)

    Thanks for explanation. I just wonder, if couple of other plugins work as expected in my theme (Responsive) in my WP installation, why your plugin does not work in the same theme and WP installation… I hope you see my point.

    OK, let me know your findings please.

    @qwertysimo,

    I quite understand your point but individual plugins are usually only tested with a very small number of other plugins and themes (usually those used by the plugin author).

    I don’t use Responsive and therefore haven’t tested with it. It is one known difference between your site (where the translations don’t work as expected) and my test site (where it does work) so it needs to be checked and hopefully excluded.

    Thread Starter qwertysimo

    (@qwertysimo)

    Yesterday I wrote this my third post above:
    “today I tried to install original English package for WordPress, with new database schema and tables, but still no progress.”

    If your plugin has issues described in this discussion, which are present in clean WordPress installation with default Twenty Twelve theme, can you unveil what theme you are using? I can do another clean WP installation with your theme to see if it helps.

    Thanks a lot.

    @qwertysimo,

    I think I was using the development code (so WordPress 3.6) and the development theme called TwentyThirteen.

    I will check again on my test install using WordPress 3.5.1 and using Twenty Twelve and Responsive later today.

    Thread Starter qwertysimo

    (@qwertysimo)

    OK. Thanks. Meanwhile, I put “print_r( $widget_options )” into function S2_Counter_widget() (after $widget_options assignment) in counterwidget.php and the output was:

    Array ( [classname] => s2_counter [description] => Subscriber Counter widget for Subscribe2 )

    For some reason, __(‘Subscriber Counter widget for Subscribe2’, ‘subscribe2’) does not pick up translation.

    I will install latest dev code tonight to test as well.

    Thread Starter qwertysimo

    (@qwertysimo)

    WP 3.6 beta 1 + Twenty Thirteen + Subscribe2 8.9.1 (with sk_SK) = this picture

    Browser cache cleared, new DB created, new subdomain created, fresh downloaded and installed…

    @qwertysimo,

    In my testing so far:
    Subscribe2 8.9.1 & WordPress 3.5.1 = Widget descriptions still in English
    Subscribe2 9.0 (dev) & WordPress 3.5.1 = Widget descriptions still in English

    Subscribe2 8.9.1 & WordPress 3.6 = Widget descriptions still in English
    Subscribe2 9.0 (dev) & WordPress 3.6 = Widget descriptions still in Slovakian

    Currently, I cannot find any meaningful differences in my code between 8.9.1 and 9.0 to explain why 9.0 works and I am not sure what might have changed (if anything) in the core between 3.5.1 and 3.6 that could explain it either.

    @qwertysimo,

    Okay, Im tired and my head is spinning after a long day and also having 2 browsers with 4 windows each of my WordPress dev sites open but this seems to be working on all of the combinations listed above. In the class-s2-core.php file fine these lines:

    add_action('init', array(&$this, 'load_translations'), 5);
    add_action('init', array(&$this, 'load_strings'));

    Change them to:

    add_action('plugins_loaded', array(&$this, 'load_translations'), 5);
    add_action('plugins_loaded', array(&$this, 'load_strings'));
    Thread Starter qwertysimo

    (@qwertysimo)

    Your fix works. Good job and good luck with future releases.

    @qwertysimo,

    Great, thanks for confirming. I’ll make sure to push that change into the next release version of the code.

    Thread Starter qwertysimo

    (@qwertysimo)

    Hi again,

    I found another issue. I reduced it to this minimal scenario:

    • clean WP 3.5.1 installation with WPLANG = sk_SK; tested with Twenty Twelve and Responsive themes
    • activated Subscribe2 8.9.1 plugin with two implemented modifications discussed previously in this post; with sk_SK .po/.mo files in root
    • enabled and added Subscribe2 widget to sidebar
    • Polylang 1.0.4 plugin

    When Polylang plugin is not active, your widget shows translated message (original: “You may manage your subscription options from your … profile”). Great, as expected.

    When I activate Polylang plugin, your widget suddenly shows English message.

    Now I go to Polylang settings and add new language, sk_SK in my case.

    I expected that your widget now shows translated message but it does not. I cannot make it to show translation. I assume it is related to language code reading…

    If you deactivate Polylang plugin, your widget picks up translation.

    Please, don’t say it is a cache issue or theme issue. Other widgets I use correctly show messages based on current language set by Polylang language switcher. Please, can you investigate your code and identify the issue? Thanks.

    Thread Starter qwertysimo

    (@qwertysimo)

    I suspect that none of strings read in function load_strings() in class-s2-core.php picks up translation.

    (That is why I reported English string for {ACTION} variable. Now I see this string is declared in this function as well.

    When I was testing reported issues a day ago, I did not install Polylang plugin – hence it seemed everything was OK.)

Viewing 15 replies - 16 through 30 (of 37 total)

The topic ‘[Plugin: Subscribe2] Localization problems’ is closed to new replies.