Index: wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php
===================================================================
--- wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php	(revision 5727)
+++ wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-i18n.php	(working copy)
@@ -406,14 +406,18 @@
 	 * @return mixed
 	 */
 	public function translate_gp_original( $original, $translation, $content ) {
+		$original = preg_quote( $original, '/' );
+
 		if ( false === strpos( $content, '<' ) ) {
-			$content = str_replace( $original, $translation, $content );
+			// Don't use $translation, it may contain backreference-like characters.
+			$content = preg_replace( "/\b{$original}\b/", '___TRANSLATION___', $content );
 		} else {
-			$original = preg_quote( $original, '/' );
-			$content  = preg_replace( "/(<([a-z0-9]*)\b[^>]*>){$original}(<\/\\2>)/m", '${1}___TRANSLATION___${3}', $content ); // Don't use $translation, it may contain backreference-like characters.
-			$content  = str_replace( '___TRANSLATION___', $translation, $content );
+			// Don't use $translation, it may contain backreference-like characters.
+			$content = preg_replace( "/(<([a-z0-9]*)\b[^>]*>){$original}(<\/\\2>)/m", '${1}___TRANSLATION___${3}', $content );
 		}
 
+		$content = str_replace( '___TRANSLATION___', $translation, $content );
+
 		return $content;
 	}
 
