Skip to content

Commit

Permalink
Merge pull request #161 from suricactus/hig_strings
Browse files Browse the repository at this point in the history
HIG strings
  • Loading branch information
suricactus authored Jul 6, 2020
2 parents 4108410 + f667549 commit 2d5ac6d
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- stage: deploy
name: Update translations
if: branch = master
if: branch = master and type = push
install:
- pip install qgis-plugin-ci
script: qgis-plugin-ci push-translation ${TX_TOKEN}
Expand Down
6 changes: 3 additions & 3 deletions qfieldsync/core/offline_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def convert(self):
for layer in self.__layers:
original_layer_info[layer.id()] = (layer.source(), layer.name())

self.total_progress_updated.emit(0, 1, self.tr('Creating base map'))
self.total_progress_updated.emit(0, 1, self.tr('Creating base map'))
# Create the base map before layers are removed
if self.project_configuration.create_base_map:
if 'processing' not in qgis.utils.plugins:
Expand All @@ -123,7 +123,7 @@ def convert(self):
copied_files = list()
for current_layer_index, layer in enumerate(self.__layers):
self.total_progress_updated.emit(current_layer_index - len(self.__offline_layers), len(self.__layers),
self.tr('Copying layers'))
self.tr('Copying layers'))
layer_source = LayerSource(layer)

if layer_source.action == SyncAction.OFFLINE:
Expand Down Expand Up @@ -257,7 +257,7 @@ def createBaseMapLayer(self, map_theme, layer, tile_size, map_units_per_pixel):

@pyqtSlot(int, int)
def on_offline_editing_next_layer(self, layer_index, layer_count):
msg = self.tr(u'Packaging layer {layer_name}').format(layer_name=self.__offline_layers[layer_index - 1].name())
msg = self.tr('Packaging layer {layer_name}').format(layer_name=self.__offline_layers[layer_index - 1].name())
self.total_progress_updated.emit(layer_index, layer_count, msg)

@pyqtSlot('QgsOfflineEditing::ProgressMode', int)
Expand Down
6 changes: 3 additions & 3 deletions qfieldsync/gui/package_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ def do_post_offline_convert_action(self):
"""
export_folder = self.get_export_folder_from_dialog()

result_label = QLabel(self.tr(u'Finished creating the project at {result_folder}. Please copy this folder to '
u'your QField device.').format(
result_folder=u'<a href="{folder}">{folder}</a>'.format(folder=export_folder)))
result_label = QLabel(self.tr('Finished creating the project at {result_folder}. Please copy this folder to '
'your QField device.').format(
result_folder='<a href="{folder}">{folder}</a>'.format(folder=export_folder)))
result_label.setTextFormat(Qt.RichText)
result_label.setTextInteractionFlags(Qt.TextBrowserInteraction)
result_label.linkActivated.connect(lambda: open_folder(export_folder))
Expand Down
12 changes: 6 additions & 6 deletions qfieldsync/gui/project_configuration_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ def __init__(self, iface, parent=None):
self.multipleToggleButton.setIcon(QIcon(os.path.join(os.path.dirname(__file__), '../resources/visibility.svg')))

self.toggle_menu = QMenu(self)
self.remove_all_action = QAction(self.tr("remove all layers"), self.toggle_menu)
self.remove_all_action = QAction(self.tr("Remove All Layers"), self.toggle_menu)
self.toggle_menu.addAction(self.remove_all_action)
self.remove_hidden_action = QAction(self.tr("remove hidden layers"), self.toggle_menu)
self.remove_hidden_action = QAction(self.tr("Remove Hidden Layers"), self.toggle_menu)
self.toggle_menu.addAction(self.remove_hidden_action)
self.add_all_copy_action = QAction(self.tr("add all layers"), self.toggle_menu)
self.add_all_copy_action = QAction(self.tr("Add All Layers"), self.toggle_menu)
self.toggle_menu.addAction(self.add_all_copy_action)
self.add_visible_copy_action = QAction(self.tr("add visible layers"), self.toggle_menu)
self.add_visible_copy_action = QAction(self.tr("Add Visible Layers"), self.toggle_menu)
self.toggle_menu.addAction(self.add_visible_copy_action)
self.add_all_offline_action = QAction(self.tr("add all vector layers as offline"), self.toggle_menu)
self.add_all_offline_action = QAction(self.tr("Add All Vector Layers as Offline"), self.toggle_menu)
self.toggle_menu.addAction(self.add_all_offline_action)
self.add_visible_offline_action = QAction(self.tr("add visible vector layers as offline"), self.toggle_menu)
self.add_visible_offline_action = QAction(self.tr("Add Visible Vector Layers as Offline"), self.toggle_menu)
self.toggle_menu.addAction(self.add_visible_offline_action)
self.multipleToggleButton.setMenu(self.toggle_menu)
self.multipleToggleButton.setAutoRaise(True)
Expand Down
6 changes: 3 additions & 3 deletions qfieldsync/gui/synchronize_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ def start_synchronization(self):
imported_files_checksums.append(import_file_checksum(qfield_folder))
ProjectConfiguration(QgsProject.instance()).imported_files_checksums = imported_files_checksums
QgsProject.instance().write()
self.iface.messageBar().pushInfo('QFieldSync', self.tr(u"Opened original project {}".format(original_project_path)))
self.iface.messageBar().pushInfo('QFieldSync', self.tr("Opened original project {}".format(original_project_path)))
else:
self.iface.messageBar().pushInfo('QFieldSync', self.tr(u"The data has been synchronized successfully but the original project ({}) could not be opened. ".format(original_project_path)))
self.iface.messageBar().pushInfo('QFieldSync', self.tr("The data has been synchronized successfully but the original project ({}) could not be opened".format(original_project_path)))
else:
self.iface.messageBar().pushInfo('QFieldSync', self.tr(u"No original project path found."))
self.iface.messageBar().pushInfo('QFieldSync', self.tr("No original project path found"))
self.close()
else:
message = self.tr("The project you imported does not seem to be an offline project")
Expand Down
16 changes: 8 additions & 8 deletions qfieldsync/qfield_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ def __init__(self, iface):

# Declare instance attributes
self.actions = []
self.menu = self.tr(u'&QFieldSync')
self.menu = self.tr('&QFieldSync')
# TODO: We are going to let the user set this up in a future iteration
self.toolbar = self.iface.addToolBar(u'QFieldSync')
self.toolbar.setObjectName(u'QFieldSync')
self.toolbar = self.iface.addToolBar('QFieldSync')
self.toolbar.setObjectName('QFieldSync')

# instance of the map config widget factory, shown in layer properties
self.mapLayerConfigWidgetFactory = MapLayerConfigWidgetFactory('QField', QIcon(os.path.join(os.path.dirname(__file__), 'resources/icon.png')))
Expand Down Expand Up @@ -186,27 +186,27 @@ def initGui(self):

self.push_action = self.add_action(
os.path.join(os.path.dirname(__file__), 'resources/refresh.png'),
text=self.tr(u'Package for QField'),
text=self.tr('Package for QField'),
callback=self.show_package_dialog,
parent=self.iface.mainWindow())

self.add_action(
os.path.join(os.path.dirname(__file__), 'resources/refresh-reverse.png'),
text=self.tr(u'Synchronize from QField'),
text=self.tr('Synchronize from QField'),
callback=self.show_synchronize_dialog,
parent=self.iface.mainWindow())

self.add_action(
os.path.join(os.path.dirname(__file__), './resources/icon.png'),
text=self.tr(u'Project Configuration'),
text=self.tr('Project Configuration'),
callback=self.show_project_configuration_dialog,
parent=self.iface.mainWindow(),
add_to_toolbar=False
)

self.add_action(
os.path.join(os.path.dirname(__file__), './resources/icon.png' ),
text=self.tr(u'Preferences'),
text=self.tr('Preferences'),
callback=self.show_preferences_dialog,
parent=self.iface.mainWindow(),
add_to_toolbar=False)
Expand All @@ -219,7 +219,7 @@ def unload(self):
"""Removes the plugin menu item and icon from QGIS GUI."""
for action in self.actions:
self.iface.removePluginMenu(
self.tr(u'&QFieldSync'),
self.tr('&QFieldSync'),
action)
self.iface.removeToolBarIcon(action)
# remove the toolbar
Expand Down
4 changes: 2 additions & 2 deletions qfieldsync/ui/package_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Package project for QField</string>
<string>Package Project for QField</string>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<item row="2" column="0" colspan="2">
Expand Down Expand Up @@ -89,7 +89,7 @@
<item row="0" column="0">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Select extent</string>
<string>Select Extent</string>
</property>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
Expand Down
2 changes: 1 addition & 1 deletion qfieldsync/ui/preferences_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>QFieldSync preferences</string>
<string>QFieldSync Preferences</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
Expand Down
6 changes: 3 additions & 3 deletions qfieldsync/ui/project_configuration_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>Configure Project for QField synchronisation</string>
<string>Configure Project for QField Synchronisation</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
Expand Down Expand Up @@ -119,7 +119,7 @@
<string>A base map is fully rendered to a raster image. Attributes from layers on a base map are no longer accessible.</string>
</property>
<property name="title">
<string>Create base map</string>
<string>Create Base Map</string>
</property>
<property name="checkable">
<bool>true</bool>
Expand Down Expand Up @@ -266,7 +266,7 @@
<item row="0" column="0">
<widget class="QCheckBox" name="onlyOfflineCopyFeaturesInAoi">
<property name="text">
<string>Only copy features in area of interest</string>
<string>Only Copy Features in Area of Interest</string>
</property>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions qfieldsync/ui/synchronize_dialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
</rect>
</property>
<property name="windowTitle">
<string>Synchronize project</string>
<string>Synchronize Project</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the QField project folder&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select the QField Project Folder&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="textFormat">
<enum>Qt::RichText</enum>
Expand Down

0 comments on commit 2d5ac6d

Please sign in to comment.