equal
deleted
inserted
replaced
957 } |
957 } |
958 if limit: |
958 if limit: |
959 q_usage['percent'] = locale.format('%6.2f', 100. / limit * used, True) |
959 q_usage['percent'] = locale.format('%6.2f', 100. / limit * used, True) |
960 else: |
960 else: |
961 q_usage['percent'] = locale.format('%6.2f', 0, True) |
961 q_usage['percent'] = locale.format('%6.2f', 0, True) |
962 # Py25: fmt = format_domain_default if domaindefault else lambda s: s |
962 fmt = format_domain_default if domaindefault else lambda s: s |
963 if domaindefault: |
|
964 fmt = format_domain_default |
|
965 else: |
|
966 fmt = lambda s: s |
|
967 # TP: e.g.: [ 0.00%] 21.09 KiB/1.00 GiB |
963 # TP: e.g.: [ 0.00%] 21.09 KiB/1.00 GiB |
968 return fmt(_(u'[%(percent)s%%] %(used)s/%(limit)s') % q_usage) |
964 return fmt(_(u'[%(percent)s%%] %(used)s/%(limit)s') % q_usage) |
969 |
965 |
970 |
966 |
971 def _print_info(ctx, info, title): |
967 def _print_info(ctx, info, title): |
1052 return u'\t[-] %s' % domain |
1048 return u'\t[-] %s' % domain |
1053 |
1049 |
1054 |
1050 |
1055 def _print_domain_list(dids, domains, matching): |
1051 def _print_domain_list(dids, domains, matching): |
1056 """Print a list of (matching) domains/alias domains.""" |
1052 """Print a list of (matching) domains/alias domains.""" |
1057 if matching: |
1053 title = _(u'Matching domains') if matching else _(u'Existing domains') |
1058 title = _(u'Matching domains') |
|
1059 else: |
|
1060 title = _(u'Existing domains') |
|
1061 w_std(title, '-' * len(title)) |
1054 w_std(title, '-' * len(title)) |
1062 if domains: |
1055 if domains: |
1063 for did in dids: |
1056 for did in dids: |
1064 if domains[did][0] is not None: |
1057 if domains[did][0] is not None: |
1065 w_std(_format_domain(domains[did][0])) |
1058 w_std(_format_domain(domains[did][0])) |