@@ -89,7 +89,7 @@ def __init__(self):
89
89
90
90
# Declare instance attributes
91
91
self .actions = []
92
- self .menu = self .tr (u "&NLS GeoPackage Downloader" )
92
+ self .menu = self .tr ("&NLS GeoPackage Downloader" )
93
93
94
94
# Check if plugin was started the first time in current QGIS session
95
95
# Must be set in initGui() to survive plugin reloads
@@ -200,7 +200,7 @@ def initGui(self): # noqa N802
200
200
201
201
self .add_action (
202
202
resources_path ("icons" , "icon.png" ),
203
- text = self .tr (u "NLS GeoPackage Downloader" ),
203
+ text = self .tr ("NLS GeoPackage Downloader" ),
204
204
callback = self .run ,
205
205
parent = self .iface .mainWindow (),
206
206
)
@@ -220,7 +220,7 @@ def _migrate_settings():
220
220
def unload (self ):
221
221
"""Removes the plugin menu item and icon from QGIS GUI."""
222
222
for action in self .actions :
223
- self .iface .removePluginMenu (self .tr (u "&NLS GeoPackage Downloader" ), action )
223
+ self .iface .removePluginMenu (self .tr ("&NLS GeoPackage Downloader" ), action )
224
224
self .iface .removeToolBarIcon (action )
225
225
226
226
def run (self ):
@@ -249,8 +249,8 @@ def run(self):
249
249
if not self .load_layers ():
250
250
QMessageBox .critical (
251
251
self .iface .mainWindow (),
252
- self .tr (u "Failed to load data" ),
253
- self .tr (u "Check that necessary files exist in data folder" ),
252
+ self .tr ("Failed to load data" ),
253
+ self .tr ("Check that necessary files exist in data folder" ),
254
254
)
255
255
return
256
256
@@ -292,8 +292,8 @@ def run(self):
292
292
if self .fileName == "" :
293
293
QMessageBox .critical (
294
294
self .iface .mainWindow (),
295
- self .tr (u "Invalid filename" ),
296
- self .tr (u "Please enter a filename" ),
295
+ self .tr ("Invalid filename" ),
296
+ self .tr ("Please enter a filename" ),
297
297
)
298
298
return
299
299
if self .fileName .split ("." )[- 1 ].lower () != "gpkg" :
@@ -391,8 +391,8 @@ def run(self):
391
391
self .progress_dialog .hide ()
392
392
QMessageBox .critical (
393
393
self .iface .mainWindow (),
394
- self .tr (u "Invalid selection" ),
395
- self .tr (u "Found nothing to download!" ),
394
+ self .tr ("Invalid selection" ),
395
+ self .tr ("Found nothing to download!" ),
396
396
)
397
397
return
398
398
@@ -673,7 +673,7 @@ def get_intersecting_features(self, features, layer, selected_mun_names=None):
673
673
if selected_mun_names :
674
674
expression = ""
675
675
for mun in selected_mun_names :
676
- expression += u '"NAMEFIN" = \' ' + mun + u "' OR "
676
+ expression += '"NAMEFIN" = \' ' + mun + "' OR "
677
677
expression = expression [:- 4 ]
678
678
679
679
iter = self .municipality_layer .getFeatures (expression )
@@ -694,7 +694,6 @@ def get_intersecting_features(self, features, layer, selected_mun_names=None):
694
694
self .utm25lr_features .append (layer_feature )
695
695
696
696
def download_data (self , product_types ):
697
-
698
697
self .all_urls = []
699
698
self .total_download_count = 0
700
699
self .download_count = 0
@@ -858,9 +857,8 @@ def finish_processing(self):
858
857
)
859
858
)
860
859
self .iface .messageBar ().pushMessage (
861
- self .tr (u"GeoPackage creation finished" ),
862
- self .tr (u"NLS data download finished. Data located under " )
863
- + self .gpkg_path ,
860
+ self .tr ("GeoPackage creation finished" ),
861
+ self .tr ("NLS data download finished. Data located under " ) + self .gpkg_path ,
864
862
level = 3 ,
865
863
)
866
864
self .progress_dialog .hide ()
@@ -887,8 +885,8 @@ def show_settings_dialog(self):
887
885
# cannot work without the key, so user needs to be notified
888
886
QMessageBox .critical (
889
887
self .iface .mainWindow (),
890
- self .tr (u "User-key is needed" ),
891
- self .tr (u "Data cannot be downloaded without the NLS key" ),
888
+ self .tr ("User-key is needed" ),
889
+ self .tr ("Data cannot be downloaded without the NLS key" ),
892
890
)
893
891
return False
894
892
self .data_download_dir = (
@@ -903,8 +901,8 @@ def show_settings_dialog(self):
903
901
# cannot work without the key, so user needs to be notified
904
902
QMessageBox .critical (
905
903
self .iface .mainWindow (),
906
- self .tr (u "User-key is needed" ),
907
- self .tr (u "Data cannot be downloaded without the NLS key" ),
904
+ self .tr ("User-key is needed" ),
905
+ self .tr ("Data cannot be downloaded without the NLS key" ),
908
906
)
909
907
return False
910
908
0 commit comments