Re: [PATCH v4 05/14] i18n: add--interactive: mark plural strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vasco Almeida <vascomalmeida@xxxxxxx> writes:

> @@ -669,12 +669,18 @@ sub status_cmd {
>  sub say_n_paths {
>  	my $did = shift @_;
>  	my $cnt = scalar @_;
> -	print "$did ";
> -	if (1 < $cnt) {
> -		print "$cnt paths\n";
> -	}
> -	else {
> -		print "one path\n";
> +	if ($did eq 'added') {
> +		printf(__n("added %d path\n", "added %d paths\n",
> +			   $cnt), $cnt);
> +	} elsif ($did eq 'updated') {
> +		printf(__n("updated %d path\n", "updated %d paths\n",
> +			   $cnt), $cnt);
> +	} elsif ($did eq 'reverted') {
> +		printf(__n("reverted %d path\n", "reverted %d paths\n",
> +			   $cnt), $cnt);
> +	} else {
> +		printf(__n("touched %d path\n", "touched %d paths\n",
> +			   $cnt), $cnt);
>  	}
>  }

Nice to see you covered all verbs currently in use and then
future-proofed by adding a fallback "touched" here.

Thanks.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]