[Koha-cvs] CVS: koha/misc/translator TmplToken.pm,1.4,1.5 TmplTokenizer.pm,1.30,1.31 intranet.zh_TW,1.19,1.20 opac.zh_TW,1.11,1.12 tmpl_process3.pl,1.15,1.16 xgettext.pl,1.10,1.11

Ambrose C. LI acli at users.sourceforge.net
Fri Feb 27 14:26:10 CET 2004


Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13827

Modified Files:
	TmplToken.pm TmplTokenizer.pm intranet.zh_TW opac.zh_TW 
	tmpl_process3.pl xgettext.pl 
Log Message:
- Consider <INPUT type=text> and <INPUT type=text> part of strings.
- If a string is enclosed by a tag, remove that tag from the extracted string
- Generate automatic comments to provide more information for the translator
- A couple bug fixes


Index: TmplToken.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplToken.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** TmplToken.pm	22 Feb 2004 21:34:40 -0000	1.4
--- TmplToken.pm	27 Feb 2004 13:26:07 -0000	1.5
***************
*** 83,89 ****
  # only meaningful for TEXT_PARAMETRIZED tokens
  # FIXME: DIRECTIVE is not necessarily TMPL_VAR !!
! sub parameters {
      my $this = shift;
!     return map { $_->type == TmplTokenType::DIRECTIVE? $_: ()} @{$this->{'_kids'}};
  }
  
--- 83,92 ----
  # only meaningful for TEXT_PARAMETRIZED tokens
  # FIXME: DIRECTIVE is not necessarily TMPL_VAR !!
! sub parameters_and_fields {
      my $this = shift;
!     return map { $_->type == TmplTokenType::DIRECTIVE? $_:
! 		($_->type == TmplTokenType::TAG
! 			&& $_->string =~ /^<input\b/is)? $_: ()}
! 	    @{$this->{'_kids'}};
  }
  

Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -r1.30 -r1.31
*** TmplTokenizer.pm	25 Feb 2004 08:16:24 -0000	1.30
--- TmplTokenizer.pm	27 Feb 2004 13:26:07 -0000	1.31
***************
*** 485,491 ****
  		&& $t->string =~ /^(?:$re_tmpl_var)$/os)
  	|| ($t->type == TmplTokenType::TAG
! 		&& ($t->string =~ /^<(?:b|em|h[123456]|i|u)\b/is
! #		|| ($t->string =~ /^<input\b/is
! #		    && $t->attributes->{'type'}->[1] =~ /^(?:radio|text)$/is)
  		    ))
  }
--- 485,491 ----
  		&& $t->string =~ /^(?:$re_tmpl_var)$/os)
  	|| ($t->type == TmplTokenType::TAG
! 		&& ($t->string =~ /^<(?:a|b|em|h[123456]|i|u)\b/is
! 		|| ($t->string =~ /^<input\b/is
! 		    && $t->attributes->{'type'}->[1] =~ /^(?:radio|text)$/is)
  		    ))
  }
***************
*** 499,503 ****
  		&& ($t->string =~ /^<\/?(?:a|b|em|h[123456]|i|u)\b/is
  		|| ($t->string =~ /^<input\b/is
! 		    && $t->attributes->{'type'} =~ /^(?:radio|text)$/is)))
  }
  
--- 499,503 ----
  		&& ($t->string =~ /^<\/?(?:a|b|em|h[123456]|i|u)\b/is
  		|| ($t->string =~ /^<input\b/is
! 		    && $t->attributes->{'type'}->[1] =~ /^(?:radio|text)$/is)))
  }
  
***************
*** 529,533 ****
  	   $t->type == TmplTokenType::TAG?
  		   ($t->string =~ /^<a\b/is? '<a>':
! 		    $t->string =~ /^<input\b/is? '<input>':
  		    _quote_cformat($t->string)):
  	       _quote_cformat($t->string);
--- 529,535 ----
  	   $t->type == TmplTokenType::TAG?
  		   ($t->string =~ /^<a\b/is? '<a>':
! 		    $t->string =~ /^<input\b/is? (
! 			    lc $t->attributes->{'type'}->[1] eq 'text' ? '%S':
! 			    '%p'):
  		    _quote_cformat($t->string)):
  	       _quote_cformat($t->string);
***************
*** 541,568 ****
  		last if $structure[$i]->type != TmplTokenType::TEXT;
  		last if !blank_p($structure[$i]->string);
! 		    push @{$this->{_queue}}, pop @structure;
  		}
  	    };
      &$undo_trailing_blanks;
!     # FIXME: If the last token is a close tag but there are no tags
!     # FIXME: before it, drop the close tag back into the queue. This
!     # FIXME: is an ugly hack to get rid of "foo %s</h1>" type mess.
!     if (@structure >= 2
! 	    && $structure[$#structure]->type == TmplTokenType::TAG
! 	    && $structure[$#structure]->string =~ /^<\//s) {
! 	my $has_other_tags_p = 0;
! 	for (my $i = 0; $i < $#structure; $i += 1) {
! 	    $has_other_tags_p = 1 if $structure[$i]->type == TmplTokenType::TAG;
! 	last if $has_other_tags_p;
  	}
! 	push @{$this->{_queue}}, pop @structure unless $has_other_tags_p;
! 	&$undo_trailing_blanks;
!     }
!     # FIXME: Do the same ugly hack for the last token being a ( or [
!     if (@structure >= 2
! 	    && $structure[$#structure]->type == TmplTokenType::TEXT
! 	    && $structure[$#structure]->string =~ /^[\(\[]$/) { # not )]
! 	push @{$this->{_queue}}, pop @structure;
! 	&$undo_trailing_blanks;
      }
      return @structure;
--- 543,603 ----
  		last if $structure[$i]->type != TmplTokenType::TEXT;
  		last if !blank_p($structure[$i]->string);
! 		    # Queue element structure: [reanalysis-p, token]
! 		    push @{$this->{_queue}}, [1, pop @structure];
  		}
  	    };
      &$undo_trailing_blanks;
!     while (@structure >= 2) {
! 	my $something_done_p = 0;
! 	# FIXME: If the last token is a close tag but there are no tags
! 	# FIXME: before it, drop the close tag back into the queue. This
! 	# FIXME: is an ugly hack to get rid of "foo %s</h1>" type mess.
! 	if (@structure >= 2
! 		&& $structure[$#structure]->type == TmplTokenType::TAG
! 		&& $structure[$#structure]->string =~ /^<\//s) {
! 	    my $has_other_tags_p = 0;
! 	    for (my $i = 0; $i < $#structure; $i += 1) {
! 		$has_other_tags_p = 1
! 			if $structure[$i]->type == TmplTokenType::TAG;
! 	    last if $has_other_tags_p;
! 	    }
! 	    if (!$has_other_tags_p) {
! 		push @{$this->{_queue}}, [0, pop @structure]
! 		&$undo_trailing_blanks;
! 		$something_done_p = 1;
! 	    }
  	}
! 	# FIXME: Do the same ugly hack for the last token being a ( or [
! 	if (@structure >= 2
! 		&& $structure[$#structure]->type == TmplTokenType::TEXT
! 		&& $structure[$#structure]->string =~ /^[\(\[]$/) { # not )]
! 	    push @{$this->{_queue}}, [1, pop @structure];
! 	    &$undo_trailing_blanks;
! 	    $something_done_p = 1;
! 	}
! 	# FIXME: If the first token is an open tag, the last token is the
! 	# FIXME: corresponding close tag, and there are no other close tags 
! 	# FIXME: inbetween, requeue the tokens from the second token on,
! 	# FIXME: flagged as ok for re-analysis
! 	if (@structure >= 3
! 		&& $structure[0]->type == TmplTokenType::TAG
! 		&& $structure[0]->string =~ /^<([a-z0-9])/is && (my $tag = $1)
! 		&& $structure[$#structure]->type == TmplTokenType::TAG
! 		&& $structure[$#structure]->string =~ /^<\/$1\s*>$/is) {
! 	    my $has_other_open_or_close_tags_p = 0;
! 	    for (my $i = 1; $i < $#structure; $i += 1) {
! 		$has_other_open_or_close_tags_p = 1
! 			if $structure[$i]->type == TmplTokenType::TAG
! 			&& $structure[$i]->string =~ /^<\/?$tag\b/is;
! 	    last if $has_other_open_or_close_tags_p;
! 	    }
! 	    if (!$has_other_open_or_close_tags_p) {
! 		for (my $i = $#structure; $i; $i -= 1) {
! 		    push @{$this->{_queue}}, [1, pop @structure];
! 		}
! 		$something_done_p = 1;
! 	    }
! 	}
!     last if !$something_done_p;
      }
      return @structure;
***************
*** 601,610 ****
      $this->{_queue} = [] unless defined $this->{_queue};
  
!     # Don't reparse anything in the queue. We can put a parametrized token
!     # there if we need to, however.
!     if (@{$this->{_queue}}) {
! 	$it = pop @{$this->{_queue}};
      } else {
! 	$it = $this->_next_token_intermediate($h);
  	if (!$this->cdata_mode_p && $this->allow_cformat_p && defined $it
  	    && ($it->type == TmplTokenType::TEXT?
--- 636,649 ----
      $this->{_queue} = [] unless defined $this->{_queue};
  
!     # Elements in the queue are ordered pairs. The first in the ordered pair
!     # specifies whether we are allowed to reanalysis; the second is the token.
!     if (@{$this->{_queue}} && !$this->{_queue}->[$#{$this->{_queue}}]->[0]) {
! 	$it = (pop @{$this->{_queue}})->[1];
      } else {
! 	if (@{$this->{_queue}}) {
! 	    $it = (pop @{$this->{_queue}})->[1];
! 	} else {
! 	    $it = $this->_next_token_intermediate($h);
! 	}
  	if (!$this->cdata_mode_p && $this->allow_cformat_p && defined $it
  	    && ($it->type == TmplTokenType::TEXT?
***************
*** 625,629 ****
  	    # We hate | and || in msgid strings, so we try to avoid them
  	    for (my $i = 1, my $quit_p = 0, my $quit_next_p = ($it->type == TmplTokenType::TEXT && $it->string =~ /^\|+$/s);; $i += 1) {
! 		$next = $this->_next_token_intermediate($h);
  		push @structure, $next; # for consistency (with initialization)
  	    last unless defined $next && _token_groupable2_p( $next );
--- 664,672 ----
  	    # We hate | and || in msgid strings, so we try to avoid them
  	    for (my $i = 1, my $quit_p = 0, my $quit_next_p = ($it->type == TmplTokenType::TEXT && $it->string =~ /^\|+$/s);; $i += 1) {
! 		if (@{$this->{_queue}}) {
! 		    $next = (pop @{$this->{_queue}})->[1];
! 		} else {
! 		    $next = $this->_next_token_intermediate($h);
! 		}
  		push @structure, $next; # for consistency (with initialization)
  	    last unless defined $next && _token_groupable2_p( $next );
***************
*** 636,640 ****
  		} elsif ($next->type == TmplTokenType::TAG) {
  		    if ($next->string =~ /^<([A-Z0-9]+)/is) {
! 			push @tags, lc($1);
  			$with_anchor_p = 1 if lc($1) eq 'a';
  			$with_input_p = 1 if lc($1) eq 'input';
--- 679,685 ----
  		} elsif ($next->type == TmplTokenType::TAG) {
  		    if ($next->string =~ /^<([A-Z0-9]+)/is) {
! 			my $candidate = lc($1);
! 			push @tags, $candidate
! 				unless $candidate =~ /^(?:input)$/is;
  			$with_anchor_p = 1 if lc($1) eq 'a';
  			$with_input_p = 1 if lc($1) eq 'input';
***************
*** 648,653 ****
  	    last if $quit_p;
  	    }
! 	    # Undo the last token
! 	    push @{$this->{_queue}}, pop @structure;
  	    # Simply it a bit more
  	    @structure = $this->_optimize( @structure );
--- 693,698 ----
  	    last if $quit_p;
  	    }
! 	    # Undo the last token, allowing reanalysis
! 	    push @{$this->{_queue}}, [1, pop @structure];
  	    # Simply it a bit more
  	    @structure = $this->_optimize( @structure );
***************
*** 674,683 ****
  			$it->line_number, $it->pathname);;
  	    } else {
! 		# Requeue the tokens thus seen for re-emitting
  		for (;;) {
! 		    push @{$this->{_queue}}, pop @structure;
  		last if !@structure;
  		}
! 		$it = pop @{$this->{_queue}};
  	    }
  	}
--- 719,728 ----
  			$it->line_number, $it->pathname);;
  	    } else {
! 		# Requeue the tokens thus seen for re-emitting, allow reanalysis
  		for (;;) {
! 		    push @{$this->{_queue}}, [1, pop @structure];
  		last if !@structure;
  		}
! 		$it = (pop @{$this->{_queue}})->[1];
  	    }
  	}
***************
*** 718,754 ****
  
  # Some functions that shouldn't be here... should be moved out some time
! sub parametrize ($$$) {
!     my($fmt_0, $params, $anchors) = @_;
      my $it = '';
!     for (my $n = 0, my $fmt = $fmt_0; length $fmt;) {
! 	if ($fmt =~ /^[^%]+/) {
! 	    $fmt = $';
! 	    $it .= $&;
! 	} elsif ($fmt =~ /^%%/) {
! 	    $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) {
! 		my $param = $params->[$i - 1];
! 		$it .= $param;
! 		warn_normal "$&: Undefined parameter $i for msgid \"$fmt_0\"",
! 			    undef
! 			unless defined $param;
! 	    } 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 = $';
- 	    $it .= $&;
- 	    die "Unknown or unsupported format specification: $&\n"; #XXX
- 	} else {
- 	    die "Completely confused parametrizing: $fmt\n";#XXX
  	}
      }
      for (my $n = 0, my $fmt = $it, $it = ''; length $fmt;) {
  	if ($fmt =~ /^(?:(?!<a\d+>).)+/is) {
--- 763,837 ----
  
  # Some functions that shouldn't be here... should be moved out some time
! sub parametrize ($$$$) {
!     my($fmt_0, $cformat_p, $t, $f) = @_;
      my $it = '';
!     if ($cformat_p) {
! 	my @params = $t->parameters_and_fields;
! 	for (my $n = 0, my $fmt = $fmt_0; length $fmt;) {
! 	    if ($fmt =~ /^[^%]+/) {
! 		$fmt = $';
! 		$it .= $&;
! 	    } elsif ($fmt =~ /^%%/) {
! 		$fmt = $';
! 		$it .= '%';
! 	    } elsif ($fmt =~ /^%(?:(\d+)\$)?(?:(\d+)(?:\.(\d+))?)?s/s) {
! 		$n += 1;
! 		my($i, $width, $prec) = ((defined $1? $1: $n), $2, $3);
! 		$fmt = $';
! 		if (defined $width && defined $prec && !$width && !$prec) {
! 		    ;
! 		} elsif (defined $params[$i - 1]) {
! 		    my $param = $params[$i - 1];
! 		    warn_normal "$fmt_0: $&: Expected a TMPL_VAR, but found a "
! 			    . $param->type->to_string . "\n", undef
! 			    if $param->type != TmplTokenType::DIRECTIVE;
! 		    warn_normal "$fmt_0: $&: Unsupported "
! 				. "field width or precision\n", undef
! 			    if defined $width || defined $prec;
! 		    warn_normal "$fmt_0: $&: Parameter $i not known", undef
! 			    unless defined $param;
! 		    $it .= defined $f? &$f( $param ): $param->string;
! 		}
! 	    } elsif ($fmt =~ /^%(?:(\d+)\$)?(?:(\d+)(?:\.(\d+))?)?([pS])/s) {
! 		$n += 1;
! 		my($i, $width, $prec, $conv) = ((defined $1? $1: $n), $2, $3, $4);
! 		$fmt = $';
! 
! 		my $param = $params[$i - 1];
! 		if (!defined $param) {
! 		    warn_normal "$fmt_0: $&: Parameter $i not known", undef;
! 		} else {
! 		    if ($param->type == TmplTokenType::TAG
! 			    && $param->string =~ /^<input\b/is) {
! 			my $type = defined $param->attributes?
! 				lc($param->attributes->{'type'}->[1]): undef;
! 			if ($conv eq 'S') {
! 			    warn_normal "$fmt_0: $&: Expected type=text, "
! 					. "but found type=$type", undef
! 				    unless $type eq 'text';
! 			} elsif ($conv eq 'p') {
! 			    warn_normal "$fmt_0: $&: Expected type=radio, "
! 					. "but found type=$type", undef
! 				    unless $type eq 'radio';
! 			}
! 		    } else {
! 			warn_normal "$&: Expected an INPUT, but found a "
! 				. $param->type->to_string . "\n", undef
! 		    }
! 		    warn_normal "$fmt_0: $&: Unsupported "
! 				. "field width or precision\n", undef
! 			    if defined $width || defined $prec;
! 		    $it .= defined $f? &$f( $param ): $param->string;
! 		}
! 	    } elsif ($fmt =~ /^%[^%a-zA-Z]*[a-zA-Z]/) {
! 		$fmt = $';
! 		$it .= $&;
! 		die "$&: Unknown or unsupported format specification\n"; #XXX
  	    } else {
! 		die "$&: Completely confused parametrizing\n";#XXX
  	    }
  	}
      }
+     my @anchors = $t->anchors;
      for (my $n = 0, my $fmt = $it, $it = ''; length $fmt;) {
  	if ($fmt =~ /^(?:(?!<a\d+>).)+/is) {
***************
*** 759,763 ****
  	    my $i  = $1;
  	    $fmt = $';
! 	    my $anchor = $anchors->[$i - 1];
  	    warn_normal "$&: Anchor $1 not found for msgid \"$fmt_0\"", undef #FIXME
  		    unless defined $anchor;
--- 842,846 ----
  	    my $i  = $1;
  	    $fmt = $';
! 	    my $anchor = $anchors[$i - 1];
  	    warn_normal "$&: Anchor $1 not found for msgid \"$fmt_0\"", undef #FIXME
  		    unless defined $anchor;
***************
*** 861,868 ****
--- 944,1001 ----
  turned on using the set_cformat(1) method call.
  
+ =head2 The flag characters
+ 
+ The character % is followed by zero or more of the following flags:
+ 
+ =over
+ 
+ =item #
+ 
+ The value comes from HTML <INPUT> elements.
+ This abuse of the flag character is somewhat reasonable,
+ since TMPL_VAR and INPUT are both variables, but of different kinds.
+ 
+ =back
+ 
+ =head2 The field width and precision
+ 
+ An optional 0.0 can be specified for %s to specify
+ that the <TMPL_VAR> should be suppressed.
+ 
+ =head2 The conversion specifier
+ 
+ =over
+ 
+ =item p
+ 
+ Specifies any input field that is neither text nor hidden
+ (which currently mean radio buttons).
+ The p conversion specifier is chosen because this does not
+ evoke any certain sensible data type.
+ 
+ =item S
+ 
+ Specifies a text input field (<INPUT TYPE=TEXT>).
+ This use of the o conversion specifier is somewhat reasonable,
+ since text input fields contain values of undeterminable type,
+ which can be treated as strings.
+ 
+ =item s
+ 
+ Specifies a <TMPL_VAR>.
+ This use of the o conversion specifier is somewhat reasonable,
+ since <TMPL_VAR> denotes values of undeterminable type, which
+ can be treated as strings.
+ 
+ =back
+ 
  =head1 BUGS
  
  There is no code to save the tag name anywhere in the scanned token.
  
+ The use of <AI<i>> to stand for the I<i>th anchor
+ is not very well thought out.
+ Some abuse of c-format specifies might have been more appropriate.
+ 
  =head1 HISTORY
  

Index: intranet.zh_TW
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/intranet.zh_TW,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** intranet.zh_TW	26 Feb 2004 05:29:03 -0000	1.19
--- intranet.zh_TW	27 Feb 2004 13:26:07 -0000	1.20
***************
*** 14,18 ****
  msgstr ""
  "Project-Id-Version: Koha INTRANET 2.0.0RC4\n"
! "POT-Creation-Date: 2004-02-26 00:14-0500\n"
  "PO-Revision-Date: 2004-02-23 17:20-0500\n"
  "Last-Translator: Ambrose Li <acli at ada.dhs.org>\n"
--- 14,18 ----
  msgstr ""
  "Project-Id-Version: Koha INTRANET 2.0.0RC4\n"
! "POT-Creation-Date: 2004-02-27 03:56-0500\n"
  "PO-Revision-Date: 2004-02-23 17:20-0500\n"
[...4330 lines suppressed...]
! #~ msgid "Return"
! #~ msgstr "返回"
  
  #~ msgid "Title : %s"
  #~ msgstr "題名:%s"
  
+ #~ msgid "Unpaid"
+ #~ msgstr "未付款"
+ 
+ #~ msgid "View Account"
+ #~ msgstr "查看帳戶"
+ 
+ #~ msgid "Writeoff"
+ #~ msgstr "註銷"
+ 
  #~ msgid "select"
  #~ msgstr "選擇"
  
! #~ msgid "to Koha"
! #~ msgstr "Koha"

Index: opac.zh_TW
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/opac.zh_TW,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** opac.zh_TW	26 Feb 2004 22:17:08 -0000	1.11
--- opac.zh_TW	27 Feb 2004 13:26:08 -0000	1.12
***************
*** 7,11 ****
  msgstr ""
  "Project-Id-Version: Koha OPAC 2.0.0RC4\n"
! "POT-Creation-Date: 2004-02-26 00:13-0500\n"
  "PO-Revision-Date: 2004-02-18 02:40-0500\n"
  "Last-Translator: Ambrose Li <acli at ada.dhs.org>\n"
--- 7,11 ----
  msgstr ""
  "Project-Id-Version: Koha OPAC 2.0.0RC4\n"
! "POT-Creation-Date: 2004-02-27 02:49-0500\n"
  "PO-Revision-Date: 2004-02-18 02:40-0500\n"
  "Last-Translator: Ambrose Li <acli at ada.dhs.org>\n"
***************
*** 15,23 ****
  "Content-Transfer-Encoding: 8bit\n"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:11
  #, c-format
  msgid "%s %s (%s)"
! msgstr ""
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:13
  #, c-format
--- 15,34 ----
  "Content-Transfer-Encoding: 8bit\n"
  
+ #. %1$p: type=radio name=ttype value=normal
+ #. %2$p: type=radio name=ttype value=exact
+ #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:27
+ #, c-format
+ msgid "%pNormal%pExact"
+ msgstr "%p一般%p完全吻合"
+ 
+ #. %1$s: TMPL_VAR name=firstname
+ #. %2$s: TMPL_VAR name=surname
+ #. %3$s: TMPL_VAR name=title
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:11
  #, c-format
  msgid "%s %s (%s)"
! msgstr "%s %s (%s)"
  
+ #. %1$s: TMPL_VAR name=phone
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:13
  #, c-format
***************
*** 26,29 ****
--- 37,41 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=faxnumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:14
  #, c-format
***************
*** 31,48 ****
  msgstr "%s (辦公室)"
  
! # NOTE This refers to new books acquired in the last so-and-so days
! # NOTE This is essentially the same string as the next, but different
! # NOTE due to technical difficulties (in creating an msgid from the HTML)
! # FIXME This string as it is is nearly untranslatable. The scanner need to be fixed.
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-main.tmpl:105
  #, c-format
! msgid "%s <b>acquired in the last"
! msgstr "最近新到的 %s 圖書資料:最近"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:9
  #, c-format
  msgid "%s acquired in the last <i>%s</i> days"
! msgstr "最近<b>%2$s</b>日內新到的%1$s圖書資料"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:15
  #, c-format
--- 43,68 ----
  msgstr "%s (辦公室)"
  
! #. %1$s: TMPL_VAR name=CGIitemtype
! #. %2$S: type=text name=duration
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-main.tmpl:105
  #, c-format
! msgid "%s <b>acquired in the last %S days</b>"
! msgstr "<b>最近%2$S日內新到的</b>%1$s"
! 
! #. %1$s: TMPL_VAR name=biblioitemnumber
! #. %2$s: TMPL_VAR name=description
! #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:20
! #, c-format
! msgid "%s GROUP - %s"
! msgstr "%s 群組 - %s"
  
+ #. %1$s: TMPL_VAR name=itemtype
+ #. %2$s: TMPL_VAR name=duration
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:9
  #, c-format
  msgid "%s acquired in the last <i>%s</i> days"
! msgstr "最近<b>%2$s</b>日內新到的%1$s"
  
+ #. %1$s: TMPL_VAR name=numrecords
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:15
  #, c-format
***************
*** 50,53 ****
--- 70,75 ----
  msgstr "找到%s個結果"
  
+ #. %1$s: TMPL_VAR name=streetaddress
+ #. %2$s: TMPL_VAR name=city
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:12
  #, c-format
***************
*** 59,72 ****
  msgstr "&copy;"
  
! #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:20
! #, c-format
! msgid "<B>%s GROUP - %s </b>"
! msgstr "<b>%s 群組 - %s</b>"
! 
! #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:56
  #, c-format
! msgid "<B>BARCODE %s</b>"
! msgstr "<B>條碼 %s</b>"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:15
  #, c-format
--- 81,91 ----
  msgstr "&copy;"
  
! #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:46
  #, c-format
! msgid "<a1>Log In</a> to Koha"
! msgstr "<a1>登入</a>Koha"
  
+ #. %1$s: TMPL_VAR name=title
+ #. %2$s: TMPL_VAR name=biblionumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:15
  #, c-format
***************
*** 74,77 ****
--- 93,97 ----
  msgstr "<b>%s</b> (書目記錄號碼 %s)"
  
+ #. %1$s: TMPL_VAR name=dateaccessioned
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:83
  #, c-format
***************
*** 79,82 ****
--- 99,103 ----
  msgstr "<b><a1>登錄</a>日期:%s"
  
+ #. %1$s: TMPL_VAR name=issues
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:87
  #, c-format
***************
*** 84,87 ****
--- 105,109 ----
  msgstr "<b><a1>借書次數:</a></b> %s"
  
+ #. %1$s: TMPL_VAR name=additional
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:24
  #, c-format
***************
*** 89,92 ****
--- 111,115 ----
  msgstr "<b>附加著者:</b>%s"
  
+ #. %1$s: TMPL_VAR name=author
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:23
  #, c-format
***************
*** 94,97 ****
--- 117,121 ----
  msgstr "<b>著者:</b><a1>%s</a>"
  
+ #. %1$s: TMPL_VAR name=biblionumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:91
  #, c-format
***************
*** 99,102 ****
--- 123,127 ----
  msgstr "<b>書目記錄號碼:</b>%s"
  
+ #. %1$s: TMPL_VAR name=biblionumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:30
  #, c-format
***************
*** 104,107 ****
--- 129,133 ----
  msgstr "<b>書目記錄號碼:</b>%s"
  
+ #. %1$s: TMPL_VAR name=wthdrawn
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:86
  #, c-format
***************
*** 109,112 ****
--- 135,139 ----
  msgstr "<b>已註消:</b>%s"
  
+ #. %1$s: TMPL_VAR name=classification
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:36
  #, c-format
***************
*** 114,117 ****
--- 141,147 ----
  msgstr "<b>分類:</b>%s"
  
+ #. %1$s: TMPL_VAR name=classification
+ #. %2$s: TMPL_VAR name=dewey
+ #. %3$s: TMPL_VAR name=subclass
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:35
  #, c-format
***************
*** 119,122 ****
--- 149,153 ----
  msgstr "<b>分類:</b>%s%s%s"
  
+ #. %1$s: TMPL_VAR name=seriestitle
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:29
  #, c-format
***************
*** 125,128 ****
--- 156,160 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=holdingbranch
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:77
  #, c-format
***************
*** 130,133 ****
--- 162,166 ----
  msgstr "<b>目前分館:</b>%s"
  
+ #. %1$s: TMPL_VAR name=publicationyear
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:39
  #, c-format
***************
*** 135,138 ****
--- 168,172 ----
  msgstr "<b>日期:</b>%s"
  
+ #. %1$s: TMPL_VAR name=dewey
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:35
  #, c-format
***************
*** 140,143 ****
--- 174,178 ----
  msgstr "<b>杜威分類號:</b><a1>%s</a>"
  
+ #. %1$s: TMPL_VAR name=biblioitemnumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:90
  #, c-format
***************
*** 146,149 ****
--- 181,185 ----
  
  # XXX tentative
+ #. %1$s: TMPL_VAR name=homebranch
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:71
  #, c-format
***************
*** 151,154 ****
--- 187,191 ----
  msgstr "<b>您的分館:</b>%s"
  
+ #. %1$s: TMPL_VAR name=isbn
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:36
  #, c-format
***************
*** 156,159 ****
--- 193,197 ----
  msgstr "<b>國際標準書號:</b>%s"
  
+ #. %1$s: TMPL_VAR name=ISBN
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:21
  #, c-format
***************
*** 161,164 ****
--- 199,203 ----
  msgstr "<b>國際標準書號:</b><a1>%s</a>"
  
+ #. %1$s: TMPL_VAR name=illus
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:42
  #, c-format
***************
*** 166,169 ****
--- 205,209 ----
  msgstr "<b>繪圖:</b>%s"
  
+ #. %1$s: TMPL_VAR name=itemtype
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:31
  #, c-format
***************
*** 171,174 ****
--- 211,215 ----
  msgstr "<b>圖書資料類別:</b>%s"
  
+ #. %1$s: TMPL_VAR name=itemlost
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:79
  #, c-format
***************
*** 176,179 ****
--- 217,221 ----
  msgstr "<b>遺失圖書資料:</b>%s"
  
+ #. %1$s: TMPL_VAR name=lccn
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:37
  #, c-format
***************
*** 182,185 ****
--- 224,228 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=card0
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:75
  #, c-format
***************
*** 188,191 ****
--- 231,235 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=card1
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:76
  #, c-format
***************
*** 193,196 ****
--- 237,241 ----
  msgstr "<b>最近借閱者2:</b>%s"
  
+ #. %1$s: TMPL_VAR name=timestamp0
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:73
  #, c-format
***************
*** 198,201 ****
--- 243,247 ----
  msgstr "<b>最近借出:</b>%s"
  
+ #. %1$s: TMPL_VAR name=datelastseen
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:72
  #, c-format
***************
*** 203,206 ****
--- 249,253 ----
  msgstr "<b>最近出現:</b>%s"
  
+ #. %1$s: TMPL_VAR name=loanlength
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:33
  #, c-format
***************
*** 208,211 ****
--- 255,259 ----
  msgstr "<b>借閱期限:</b>%s"
  
+ #. %1$s: TMPL_VAR name=count
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:45
  #, c-format
***************
*** 213,216 ****
--- 261,266 ----
  msgstr "<b>數量:</b>%s"
  
+ #. For the first occurrence,
+ #. %1$s: TMPL_VAR name=notes
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:32
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:44
***************
*** 220,223 ****
--- 270,274 ----
  msgstr "<b>備註:</b>%s"
  
+ #. %1$s: TMPL_VAR name=pages
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:41
  #, c-format
***************
*** 228,231 ****
--- 279,283 ----
  # NOTE in sub returnlost (and/or read <URL:http://www.koha.org/download/files/ChangeLog>).
  # NOTE This is a "theoretically free form" field storing strings like "Paid for by $bor $date"
+ #. %1$s: TMPL_VAR name=paidfor
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:80
  #, c-format
***************
*** 233,236 ****
--- 285,289 ----
  msgstr "<b>賠償:</b>%s"
  
+ #. %1$s: TMPL_VAR name=place
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:38
  #, c-format
***************
*** 238,241 ****
--- 291,295 ----
  msgstr "<b>出版地:</b>%s"
  
+ #. %1$s: TMPL_VAR name=publishercode
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:25
  #, c-format
***************
*** 243,246 ****
--- 297,301 ----
  msgstr "<b>出版者:</b>%s"
  
+ #. %1$s: TMPL_VAR name=publishercode
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:37
  #, c-format
***************
*** 248,251 ****
--- 303,307 ----
  msgstr "<b>出版者:</b>%s"
  
+ #. %1$s: TMPL_VAR name=renewals
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:82
  #, c-format
***************
*** 253,256 ****
--- 309,313 ----
  msgstr "<b>續借次數:</b>%s"
  
+ #. %1$s: TMPL_VAR name=rentalcharge
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:34
  #, c-format
***************
*** 258,261 ****
--- 315,319 ----
  msgstr "<b>借書費用:</b>%s"
  
+ #. %1$s: TMPL_VAR name=replacementprice
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:78
  #, c-format
***************
*** 263,266 ****
--- 321,325 ----
  msgstr "<b>書價:</b>%s"
  
+ #. %1$s: TMPL_VAR name=serial
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:34
  #, c-format
***************
*** 268,271 ****
--- 327,331 ----
  msgstr "<b>期刊:</b>%s"
  
+ #. %1$s: TMPL_VAR name=size
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:43
  #, c-format
***************
*** 273,276 ****
--- 333,337 ----
  msgstr "<b>大小:</b>%s"
  
+ #. %1$s: TMPL_VAR name=subject
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:30
  #, c-format
***************
*** 278,281 ****
--- 339,343 ----
  msgstr "<b>主題:</b>%s"
  
+ #. %1$s: TMPL_VAR name=subtitle
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:22
  #, c-format
***************
*** 283,286 ****
--- 345,349 ----
  msgstr "<b>副題:</b>%s"
  
+ #. %1$s: TMPL_VAR name=count
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:39
  #, c-format
***************
*** 288,291 ****
--- 351,355 ----
  msgstr "<b>項目總數:</b>%s"
  
+ #. %1$s: TMPL_VAR name=url
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:32
  #, c-format
***************
*** 293,296 ****
--- 357,361 ----
  msgstr "<b>網址:</b>%s"
  
+ #. %1$s: TMPL_VAR name=url
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:38
  #, c-format
***************
*** 298,301 ****
--- 363,367 ----
  msgstr "<b>網址:</b><a1>%s</a>"
  
+ #. %1$s: TMPL_VAR name=unititle
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:33
  #, c-format
***************
*** 303,306 ****
--- 369,373 ----
  msgstr "<b>劃一題名:</b>%s"
  
+ #. %1$s: TMPL_VAR name=volumeddesc
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:40
  #, c-format
***************
*** 308,311 ****
--- 375,379 ----
  msgstr "<b>集叢號:</b>%s"
  
+ #. %1$s: TMPL_VAR name=copyrightdate
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:31
  #, c-format
***************
*** 313,328 ****
  msgstr "<b>年份:</b>%s"
  
- #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:51
- #, c-format
- msgid "<b>You have a credit of %s</b>"
- msgstr "<b>您有 %s 結餘</b>"
- 
- #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:28
- #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:39
- #, c-format
- msgid "<b>You have outstanding charges and fines of %s</b>"
- msgstr "<b>您尚欠罰款或其他費用%s</b>"
- 
  # XXX This (in the English template) is problematic
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:26
  #, c-format
--- 381,386 ----
  msgstr "<b>年份:</b>%s"
  
  # XXX This (in the English template) is problematic
+ #. %1$s: TMPL_VAR name=publicationyear
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:26
  #, c-format
***************
*** 330,333 ****
--- 388,393 ----
  msgstr " <b>於</b>%s"
  
+ #. %1$s: TMPL_VAR name=title
+ #. %2$s: TMPL_VAR name=author
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:9
  #, c-format
***************
*** 335,338 ****
--- 395,400 ----
  msgstr "<em><a1>%s (%s)</a></em>"
  
+ #. %1$s: TMPL_VAR name=firstname
+ #. %2$s: TMPL_VAR name=surname
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-account.tmpl:4
  #, c-format
***************
*** 385,388 ****
--- 447,456 ----
  msgstr "在館內"
  
+ #. %1$s: TMPL_VAR name=barcode
+ #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:56
+ #, c-format
+ msgid "BARCODE %s"
+ msgstr "條碼 %s"
+ 
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl:51
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:53
***************
*** 415,418 ****
--- 483,487 ----
  msgstr "類別"
  
+ #. INPUT type=reset
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:59
  msgid "Clear All Fields"
***************
*** 468,477 ****
  msgstr "在此日期停止預約:"
  
- # TODO:舊譯「這是整個書名」
- # NOTE 譯文更動 by Arthur
- #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:27
- msgid "Exact"
- msgstr "完全吻合"
- 
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-account.tmpl:9
  msgid "FINES &amp; CHARGES"
--- 537,540 ----
***************
*** 527,530 ****
--- 590,594 ----
  msgstr "讀者登記"
  
+ #. A
  #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:28
  msgid "Join the library"
***************
*** 561,565 ****
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:8
  msgid "Keywords"
! msgstr "關鍵字"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-auth.tmpl:32
--- 625,629 ----
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:8
  msgid "Keywords"
! msgstr "關鍵詞"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-auth.tmpl:32
***************
*** 571,574 ****
--- 635,639 ----
  msgstr "最近出現"
  
+ #. %1$s: TMPL_VAR name=cardnumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:10
  #, c-format
***************
*** 582,587 ****
  msgstr "地點"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-auth.tmpl:35
- #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:46
  msgid "Log In"
  msgstr "登入"
--- 647,652 ----
  msgstr "地點"
  
+ #. INPUT type=submit
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-auth.tmpl:35
  msgid "Log In"
  msgstr "登入"
***************
*** 591,594 ****
--- 656,661 ----
  msgstr "登入Koha"
  
+ #. For the first occurrence,
+ #. %1$s: TMPL_VAR name=loggedinuser
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-main.tmpl:117
  #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:44
***************
*** 612,615 ****
--- 679,684 ----
  msgstr "月"
  
+ #. For the first occurrence,
+ #. IMG
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:33
  #: ../../koha-tmpl/opac-tmpl/default/en/subject.tmpl:30
***************
*** 630,638 ****
  msgstr "非小說"
  
- # TODO 舊譯「書名中有這些字眼即可」
- #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:27
- msgid "Normal"
- msgstr "一般"
- 
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:89
  msgid "Not Reservable"
--- 699,702 ----
***************
*** 644,650 ****
  "keyword will be used"
  msgstr ""
! "注意:一旦輸入了「關鍵字」,即使在其他欄位輸入了其他查詢條件,也只會使用關鍵"
  "字。"
  
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:105
  #, c-format
--- 708,715 ----
  "keyword will be used"
  msgstr ""
! "注意:一旦輸入了「關鍵詞」,即使在其他欄位輸入了其他查詢條件,也只會使用關鍵"
  "字。"
  
+ #. %1$s: TMPL_VAR name=fee
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:105
  #, c-format
***************
*** 657,664 ****
--- 722,731 ----
  msgstr "十一月"
  
+ #. INPUT type=submit
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-main.tmpl:106
  msgid "OK"
  msgstr "好!"
  
+ #. INPUT type=submit
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-search.tmpl:58
  msgid "OK Start Search"
***************
*** 695,698 ****
--- 762,766 ----
  msgstr "取書分館"
  
+ #. INPUT type=submit
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:107
  msgid "Place Reserve"
***************
*** 708,711 ****
--- 776,780 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=CGIbranch
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:44
  #, c-format
***************
*** 721,724 ****
--- 790,795 ----
  "預留給您。"
  
+ #. For the first occurrence,
+ #. IMG
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:21
  #: ../../koha-tmpl/opac-tmpl/default/en/subject.tmpl:18
***************
*** 754,757 ****
--- 825,831 ----
  msgstr "由這日開始預約:"
  
+ #. %1$s: TMPL_VAR name=title
+ #. %2$s: TMPL_VAR name=author
+ #. %3$s: TMPL_VAR name=biblionumber
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:18
  #, c-format
***************
*** 760,763 ****
--- 834,840 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=startfrom
+ #. %2$s: TMPL_VAR name=endat
+ #. %3$s: TMPL_VAR name=numrecords
  #: ../../koha-tmpl/opac-tmpl/default/en/subject.tmpl:15
  #, c-format
***************
*** 766,769 ****
--- 843,849 ----
  
  # NOTE 譯文更動 by Arthur
+ #. %1$s: TMPL_VAR name=startfrom
+ #. %2$s: TMPL_VAR name=endat
+ #. %3$s: TMPL_VAR name=numrecords
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:122
  #, c-format
***************
*** 802,805 ****
--- 882,886 ----
  msgstr "對不起,什麼也找不到"
  
+ #. %1$s: TMPL_VAR name=too_many_reserves
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:10
  #, c-format
***************
*** 807,810 ****
--- 888,892 ----
  msgstr "對不起,您不可預約超過%s項資料。"
  
+ #. %1$s: TMPL_VAR name=too_much_oweing
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:9
  #, c-format
***************
*** 828,831 ****
--- 910,915 ----
  
  # FIXME 譯文更動 by Arthur
+ #. For the first occurrence,
+ #. INPUT type=submit
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:79
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-userupdate.tmpl:39
***************
*** 841,844 ****
--- 925,929 ----
  msgstr "教師參考書"
  
+ #. %1$s: TMPL_VAR name=reservecount
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:19
  #, c-format
***************
*** 885,888 ****
--- 970,974 ----
  msgstr "網站"
  
+ #. %1$s: TMPL_VAR name=branchname
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-reserve.tmpl:102
  #, c-format
***************
*** 921,924 ****
--- 1007,1011 ----
  msgstr "您輸入錯了使用者名稱或密碼,請重試。"
  
+ #. %1$s: TMPL_VAR name=issues_count
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:90
  #, c-format
***************
*** 926,929 ****
--- 1013,1017 ----
  msgstr "您目前借了 %s 項圖書資料。"
  
+ #. %1$s: TMPL_VAR name=reserves_count
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:117
  #, c-format
***************
*** 931,938 ****
--- 1019,1040 ----
  msgstr "您目前預約了 %s 項圖書資料。"
  
+ #. %1$s: TMPL_VAR name=amountoutstanding
+ #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:51
+ #, c-format
+ msgid "You have a credit of %s"
+ msgstr "您有 %s 結餘"
+ 
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:112
  msgid "You have no items on issue."
  msgstr "您沒有借出任何圖書資料。"
  
+ #. For the first occurrence,
+ #. %1$s: TMPL_VAR name=amountoutstanding
+ #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:28
+ #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:39
+ #, c-format
+ msgid "You have outstanding charges and fines of %s"
+ msgstr "您尚欠款項 %s"
+ 
  # FIXME 譯文更動 by Arthur
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-user.tmpl:66
***************
*** 948,951 ****
--- 1050,1054 ----
  msgstr "您一定要撰擇至少一種圖書資料的類別!"
  
+ #. %1$s: TMPL_VAR name=searchdesc
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-searchresults.tmpl:6
  #, c-format
***************
*** 961,968 ****
  msgstr "圖書館核實您的作的修改後,修改才會生效。"
  
! #: ../../koha-tmpl/opac-tmpl/default/en/opac-main.tmpl:105
! msgid "days"
! msgstr "æ—¥"
! 
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:27
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:68
--- 1064,1069 ----
  msgstr "圖書館核實您的作的修改後,修改才會生效。"
  
! #. For the first occurrence,
! #. INPUT type=image name=delete
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:27
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:68
***************
*** 970,977 ****
--- 1071,1081 ----
  msgstr "移除"
  
+ #. A
  #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:33
  msgid "home page"
  msgstr "返回首頁"
  
+ #. For the first occurrence,
+ #. INPUT type=image name=submit
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:25
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-moredetail.tmpl:66
***************
*** 983,986 ****
--- 1087,1092 ----
  msgstr "借出"
  
+ #. For the first occurrence,
+ #. META http-equiv=Content-Type
  #: ../../koha-tmpl/opac-tmpl/default/en/opac-main.tmpl:4
  #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:6
***************
*** 988,992 ****
  msgstr "text/html; charset=UTF-8"
  
! #: ../../koha-tmpl/opac-tmpl/default/en/includes/opac-top.inc:46
! msgid "to Koha"
! msgstr "Koha"
--- 1094,1116 ----
  msgstr "text/html; charset=UTF-8"
  
! # NOTE This refers to new books acquired in the last so-and-so days
! # NOTE This is essentially the same string as the next, but different
! # NOTE due to technical difficulties (in creating an msgid from the HTML)
! # FIXME This string as it is is nearly untranslatable. The scanner need to be fixed.
! #~ msgid "%s <b>acquired in the last"
! #~ msgstr "最近新到的 %s 圖書資料:最近"
! 
! # TODO:舊譯「這是整個書名」
! # NOTE 譯文更動 by Arthur
! #~ msgid "Exact"
! #~ msgstr "完全吻合"
! 
! # TODO 舊譯「書名中有這些字眼即可」
! #~ msgid "Normal"
! #~ msgstr "一般"
! 
! #~ msgid "days"
! #~ msgstr "æ—¥"
! 
! #~ msgid "to Koha"
! #~ msgstr "Koha"

Index: tmpl_process3.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/tmpl_process3.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** tmpl_process3.pl	25 Feb 2004 03:39:49 -0000	1.15
--- tmpl_process3.pl	27 Feb 2004 13:26:08 -0000	1.16
***************
*** 91,98 ****
  	} elsif ($kind eq TmplTokenType::TEXT_PARAMETRIZED) {
  	    my $fmt = find_translation($s->form);
! 	    print $output TmplTokenizer::parametrize($fmt, [ map {
  		my($kind, $t, $attr) = ($_->type, $_->string, $_->attributes);
  		$kind == TmplTokenType::TAG && %$attr?
! 		    text_replace_tag($t, $attr): $t } $s->parameters ], [ $s->anchors ]);
  	} elsif ($kind eq TmplTokenType::TAG && %$attr) {
  	    print $output text_replace_tag($t, $attr);
--- 91,99 ----
  	} elsif ($kind eq TmplTokenType::TEXT_PARAMETRIZED) {
  	    my $fmt = find_translation($s->form);
! 	    print $output TmplTokenizer::parametrize($fmt, 1, $s, sub {
! 		$_ = $_[0];
  		my($kind, $t, $attr) = ($_->type, $_->string, $_->attributes);
  		$kind == TmplTokenType::TAG && %$attr?
! 		    text_replace_tag($t, $attr): $t });
  	} elsif ($kind eq TmplTokenType::TAG && %$attr) {
  	    print $output text_replace_tag($t, $attr);

Index: xgettext.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/xgettext.pl,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** xgettext.pl	25 Feb 2004 03:37:27 -0000	1.10
--- xgettext.pl	27 Feb 2004 13:26:08 -0000	1.11
***************
*** 20,23 ****
--- 20,24 ----
  use vars qw( %text %translation );
  use vars qw( $charset_in $charset_out );
+ use vars qw( $disable_fuzzy_p );
  use vars qw( $verbose_p );
  use vars qw( $po_mode_p );
***************
*** 116,120 ****
      # Emit all extracted strings.
      for my $t (string_list) {
! 	printf OUTPUT "%s\n", $t # unless negligible_p($t);
      }
  }
--- 117,121 ----
      # Emit all extracted strings.
      for my $t (string_list) {
! 	printf OUTPUT "%s\n", $t;
      }
  }
***************
*** 136,140 ****
--- 137,145 ----
  # FIRST AUTHOR <EMAIL\@ADDRESS>, YEAR.
  #
+ EOF
+     print OUTPUT <<EOF unless $disable_fuzzy_p;
  #, fuzzy
+ EOF
+     print OUTPUT <<EOF;
  msgid ""
  msgstr ""
***************
*** 151,155 ****
      my $directory_re = quotemeta("$directory/");
      for my $t (string_list) {
! 	#next if negligible_p($t);
  	my $cformat_p;
  	for my $token (@{$text{$t}}) {
--- 156,203 ----
      my $directory_re = quotemeta("$directory/");
      for my $t (string_list) {
! 	if ($text{$t}->[0]->type == TmplTokenType::TEXT_PARAMETRIZED) {
! 	    my($token, $n) = ($text{$t}->[0], 0);
! 	    printf OUTPUT "#. For the first occurrence,\n"
! 		    if @{$text{$t}} > 1 && $token->parameters_and_fields > 0;
! 	    for my $param ($token->parameters_and_fields) {
! 		$n += 1;
! 		my $type = $param->type;
! 		my $subtype = ($type == TmplTokenType::TAG
! 			&& $param->string =~ /^<input\b/is?
! 				$param->attributes->{'type'}->[1]: undef);
! 		my $fmt = TmplTokenizer::_formalize( $param );
! 		$fmt =~ s/^%/%$n\$/;
! 		if ($type == TmplTokenType::DIRECTIVE) {
! 		    $type = $param->string =~ /(TMPL_[A-Z]+)+/is? $1: 'ERROR';
! 		    my $name = $param->string =~ /\bname=(["']?)([^\s"']+)\1/is?
! 			    $2: undef;
! 		    printf OUTPUT "#. %s: %s\n", $fmt,
! 			"$type" . (defined $name? " name=$name": '');
! 		} else {
! 		    my $name = $param->attributes->{'name'};
! 		    my $value = $param->attributes->{'value'}
! 			    unless $subtype =~ /^(?:text)$/;
! 		    printf OUTPUT "#. %s: %s\n", $fmt, "type=$subtype"
! 			    . (defined $name?  " name=$name->[1]": '')
! 			    . (defined $value? " value=$value->[1]": '');
! 		}
! 	    }
! 	} elsif ($text{$t}->[0]->type == TmplTokenType::TAG) {
! 	    my($token) = ($text{$t}->[0]);
! 	    printf OUTPUT "#. For the first occurrence,\n"
! 		    if @{$text{$t}} > 1 && $token->parameters_and_fields > 0;
! 	    if ($token->string =~ /^<meta\b/is) {
! 		my $type = $token->attributes->{'http-equiv'}->[1];
! 		print OUTPUT "#. META http-equiv=$type\n" if defined $type;
! 	    } elsif ($token->string =~ /^<([a-z0-9]+)/is) {
! 		my $tag = uc($1);
! 		my $type = (lc($tag) eq 'input'?
! 			$token->attributes->{'type'}: undef);
! 		my $name = $token->attributes->{'name'};
! 		printf OUTPUT "#. %s\n", $tag
! 		    . (defined $type? " type=$type->[1]": '')
! 		    . (defined $name? " name=$name->[1]": '');
! 	    }
! 	}
  	my $cformat_p;
  	for my $token (@{$text{$t}}) {
***************
*** 259,262 ****
--- 307,311 ----
      'convert-from=s'			=> \$convert_from,
      'D|directory=s'			=> \$directory,
+     'disable-fuzzy'			=> \$disable_fuzzy_p,	# INTERNAL
      'f|files-from=s'			=> \$files_from,
      'I|input-charset=s'			=> \$charset_in,	# INTERNAL
***************
*** 361,367 ****
  files (passed to -f) can be generated thus:
  
! 	(cd ../.. && find koha-tmpl/opac-tmpl/default/en
  		-name \*.inc -o -name \*.tmpl) > opac/POTFILES.in
! 	(cd ../.. && find koha-tmpl/intranet-tmpl/default/en
  		-name \*.inc -o -name \*.tmpl) > intranet/POTFILES.in
  
--- 410,416 ----
  files (passed to -f) can be generated thus:
  
! 	(cd ../.. && find koha-tmpl/opac-tmpl/default/en \
  		-name \*.inc -o -name \*.tmpl) > opac/POTFILES.in
! 	(cd ../.. && find koha-tmpl/intranet-tmpl/default/en \
  		-name \*.inc -o -name \*.tmpl) > intranet/POTFILES.in
  





More information about the Koha-cvs mailing list