WordPress.org

Ready to get started?Download WordPress

Forums

Limit Login Attempts
Translation not showing: Must-Use Plugins (4 posts)

  1. topherhota
    Member
    Posted 1 year ago #

    I am experiencing an issue whereby the default (English) text is loaded for a site in Hungarian. The proper translation files are in place.

    Troubleshooting attempts:
    1) Thought the translation file may have worked if moved to /wp-content/languages, so I moved limit-login-attempts-hu_HU.mo and limit-login-attempts-hu_HU.po to the /wp-content/languages/ directory. This had no effect.
    2) On the outside chance it was a permissions issue, I changed the ownership from nobody:nogroup to www-data:www-data. This, also, had no effect.

    I suspect the fact that this is a "Must-Use" plugin may be the culprit; since the folder is a bit different. (/wp-content/mu-plugins/ vs /wp-content/plugins/).

    Please advise!

    http://wordpress.org/extend/plugins/limit-login-attempts/

  2. topherhota
    Member
    Posted 1 year ago #

  3. topherhota
    Member
    Posted 1 year ago #

    The following DIFF shows a fix (for the must-use). This should be wrapped in an if-test to see if the plugin is loaded from plugins or mu-plugins, though. Again, please advise.

    97c97,98
    < load_muplugin_textdomain('limit-login-attempts', dirname(plugin_basename(__FILE__)));
    ---
    > load_plugin_textdomain('limit-login-attempts', false
    > , dirname(plugin_basename(__FILE__)));
    1011d1011
    < <p>dirname(plugin_basename(__FILE__)) Is Currently: <?php echo dirname(plugin_basename(__FILE__)); ?></p>
    1124c1124
    < ?>
    ---
    > ?>
    \ No newline at end of file

  4. CliffAscent
    Member
    Posted 1 year ago #

    Change the lines starting at 97 from;

    load_plugin_textdomain('limit-login-attempts', false, dirname(plugin_basename(__FILE__)));

    to be the following;

    /* If in the mu-plugins directory, load_muplugins_textdomain for internationalization. */
    if ( dirname(plugin_dir_path(__FILE__)) == WPMU_PLUGIN_DIR ) {
    	load_muplugin_textdomain('limit-login-attempts', dirname(plugin_basename(__FILE__)));
    }
    /* If in normal plugins directory, load_plugins_textdomain for internationalization. */
    else {
    	load_plugin_textdomain('limit-login-attempts', false, dirname(plugin_basename(__FILE__)));
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic