Skip to content

Commit 9e149a4

Browse files
nmaarnioLKajan
authored andcommitted
plugin UI elements to finnish
1 parent 9cc3565 commit 9e149a4

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

arho_feature_template/gui/template_dock.ui

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<set>Qt::LeftDockWidgetArea|Qt::RightDockWidgetArea</set>
1515
</property>
1616
<property name="windowTitle">
17-
<string>Feature Templates</string>
17+
<string>Kaavakohteiden ja -määräysten templaatit</string>
1818
</property>
1919
<widget class="QWidget" name="dockWidgetContents">
2020
<layout class="QVBoxLayout" name="verticalLayout">
@@ -49,7 +49,7 @@
4949
<item>
5050
<widget class="QLabel" name="txt_tip">
5151
<property name="text">
52-
<string>TextLabel</string>
52+
<string/>
5353
</property>
5454
</widget>
5555
</item>

arho_feature_template/plugin.py

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import os
43
from typing import TYPE_CHECKING, Callable, cast
54

65
from qgis.PyQt.QtCore import QCoreApplication, Qt, QTranslator
@@ -16,7 +15,6 @@
1615
from arho_feature_template.qgis_plugin_tools.tools.i18n import setup_translation
1716
from arho_feature_template.qgis_plugin_tools.tools.resources import plugin_name
1817
from arho_feature_template.utils.db_utils import get_existing_database_connection_names
19-
from arho_feature_template.utils.misc_utils import PLUGIN_PATH
2018

2119
if TYPE_CHECKING:
2220
from qgis.gui import QgisInterface, QgsMapTool
@@ -129,39 +127,41 @@ def initGui(self) -> None: # noqa N802
129127
self.templater = FeatureTemplater()
130128
self.new_plan = NewPlan()
131129

132-
plan_icon_path = os.path.join(PLUGIN_PATH, "resources/icons/city.png") # A placeholder icon
133-
load_icon_path = os.path.join(PLUGIN_PATH, "resources/icons/folder.png") # A placeholder icon
130+
# plan_icon_path = os.path.join(PLUGIN_PATH, "resources/icons/city.png") # A placeholder icon
131+
# load_icon_path = os.path.join(PLUGIN_PATH, "resources/icons/folder.png") # A placeholder icon
134132

135133
iface.addDockWidget(Qt.RightDockWidgetArea, self.templater.template_dock)
136134
self.templater.template_dock.visibilityChanged.connect(self.dock_visibility_changed)
137135

138136
iface.mapCanvas().mapToolSet.connect(self.templater.digitize_map_tool.deactivate)
139137

140138
# Add main plugin action to the toolbar
141-
self.template_dock_action = self.add_action(
142-
"",
143-
"Feature Templates",
144-
None,
145-
toggled_callback=self.toggle_template_dock,
146-
checkable=True,
147-
add_to_menu=True,
148-
add_to_toolbar=True,
149-
)
150-
151139
self.new_land_use_plan_action = self.add_action(
152-
plan_icon_path,
153-
"Create New Land Use Plan",
140+
"",
141+
"Luo uusi kaava",
154142
self.add_new_plan,
155143
add_to_menu=True,
156144
add_to_toolbar=True,
157-
status_tip="Create a new land use plan",
145+
status_tip="Luo uusi kaava",
158146
)
159147

160148
self.load_land_use_plan_action = self.add_action(
161-
load_icon_path,
162-
text="Load existing land use plan",
149+
"",
150+
text="Lataa/avaa kaavaa",
163151
triggered_callback=self.load_existing_land_use_plan,
164152
parent=iface.mainWindow(),
153+
add_to_menu=True,
154+
add_to_toolbar=True,
155+
status_tip="Lataa/avaa kaava",
156+
)
157+
158+
self.template_dock_action = self.add_action(
159+
"",
160+
"Kaavatemplaatit",
161+
None,
162+
toggled_callback=self.toggle_template_dock,
163+
checkable=True,
164+
add_to_menu=True,
165165
add_to_toolbar=True,
166166
)
167167

0 commit comments

Comments
 (0)