• Hi,
    I’m one of the GTE:s (translation editors) for WordPress in Swedish.
    I just noted that a string in WP spamshield is composed in a way that makes it look strange for translators.
    I’m referring to https://plugins.trac.wordpress.org/browser/wp-spamshield/trunk/includes/admin-settings.php#L327
    i.e. echo '<br />'.WPSS_EOL.'<span style="color:red;"><strong>' . sprintf( __( 'The log file may not be writeable. You may need to manually correct the file permissions.<br />Set the permission for the "%1$s" directory to "%2$s" and all files within it to "%3$s".</strong><br />If that doesn\'t work, then please read the <a href="%4$s" %5$s>FAQ</a> for this topic.', 'wp-spamshield' ), WPSS_PLUGIN_DATA_PATH, '755', '644', rs_wpss_append_url( WPSS_HOME_URL.'faqs/?faqs=5#faqs_5' ), 'target="_blank"' ) . '</span><br />'.WPSS_EOL;

    The problem here is that you’ve put the tag <strong> outside of the string to be translated. This means that a correct translation should include the end tag, but the translator won’t see the beginning of this tag pair. There are two ways to fix:
    1. (preferred). Break this rather long string into two separate strings and place the formatting outside of the strings.
    2. (also ok). Move the start tag into the string to be translated, thus achieving tag balance inside the string.

  • The topic ‘Confusing string composition’ is closed to new replies.