9
9
__version__ ,
10
10
)
11
11
from jupyter_core .paths import jupyter_path
12
- from jupyter_server .transutils import _
12
+ from jupyter_server .transutils import _i18n
13
13
from jupyter_server .utils import url_path_join
14
14
15
15
16
16
class NotebookAppTraits (HasTraits ):
17
17
18
18
ignore_minified_js = Bool (False ,
19
19
config = True ,
20
- help = _ ('Deprecated: Use minified JS file or not, mainly use during dev to avoid JS recompilation' ),
20
+ help = _i18n ('Deprecated: Use minified JS file or not, mainly use during dev to avoid JS recompilation' ),
21
21
)
22
22
23
23
24
24
jinja_environment_options = Dict (config = True ,
25
- help = _ ("Supply extra arguments that will be passed to Jinja environment." ))
25
+ help = _i18n ("Supply extra arguments that will be passed to Jinja environment." ))
26
26
27
27
jinja_template_vars = Dict (
28
28
config = True ,
29
- help = _ ("Extra variables to supply to jinja templates when rendering." ),
29
+ help = _i18n ("Extra variables to supply to jinja templates when rendering." ),
30
30
)
31
31
32
32
enable_mathjax = Bool (True , config = True ,
@@ -59,7 +59,7 @@ def static_file_path(self):
59
59
return self .extra_static_paths + [DEFAULT_STATIC_FILES_PATH ]
60
60
61
61
static_custom_path = List (Unicode (),
62
- help = _ ("""Path to search for custom.js, css""" )
62
+ help = _i18n ("""Path to search for custom.js, css""" )
63
63
)
64
64
65
65
@default ('static_custom_path' )
@@ -71,7 +71,7 @@ def _default_static_custom_path(self):
71
71
]
72
72
73
73
extra_template_paths = List (Unicode (), config = True ,
74
- help = _ ("""Extra paths to search for serving jinja templates.
74
+ help = _i18n ("""Extra paths to search for serving jinja templates.
75
75
76
76
Can be used to override templates from notebook.templates.""" )
77
77
)
@@ -82,7 +82,7 @@ def template_file_path(self):
82
82
return self .extra_template_paths + DEFAULT_TEMPLATE_PATH_LIST
83
83
84
84
extra_nbextensions_path = List (Unicode (), config = True ,
85
- help = _ ("""extra paths to look for Javascript notebook extensions""" )
85
+ help = _i18n ("""extra paths to look for Javascript notebook extensions""" )
86
86
)
87
87
88
88
@property
@@ -124,24 +124,24 @@ def _update_mathjax_url(self, change):
124
124
# enable_mathjax=False overrides mathjax_url
125
125
self .mathjax_url = u''
126
126
else :
127
- self .log .info (_ ("Using MathJax: %s" ), new )
127
+ self .log .info (_i18n ("Using MathJax: %s" ), new )
128
128
129
129
mathjax_config = Unicode ("TeX-AMS-MML_HTMLorMML-full,Safe" , config = True ,
130
- help = _ ("""The MathJax.js configuration file that is to be used.""" )
130
+ help = _i18n ("""The MathJax.js configuration file that is to be used.""" )
131
131
)
132
132
133
133
@observe ('mathjax_config' )
134
134
def _update_mathjax_config (self , change ):
135
- self .log .info (_ ("Using MathJax configuration file: %s" ), change ['new' ])
135
+ self .log .info (_i18n ("Using MathJax configuration file: %s" ), change ['new' ])
136
136
137
137
quit_button = Bool (True , config = True ,
138
138
help = """If True, display a button in the dashboard to quit
139
139
(shutdown the notebook server)."""
140
140
)
141
141
142
142
nbserver_extensions = Dict ({}, config = True ,
143
- help = (_ ("Dict of Python modules to load as notebook server extensions."
143
+ help = (_i18n ("Dict of Python modules to load as notebook server extensions."
144
144
"Entry values can be used to enable and disable the loading of"
145
145
"the extensions. The extensions will be loaded in alphabetical "
146
146
"order." ))
147
- )
147
+ )
0 commit comments