Skip to content

Commit

Permalink
Add missing help (#86)
Browse files Browse the repository at this point in the history
* Adjust Start-Up section label
* Add help for the allowed services list
* Add help for the zones list
  • Loading branch information
imobachgs committed Sep 21, 2018
1 parent 4e95e1b commit 2b7c1d4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/lib/y2firewall/widgets/allowed_services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ def handle(event)
nil
end

# @macro seeAbstractWidget
def help
# TRANSLATORS: %s is the zone label
format(
_("<p>Select which services you want to allow in the zone <b>%s</b>\n" \
"by adding them to the <b>Allowed</b> list (using <b>Add</b> or <b>Add All</b>\n" \
"buttons).</p>"),
zone.name
)
end

private

# @!attribute [r] known_svcs_table
Expand Down
2 changes: 1 addition & 1 deletion src/lib/y2firewall/widgets/pages/startup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize(_pager)

# @macro seeAbstractWidget
def label
_("Startup")
_("Start-Up")
end

# @macro seeCustomWidget
Expand Down
16 changes: 16 additions & 0 deletions src/lib/y2firewall/widgets/zones_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ def selected_zone
zones.find { |z| z.name == value.to_s }
end

# @macro seeAbstractWidget
def help
_(
"<p>A network zone defines the level of trust for network connections.</p>\n" \
"<p>You can designate one of them as the <b>default</b> zone by clicking the\n" \
"<b>Set As Default</b> button.</p>\n\n" \
"<p>In the <b>Interfaces</b> column you see which interfaces are assigned\n" \
"to a given zone. Bear in mind that, for the zone which is set as the default\n" \
"one, you will see the interfaces that are implicitly assigned to it, i.e.,\n" \
"those interfaces that are not assigned explicitly to that zone but to the\n" \
"default one.</p>\n\n" \
"<p>If you want to assign an interface to a given zone, just visit the\n" \
"<b>Interfaces</b> section.</p>"
)
end

private

# @return [Y2Firewalld::Widgets::DefaultZoneButton] Button to set a zone as 'default'
Expand Down

0 comments on commit 2b7c1d4

Please sign in to comment.