mirror of
https://github.com/nmap/nmap.git
synced 2025-12-07 13:11:28 +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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user