summaryrefslogtreecommitdiffstats
path: root/doc/translator.py
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2004-08-12 12:53:19 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2004-08-12 12:53:19 (GMT)
commitedeb82c1e0cebe5437fb637c9d239a8cecfca0cb (patch)
tree96c3b47bbfb0ee3d28e46421e1317253ba052f01 /doc/translator.py
parentf4bab88acea24b261d85d25359c73cbb49869c5f (diff)
downloadDoxygen-edeb82c1e0cebe5437fb637c9d239a8cecfca0cb.zip
Doxygen-edeb82c1e0cebe5437fb637c9d239a8cecfca0cb.tar.gz
Doxygen-edeb82c1e0cebe5437fb637c9d239a8cecfca0cb.tar.bz2
Release-1.3.8-20040812
Diffstat (limited to 'doc/translator.py')
-rw-r--r--doc/translator.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/translator.py b/doc/translator.py
index c103b1b..1c32b5a 100644
--- a/doc/translator.py
+++ b/doc/translator.py
@@ -41,7 +41,8 @@
- Plural not used for reporting a single missing method.
- Removal of not used translator adapters is suggested only
when the report is not restricted to selected languages
- explicitly via script arguments
+ explicitly via script arguments.
+ 2004/07/26 - Better reporting of not-needed adapters.
"""
from __future__ import generators
@@ -1440,10 +1441,24 @@ class TrManager:
# i.e. all languages were checked against the needed translator
# adapters.
if not self.script_argLst:
+ to_remove = {}
for version, adaptClassId in self.adaptMethodsDic.values():
if version < adaptMinVersion:
- f.write('\nNote: The %s class ' % adaptClassId)
- f.write('is not used and can be removed.\n')
+ to_remove[adaptClassId] = True
+
+ if to_remove:
+ lst = to_remove.keys()
+ lst.sort()
+ plural = len(lst) > 1
+ note = 'Note: The adapter class'
+ if plural: note += 'es'
+ note += ' ' + ', '.join(lst)
+ if not plural:
+ note += ' is'
+ else:
+ note += ' are'
+ note += ' not used and can be removed.'
+ f.write('\n' + fill(note) + '\n')
# Write the list of the English-based classes.
if self.EnBasedIdLst: