Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 6952:3fffba1c87d0
i18n: avoid naive plural tricks
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sun, 31 Aug 2008 16:12:02 +0200 |
parents | 359e93ceee3a |
children | 63b5f4c73c98 |
comparison
equal
deleted
inserted
replaced
6951:c8c9ce0ed3ee | 6952:3fffba1c87d0 |
---|---|
374 # header is inserted so that you can run the reject through patch again | 374 # header is inserted so that you can run the reject through patch again |
375 # without having to type the filename. | 375 # without having to type the filename. |
376 | 376 |
377 if not self.rej: | 377 if not self.rej: |
378 return | 378 return |
379 if self.hunks != 1: | |
380 hunkstr = "s" | |
381 else: | |
382 hunkstr = "" | |
383 | 379 |
384 fname = self.fname + ".rej" | 380 fname = self.fname + ".rej" |
385 self.ui.warn( | 381 self.ui.warn( |
386 _("%d out of %d hunk%s FAILED -- saving rejects to file %s\n") % | 382 _("%d out of %d hunks FAILED -- saving rejects to file %s\n") % |
387 (len(self.rej), self.hunks, hunkstr, fname)) | 383 (len(self.rej), self.hunks, fname)) |
388 try: os.unlink(fname) | 384 try: os.unlink(fname) |
389 except: | 385 except: |
390 pass | 386 pass |
391 fp = file(fname, 'wb') | 387 fp = file(fname, 'wb') |
392 base = os.path.basename(self.fname) | 388 base = os.path.basename(self.fname) |