[gnome-maps/wip/mlundblad/es6-modules: 11/29] 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: 11/29] application: Use string templates instead of imports.format
- Date: Thu, 2 Jun 2022 20:47:38 +0000 (UTC)
commit 6a884e9882618e20d01605b39a81256830cc27ba
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]