mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Delay loading modules and objects until gettext is loaded
This was resulting in strings not getting translated, especially when the calls to gettext came at the lowest indent level of the module.
This commit is contained in:
parent
bc47cb3d97
commit
314a519dfc
5 changed files with 163 additions and 13 deletions
|
|
@ -125,6 +125,7 @@ from zenmapCore.Name import APP_NAME, NMAP_DISPLAY_NAME
|
|||
from zenmapCore.Version import VERSION
|
||||
import zenmapCore.I18N
|
||||
from zenmapCore.BasePaths import base_paths
|
||||
from zenmapCore.DelayedObject import DelayedObject
|
||||
|
||||
|
||||
class UmitOptionParser(OptionParser):
|
||||
|
|
@ -259,7 +260,7 @@ used more than once to get even more verbosity"))
|
|||
"""
|
||||
return 40 - (self.options.verbose * 10)
|
||||
|
||||
option_parser = UmitOptionParser()
|
||||
option_parser = DelayedObject(UmitOptionParser)
|
||||
|
||||
if __name__ == "__main__":
|
||||
opt = UmitOptionParser()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue