[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.13,1.14
From: |
Ambrose C. LI |
Subject: |
[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.13,1.14 |
Date: |
Thu, 19 Feb 2004 20:38:05 -0800 |
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18383
Modified Files:
TmplTokenizer.pm
Log Message:
Support %0.0s notation so that we can omit the %s as in Year%s for the
Chinese translation. (This won't work for all languages; ultimately the
English templates must be fixed.)
Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** TmplTokenizer.pm 20 Feb 2004 02:48:39 -0000 1.13
--- TmplTokenizer.pm 20 Feb 2004 04:38:02 -0000 1.14
***************
*** 546,554 ****
$fmt = $';
$it .= '%';
! } elsif ($fmt =~ /^%(?:(\d+)\$)?s/) {
$n += 1;
! my $i = (defined $1? $1: $n) - 1;
$fmt = $';
! $it .= $params[$i]
} elsif ($fmt =~ /^%[^%a-zA-Z]*[a-zA-Z]/) {
$fmt = $';
--- 546,560 ----
$fmt = $';
$it .= '%';
! } elsif ($fmt =~ /^%(?:(\d+)\$)?(?:(\d+)(?:\.(\d+))?)?s/) {
$n += 1;
! my($i, $width, $prec) = ((defined $1? $1: $n), $2, $3);
$fmt = $';
! if (!defined $width && !defined $prec) {
! $it .= $params[$i]
! } elsif (defined $width && defined $prec && !$width && !$prec) {
! ;
! } else {
! die "Unsupported precision specification in format: $&\n"; #XXX
! }
} elsif ($fmt =~ /^%[^%a-zA-Z]*[a-zA-Z]/) {
$fmt = $';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.13,1.14,
Ambrose C. LI <=
- Prev by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/includes issues-top.inc,1.7,1.8
- Next by Date:
[Koha-cvs] CVS: koha/misc/translator intranet.zh_TW,NONE,1.1 opac.zh_TW,NONE,1.1
- Previous by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/includes issues-top.inc,1.7,1.8
- Next by thread:
[Koha-cvs] CVS: koha/misc/translator intranet.zh_TW,NONE,1.1 opac.zh_TW,NONE,1.1
- Index(es):