Skip to content

Commit

Permalink
Merge pull request #2071 from borysiasty/develop
Browse files Browse the repository at this point in the history
Wizard updates
  • Loading branch information
borysiasty committed Jun 27, 2015
2 parents cee6fa4 + b0b3606 commit 0741cfe
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
4 changes: 2 additions & 2 deletions i18n/inasafe_af.ts
Expand Up @@ -6090,7 +6090,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="wizard_dialog.py" line="159"/>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resample&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resampling&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<translation type="unfinished"/>
</message>
<message>
Expand Down Expand Up @@ -6553,4 +6553,4 @@ Please step back and select another layer.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
</TS>
2 changes: 1 addition & 1 deletion i18n/inasafe_en.ts
Expand Up @@ -6101,7 +6101,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="wizard_dialog.py" line="159"/>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resample&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resampling&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions i18n/inasafe_es_ES.ts
Expand Up @@ -6090,7 +6090,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="wizard_dialog.py" line="159"/>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resample&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resampling&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<translation type="unfinished"/>
</message>
<message>
Expand Down Expand Up @@ -6553,4 +6553,4 @@ Please step back and select another layer.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
</TS>
4 changes: 2 additions & 2 deletions i18n/inasafe_fr.ts
Expand Up @@ -6090,7 +6090,7 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="wizard_dialog.py" line="159"/>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resample&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resampling&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<translation type="unfinished"/>
</message>
<message>
Expand Down Expand Up @@ -6553,4 +6553,4 @@ Please step back and select another layer.</source>
<translation type="unfinished"/>
</message>
</context>
</TS>
</TS>
Binary file modified i18n/inasafe_id.qm
Binary file not shown.
6 changes: 3 additions & 3 deletions i18n/inasafe_id.ts
Expand Up @@ -6153,8 +6153,8 @@ p, li { white-space: pre-wrap; }
</message>
<message>
<location filename="wizard_dialog.py" line="159"/>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resample&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<translation>Anda telah memilih &lt;b&gt;%s %s&lt;/b&gt;untuk lapisan raster &lt;b&gt;data %s&lt;/b&gt; ini. Untuk beberapa jenis keterpaparan, Anda mungkin tidak ingin InaSAFE untuk melakukan resampling lapisan raster ke resolusi lapisan ancaman selama melakukan analisis. Silahkan pilih check box di bawah ini jika Anda ingin mengeset &lt;i&gt;allow_resample&lt;/i&gt; menjadi &lt;i&gt;False&lt;/&gt;.</translation>
<source>You have selected &lt;b&gt;%s %s&lt;/b&gt; for this &lt;b&gt;%s data&lt;/b&gt; raster layer. For some exposure types you may want InaSAFE to not resample the raster to the hazard layer resolution during analyses. Please select the check box below if you want to set the &lt;i&gt;allow_resampling&lt;/i&gt; keyword to &lt;i&gt;False&lt;/i&gt;.</source>
<translation>Anda telah memilih &lt;b&gt;%s %s&lt;/b&gt;untuk lapisan raster &lt;b&gt;data %s&lt;/b&gt; ini. Untuk beberapa jenis keterpaparan, Anda mungkin tidak ingin InaSAFE untuk melakukan resampling lapisan raster ke resolusi lapisan ancaman selama melakukan analisis. Silahkan pilih check box di bawah ini jika Anda ingin mengeset &lt;i&gt;allow_resampling&lt;/i&gt; menjadi &lt;i&gt;False&lt;/&gt;.</translation>
</message>
<message>
<location filename="wizard_dialog.py" line="257"/>
Expand Down Expand Up @@ -6627,4 +6627,4 @@ Silahkan mundur ke langkah sebelumnya dan pilih lapisan lainnya.</translation>
<translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Cara lain, &lt;a href=&quot;define_user_extent&quot;&gt; &lt;span style=&quot; text-decoration: underline; color:#e85290;&quot;&gt;definisikan luasan analisis sekarang...&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
</message>
</context>
</TS>
</TS>
26 changes: 15 additions & 11 deletions safe/gui/tools/wizard_dialog.py
Expand Up @@ -180,9 +180,9 @@
allow_resampling_question = QApplication.translate(
'WizardDialog',
'You have selected <b>%s %s</b> for this <b>%s data</b> raster layer. '
'For some exposure types you may want InaSAFE to not resample '
'the raster to the hazard layer resolution during analyses. Please '
'select the check box below if you want to set the <i>allow_resample</i> '
'For some exposure types you may want InaSAFE to not resample the raster '
'to the hazard layer resolution during analyses. Please select the '
'check box below if you want to set the <i>allow_resampling</i> '
'keyword to <i>False</i>.') # (subcategory, category, layer_mode)

# Constants for subcategory-unit relations
Expand Down Expand Up @@ -1423,12 +1423,12 @@ def set_widgets_step_kw_field(self):
# STEP_KW_RESAMPLE
# ===========================

def selected_allowresample(self):
"""Obtain the allow_resample state selected by user.
def selected_allowresampling(self):
"""Obtain the allow_resampling state selected by user.
.. note:: Returns none if not set or not relevant
:returns: Value of the allow_resample or None for not-set.
:returns: Value of the allow_resampling or None for not-set.
:rtype: boolean or None
"""
if not is_raster_layer(self.layer):
Expand All @@ -1453,7 +1453,7 @@ def set_widgets_step_kw_resample(self):
category['name'], layer_mode['name']))

# Set value based on existing keyword (if already assigned)
if self.get_existing_keyword('allow_resample') is False:
if self.get_existing_keyword('allow_resampling') is False:
self.chkAllowResample.setChecked(True)

# ===========================
Expand Down Expand Up @@ -2508,6 +2508,9 @@ def set_widgets_step_fc_function_3(self):

icon_path = resources_path('img', 'wizard',
'keyword-category-aggregation.svg')
# Temporarily hide aggregation icon until we have one suitable
# (as requested in a comment to PR #2060)
icon_path = None
self.lblIconIFCWAggregationOrigin.setPixmap(QPixmap(icon_path))
self.lblIconIFCWAggregationFromCanvas.setPixmap(QPixmap(icon_path))
self.lblIconIFCWAggregationFromBrowser.setPixmap(QPixmap(icon_path))
Expand Down Expand Up @@ -4262,7 +4265,7 @@ def compute_previous_step(self, current_step):
else:
new_step = step_kw_layermode
else:
if self.selected_allowresample() is not None:
if self.selected_allowresampling() is not None:
new_step = step_kw_resample
else:
new_step = step_kw_unit
Expand All @@ -4280,7 +4283,7 @@ def compute_previous_step(self, current_step):
else:
new_step = step_kw_layermode
else:
if self.selected_allowresample() is not None:
if self.selected_allowresampling() is not None:
new_step = step_kw_resample
else:
new_step = step_kw_unit
Expand Down Expand Up @@ -4403,8 +4406,9 @@ def get_keywords(self):
else:
key = exposure_unit['key']
keywords[key] = self.selected_unit()['key']
if self.selected_allowresample() is not None:
keywords['allow_resample'] = self.selected_allowresample()
if self.selected_allowresampling() is not None:
keywords['allow_resampling'] = (
self.selected_allowresampling() and 'true' or 'false')
if self.lstFields.currentItem():
field_keyword = self.field_keyword_for_the_layer()
keywords[field_keyword] = self.lstFields.currentItem().text()
Expand Down

0 comments on commit 0741cfe

Please sign in to comment.