Class: Y2Packager::Widgets::LicenseTranslationsButton

Inherits:
CWM::PushButton
  • Object
show all
Defined in:
src/lib/y2packager/widgets/license_translations_button.rb

Overview

This button launches the licenses translations dialog when pushed

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(product, language = nil) ⇒ LicenseTranslationsButton


25
26
27
28
29
30
31
# File 'src/lib/y2packager/widgets/license_translations_button.rb', line 25

def initialize(product, language = nil)
  super()
  textdomain "packager"

  @product = product
  @language = language || Yast::Language.language
end

Instance Attribute Details

#languageObject (readonly)

Returns the value of attribute language


23
24
25
# File 'src/lib/y2packager/widgets/license_translations_button.rb', line 23

def language
  @language
end

#productY2Packager::Product (readonly)


22
23
24
# File 'src/lib/y2packager/widgets/license_translations_button.rb', line 22

def product
  @product
end

Instance Method Details

#handleObject

Launch the product license translations dialog

See Also:

  • CWM::AbstractWidget#handle

44
45
46
47
# File 'src/lib/y2packager/widgets/license_translations_button.rb', line 44

def handle
  Y2Packager::Dialogs::ProductLicenseTranslations.new(product, language).run
  nil
end

#labelString

Widget label

See Also:

  • CWM::AbstractWidget#label

37
38
39
# File 'src/lib/y2packager/widgets/license_translations_button.rb', line 37

def label
  _("License &Translations...")
end