Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename translation function alias #428

Merged
merged 8 commits into from
Mar 1, 2021
14 changes: 7 additions & 7 deletions jupyter_server/extension/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from jupyter_core.application import JupyterApp, NoStart

from jupyter_server.serverapp import ServerApp
from jupyter_server.transutils import _
from jupyter_server.transutils import _i18n
from jupyter_server.utils import url_path_join
from .handler import ExtensionHandlerMixin

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

jinja2_options = Dict(
help=_("""Options to pass to the jinja2 environment for this
help=_i18n("""Options to pass to the jinja2 environment for this
""")
).tag(config=True)

Expand Down Expand Up @@ -230,24 +230,24 @@ def _default_static_url_prefix(self):
).tag(config=True)

template_paths = List(Unicode(),
help=_("""Paths to search for serving jinja templates.
help=_i18n("""Paths to search for serving jinja templates.

Can be used to override templates from notebook.templates.""")
).tag(config=True)

settings = Dict(
help=_("""Settings that will passed to the server.""")
help=_i18n("""Settings that will passed to the server.""")
).tag(config=True)

handlers = List(
help=_("""Handlers appended to the server.""")
help=_i18n("""Handlers appended to the server.""")
).tag(config=True)

def _config_file_name_default(self):
"""The default config file name."""
if not self.name:
return ''
return 'jupyter_{}_config'.format(self.name.replace('-','_'))
return 'jupyter_{}_config'.format(self.name.replace('-', '_'))

def initialize_settings(self):
"""Override this method to add handling of settings."""
Expand Down Expand Up @@ -519,4 +519,4 @@ def launch_instance(cls, argv=None, **kwargs):
try:
serverapp.start()
except NoStart:
pass
pass
2 changes: 1 addition & 1 deletion jupyter_server/i18n/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ communicate this back to Jinja2. So far, I haven't yet figured out how to do th
of languages in the UI ( never a good thing ).

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