[gnome-maps/wip/mlundblad/es6-modules: 4/22] application: Use string templates instead of imports.format
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/es6-modules: 4/22] application: Use string templates instead of imports.format
- Date: Sun, 29 May 2022 20:47:37 +0000 (UTC)
commit 4ffca770c54c2735534da0a42bf237e993560cc6
Author: Marcus Lundblad <ml dfupdate se>
Date: Mon May 23 23:13:49 2022 +0200
application: Use string templates instead of imports.format
imports.format is deprecated. Use ES string templates instead.
Keep using format for gettext. See also:
https://gitlab.gnome.org/GNOME/gjs/-/issues/374
src/application.js | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/application.js b/src/application.js
index fc5020a3..8ad2c316 100644
--- a/src/application.js
+++ b/src/application.js
@@ -29,7 +29,6 @@ import GtkClutter from 'gi://GtkClutter';
import Hdy from 'gi://Handy';
import {ContactPlace} from './contactPlace.js';
-const Format = imports.format;
import {Geoclue} from './geoclue.js';
import * as GeocodeFactory from './geocode.js';
import {MainWindow} from './mainWindow.js';
@@ -43,6 +42,8 @@ import {Settings} from './settings.js';
import * as Utils from './utils.js';
import * as URIS from './uris.js';
+const Format = imports.format;
+
const _ensuredTypes = [OSMTypeSearchEntry];
export class Application extends Gtk.Application {
@@ -260,7 +261,7 @@ export class Application extends Gtk.Application {
this._mainWindow.connect('destroy', () => this._onWindowDestroy());
if (GLib.getenv('MAPS_DEBUG') === 'focus') {
this._mainWindow.connect('set-focus', (window, widget) => {
- log('* focus widget: %s'.format(widget));
+ log(`* focus widget: ${widget}`);
});
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]