Skip to content

Commit d07853e

Browse files
authored
Merge pull request #428 from sngyo/rename-transfunction
Rename translation function alias
2 parents bf00ad0 + 5210fa2 commit d07853e

File tree

6 files changed

+108
-100
lines changed

6 files changed

+108
-100
lines changed

jupyter_server/extension/application.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from jupyter_core.application import JupyterApp, NoStart
2020

2121
from jupyter_server.serverapp import ServerApp
22-
from jupyter_server.transutils import _
22+
from jupyter_server.transutils import _i18n
2323
from jupyter_server.utils import url_path_join
2424
from .handler import ExtensionHandlerMixin
2525

@@ -87,7 +87,7 @@ class ExtensionAppJinjaMixin(HasTraits):
8787
"""Use Jinja templates for HTML templates on top of an ExtensionApp."""
8888

8989
jinja2_options = Dict(
90-
help=_("""Options to pass to the jinja2 environment for this
90+
help=_i18n("""Options to pass to the jinja2 environment for this
9191
""")
9292
).tag(config=True)
9393

@@ -230,24 +230,24 @@ def _default_static_url_prefix(self):
230230
).tag(config=True)
231231

232232
template_paths = List(Unicode(),
233-
help=_("""Paths to search for serving jinja templates.
233+
help=_i18n("""Paths to search for serving jinja templates.
234234
235235
Can be used to override templates from notebook.templates.""")
236236
).tag(config=True)
237237

238238
settings = Dict(
239-
help=_("""Settings that will passed to the server.""")
239+
help=_i18n("""Settings that will passed to the server.""")
240240
).tag(config=True)
241241

242242
handlers = List(
243-
help=_("""Handlers appended to the server.""")
243+
help=_i18n("""Handlers appended to the server.""")
244244
).tag(config=True)
245245

246246
def _config_file_name_default(self):
247247
"""The default config file name."""
248248
if not self.name:
249249
return ''
250-
return 'jupyter_{}_config'.format(self.name.replace('-','_'))
250+
return 'jupyter_{}_config'.format(self.name.replace('-', '_'))
251251

252252
def initialize_settings(self):
253253
"""Override this method to add handling of settings."""
@@ -519,4 +519,4 @@ def launch_instance(cls, argv=None, **kwargs):
519519
try:
520520
serverapp.start()
521521
except NoStart:
522-
pass
522+
pass

jupyter_server/i18n/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ communicate this back to Jinja2. So far, I haven't yet figured out how to do th
116116
of languages in the UI ( never a good thing ).
117117

118118
2. We will need to decide if console messages should be translatable, and enable them if desired.
119-
3. The keyboard shorcut editor was implemented after the i18n work was completed, so that portion
119+
3. The keyboard shortcut editor was implemented after the i18n work was completed, so that portion
120120
does not have translation support at this time.
121121
4. Babel's documentation has instructions on how to integrate messages extraction
122122
into your *setup.py* so that eventually we can just do:

0 commit comments

Comments
 (0)