Skip to content

Commit 3e8a11f

Browse files
committed
Remove unicode prefixes
1 parent 929510a commit 3e8a11f

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

nlsgpkgloader/nls_geopackage_loader.py

+16-18
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def __init__(self):
8989

9090
# Declare instance attributes
9191
self.actions = []
92-
self.menu = self.tr(u"&NLS GeoPackage Downloader")
92+
self.menu = self.tr("&NLS GeoPackage Downloader")
9393

9494
# Check if plugin was started the first time in current QGIS session
9595
# Must be set in initGui() to survive plugin reloads
@@ -200,7 +200,7 @@ def initGui(self): # noqa N802
200200

201201
self.add_action(
202202
resources_path("icons", "icon.png"),
203-
text=self.tr(u"NLS GeoPackage Downloader"),
203+
text=self.tr("NLS GeoPackage Downloader"),
204204
callback=self.run,
205205
parent=self.iface.mainWindow(),
206206
)
@@ -220,7 +220,7 @@ def _migrate_settings():
220220
def unload(self):
221221
"""Removes the plugin menu item and icon from QGIS GUI."""
222222
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)
224224
self.iface.removeToolBarIcon(action)
225225

226226
def run(self):
@@ -249,8 +249,8 @@ def run(self):
249249
if not self.load_layers():
250250
QMessageBox.critical(
251251
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"),
254254
)
255255
return
256256

@@ -292,8 +292,8 @@ def run(self):
292292
if self.fileName == "":
293293
QMessageBox.critical(
294294
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"),
297297
)
298298
return
299299
if self.fileName.split(".")[-1].lower() != "gpkg":
@@ -391,8 +391,8 @@ def run(self):
391391
self.progress_dialog.hide()
392392
QMessageBox.critical(
393393
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!"),
396396
)
397397
return
398398

@@ -673,7 +673,7 @@ def get_intersecting_features(self, features, layer, selected_mun_names=None):
673673
if selected_mun_names:
674674
expression = ""
675675
for mun in selected_mun_names:
676-
expression += u'"NAMEFIN" = \'' + mun + u"' OR "
676+
expression += '"NAMEFIN" = \'' + mun + "' OR "
677677
expression = expression[:-4]
678678

679679
iter = self.municipality_layer.getFeatures(expression)
@@ -694,7 +694,6 @@ def get_intersecting_features(self, features, layer, selected_mun_names=None):
694694
self.utm25lr_features.append(layer_feature)
695695

696696
def download_data(self, product_types):
697-
698697
self.all_urls = []
699698
self.total_download_count = 0
700699
self.download_count = 0
@@ -858,9 +857,8 @@ def finish_processing(self):
858857
)
859858
)
860859
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,
864862
level=3,
865863
)
866864
self.progress_dialog.hide()
@@ -887,8 +885,8 @@ def show_settings_dialog(self):
887885
# cannot work without the key, so user needs to be notified
888886
QMessageBox.critical(
889887
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"),
892890
)
893891
return False
894892
self.data_download_dir = (
@@ -903,8 +901,8 @@ def show_settings_dialog(self):
903901
# cannot work without the key, so user needs to be notified
904902
QMessageBox.critical(
905903
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"),
908906
)
909907
return False
910908

0 commit comments

Comments
 (0)