- # Check space at the end of a message
- if ( ( $msgid =~ m/ *?(\|.*)?$/ ) != ( $msgstr =~ m/ *?(\|.*)?$/ ) ) {
+ # Check space at the end of a message (if not a shortcut)
+ my ($msgid1, $msgstr1) = ($msgid, $msgstr);
+ $msgid1 =~ s/\|.$//;
+ if ($msgstr =~ /^(.*)\|(.+)$/) {
+ my ($msg, $shortcut) = ($1, $2);
+ # Check for unicode char
+ my $u = decode('utf-8', $shortcut);
+ if (length($u) == 1) {
+ $msgstr1 = $msg;
+ }
+ }
+ if (($msgid1 =~ / $/) != ($msgstr1 =~ / $/)) {