Class: CFA::ConfictReport

Inherits:
Object
  • Object
show all
Extended by:
Yast::I18n
Includes:
Yast::I18n, Yast::Logger
Defined in:
library/general/src/lib/cfa/conflict_report.rb

Overview

Class for showing conflicts.

Class Method Summary collapse

Class Method Details

.report(conflicts) ⇒ Object

Popup which shows the conflicting files and their attributes.

Parameters:

  • conflicts (Hash<String, Array<String>>)

    conflicting filepath with the corresponding array of entry names.



35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'library/general/src/lib/cfa/conflict_report.rb', line 35

def self.report(conflicts)
  textdomain "base"
  return if !conflicts || conflicts.empty?

  text = ""
  text << _("Changed values have conflicts with:<br><br>")
  conflicts.each do |filename, conflict|
    text << (_("File: %s<br>") % filename)
    text << (_("Conflicting entries: %s<br>") % conflict.join(", "))
    text << "<br>"
  end
  text << _("You will have to adapt these entries manually in order to set your changes.")
  Yast::Report.LongWarning(text)
end