~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-19 12:22:23 UTC
  • mfrom: (6143.1.8 i18n-plurals)
  • Revision ID: pqm@pqm.ubuntu.com-20110919122223-243tgzmfebanxxbi
(jr) Use ngettext instead of "words(s) with brackets" for plurals (Jonathan
 Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
from bzrlib.revisionspec import RevisionSpec, RevisionInfo
58
58
from bzrlib.smtp_connection import SMTPConnection
59
59
from bzrlib.workingtree import WorkingTree
60
 
from bzrlib.i18n import gettext
 
60
from bzrlib.i18n import gettext, ngettext
61
61
""")
62
62
 
63
63
from bzrlib.commands import (
1324
1324
                branch.get_stacked_on_url())
1325
1325
        except (errors.NotStacked, errors.UnstackableBranchFormat,
1326
1326
            errors.UnstackableRepositoryFormat), e:
1327
 
            note(gettext('Branched %d revision(s).') % branch.revno())
 
1327
            note(ngettext('Branched %d revision.', 'Branched %d revisions.', branch.revno()) % branch.revno())
1328
1328
        if bind:
1329
1329
            # Bind to the parent
1330
1330
            parent_branch = Branch.open(from_location)
2913
2913
        name_pattern_list = [globbing.normalize_pattern(p)
2914
2914
                             for p in name_pattern_list]
2915
2915
        bad_patterns = ''
 
2916
        bad_patterns_count = 0
2916
2917
        for p in name_pattern_list:
2917
2918
            if not globbing.Globster.is_pattern_valid(p):
 
2919
                bad_patterns_count += 1
2918
2920
                bad_patterns += ('\n  %s' % p)
2919
2921
        if bad_patterns:
2920
 
            msg = ('Invalid ignore pattern(s) found. %s' % bad_patterns)
 
2922
            msg = (ngettext('Invalid ignore pattern found. %s', 
 
2923
                            'Invalid ignore patterns found. %s',
 
2924
                            bad_patterns_count) % bad_patterns)
2921
2925
            ui.ui_factory.show_error(msg)
2922
2926
            raise errors.InvalidPattern('')
2923
2927
        for name_pattern in name_pattern_list:
4675
4679
 
4676
4680
        status_code = 0
4677
4681
        if local_extra and not theirs_only:
4678
 
            message(gettext("You have %d extra revision(s):\n") %
 
4682
            message(ngettext("You have %d extra revision:\n",
 
4683
                             "You have %d extra revisions:\n", 
 
4684
                             len(local_extra)) %
4679
4685
                len(local_extra))
4680
4686
            for revision in iter_log_revisions(local_extra,
4681
4687
                                local_branch.repository,
4689
4695
        if remote_extra and not mine_only:
4690
4696
            if printed_local is True:
4691
4697
                message("\n\n\n")
4692
 
            message(gettext("You are missing %d revision(s):\n") %
 
4698
            message(ngettext("You are missing %d revision:\n",
 
4699
                             "You are missing %d revisions:\n",
 
4700
                             len(remote_extra)) %
4693
4701
                len(remote_extra))
4694
4702
            for revision in iter_log_revisions(remote_extra,
4695
4703
                                remote_branch.repository,