View | Details | Raw Unified | Return to bug 11631
Collapse All | Expand All

(-)a/misc/translator/xgettext.pl (-5 / +1 lines)
Lines 37-42 sub string_negligible_p ($) { Link Here
37
	    || $t =~ /^\d+$/			# purely digits
37
	    || $t =~ /^\d+$/			# purely digits
38
	    || $t =~ /^[-\+\.,:;!\?'"%\(\)\[\]\|]+$/ # punctuation w/o context
38
	    || $t =~ /^[-\+\.,:;!\?'"%\(\)\[\]\|]+$/ # punctuation w/o context
39
	    || $t =~ /^[A-Za-z]$/		# single letters
39
	    || $t =~ /^[A-Za-z]$/		# single letters
40
        || $t =~ /^(&rsaquo;|&nbsp;|%%|%s|\s|\d|\.|,|;|:|\?|\!|\*|#|-|\+|=|~|<|>|\||\/|\\|\(|\)|\[|\]|\{|\}|"|')*$/ # placeholder,punct, ...
40
	)
41
	)
41
}
42
}
42
43
Lines 91-100 sub text_extract (*) { Link Here
91
        my $s = TmplTokenizer::next_token $h;
92
        my $s = TmplTokenizer::next_token $h;
92
        last unless defined $s;
93
        last unless defined $s;
93
        my($kind, $t, $attr) = ($s->type, $s->string, $s->attributes);
94
        my($kind, $t, $attr) = ($s->type, $s->string, $s->attributes);
94
        my $tmpt = $t;
95
        # If msgid contains only placeholders and/or spaces, ignore it
96
        $tmpt =~ s/(%s|\s)//g;
97
        next if ($tmpt eq "");
98
95
99
        if ($kind eq C4::TmplTokenType::TEXT) {
96
        if ($kind eq C4::TmplTokenType::TEXT) {
100
	    if ($t =~ /\S/s && $t !~ /<!/){
97
	    if ($t =~ /\S/s && $t !~ /<!/){
101
- 

Return to bug 11631