diff --git a/jupyter_server/auth/identity.py b/jupyter_server/auth/identity.py index fd2b3db85d..be238b63e5 100644 --- a/jupyter_server/auth/identity.py +++ b/jupyter_server/auth/identity.py @@ -651,7 +651,7 @@ def process_login_form(self, handler: web.RequestHandler) -> User | None: config_dir = handler.settings.get("config_dir", "") config_file = os.path.join(config_dir, "jupyter_server_config.json") self.hashed_password = set_password(new_password, config_file=config_file) - self.log.info(_i18n(f"Wrote hashed password to {config_file}")) + self.log.info(_i18n("Wrote hashed password to {file}").format(file=config_file)) return user diff --git a/jupyter_server/serverapp.py b/jupyter_server/serverapp.py index 01489e3dc5..75143b6be8 100644 --- a/jupyter_server/serverapp.py +++ b/jupyter_server/serverapp.py @@ -2857,7 +2857,9 @@ def running_server_info(self, kernel_count: bool = True) -> str: info += kernel_msg % n_kernels info += "\n" # Format the info so that the URL fits on a single line in 80 char display - info += _i18n(f"Jupyter Server {ServerApp.version} is running at:\n{self.display_url}") + info += _i18n("Jupyter Server {version} is running at:\n{url}").format( + version=ServerApp.version, url=self.display_url + ) if self.gateway_config.gateway_enabled: info += ( _i18n("\nKernels will be managed by the Gateway server running at:\n%s")