From: David F. <dav...@us...> - 2004-12-14 19:56:31
|
Update of /cvsroot/translate/src/translate/convert In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23382 Modified Files: po2dtd.py po2prop.py po2moz.py Log Message: use add_fuzzy_option to simplify life. also added to po2moz (using the underlying functions it should all work) Index: po2moz.py =================================================================== RCS file: /cvsroot/translate/src/translate/convert/po2moz.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- po2moz.py 14 Dec 2004 13:12:13 -0000 1.2 +++ po2moz.py 14 Dec 2004 19:56:20 -0000 1.3 @@ -70,5 +70,6 @@ parser = MozConvertOptionParser(formats, usetemplates=True, description=__doc__) parser.add_option("-l", "--locale", dest="locale", default=None, help="set output locale (required as this sets the directory names)", metavar="LOCALE") + parser.add_fuzzy_option() parser.run() Index: po2prop.py =================================================================== RCS file: /cvsroot/translate/src/translate/convert/po2prop.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- po2prop.py 14 Dec 2004 19:39:11 -0000 1.26 +++ po2prop.py 14 Dec 2004 19:56:20 -0000 1.27 @@ -121,10 +121,6 @@ from translate.convert import convert formats = {("po", "properties"): ("properties", convertprop)} parser = convert.ConvertOptionParser(formats, usetemplates=True, description=__doc__) - parser.add_option("", "--fuzzy", dest="includefuzzy", action="store_true", default=False, - help="use translations marked fuzzy") - parser.add_option("", "--nofuzzy", dest="includefuzzy", action="store_false", default=False, - help="don't use translations marked fuzzy (default)") - parser.passthrough.append("includefuzzy") + parser.add_fuzzy_option() parser.run() Index: po2dtd.py =================================================================== RCS file: /cvsroot/translate/src/translate/convert/po2dtd.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- po2dtd.py 14 Dec 2004 19:11:45 -0000 1.24 +++ po2dtd.py 14 Dec 2004 19:56:20 -0000 1.25 @@ -266,10 +266,6 @@ from translate.convert import convert formats = {"po": ("dtd", convertdtd), ("po", "dtd"): ("dtd", convertdtd)} parser = convert.ConvertOptionParser(formats, usetemplates=True, description=__doc__) - parser.add_option("", "--fuzzy", dest="includefuzzy", action="store_true", default=False, - help="use translations marked fuzzy") - parser.add_option("", "--nofuzzy", dest="includefuzzy", action="store_false", default=False, - help="don't use translations marked fuzzy (default)") - parser.passthrough.append("includefuzzy") + parser.add_fuzzy_option() parser.run() |