Skip to content

Commit

Permalink
translator comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 30, 2014
1 parent 4968bd0 commit fe26a7c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
28 changes: 17 additions & 11 deletions src/data/registration/certificate_summary.erb
Expand Up @@ -9,21 +9,25 @@ textdomain "registration"
<h2><%= _("Secure Connection Error") %></h2>

<p>
<%= _("Error: %s") % h(Storage::SSLErrors.instance.ssl_error_msg) %>
<% # label followed by error details
%>
<%= _("Error:") %> <%= h(Storage::SSLErrors.instance.ssl_error_msg) %>
</p>

<% # dialog sub-heading
%>
<h3><%= _("Failed Certificate Details") %></h3>

<h4><%= _("Issued To") %></h4>
<blockquote>
<p>
<% # %s is SSL certificate issuer identification
<% # label followed by the SSL certificate subject identification
%>
<b><%= _("Common Name (CN):") %></b> <%= h(find_name_attribute(@subject, "CN")) %><br>
<% # %s is SSL certificate issuer identification
<% # label followed by the SSL certificate subject identification
%>
<b><%= _("Organization (O):") %></b> <%= h(find_name_attribute(@subject, "O")) %><br>
<% # %s is SSL certificate issuer identification
<% # label followed by the SSL certificate subject identification
%>
<b><%= _("Organization Unit (OU):") %></b> <%= h(find_name_attribute(@subject, "OU")) %>
</p>
Expand All @@ -32,13 +36,13 @@ textdomain "registration"
<h4><%= _("Issued By") %></h4>
<blockquote>
<p>
<% # %s is SSL certificate issuer identification
<% # label followed by the SSL certificate issuer identification
%>
<b><%= _("Common Name (CN):") %></b> <%= h(find_name_attribute(@issuer, "CN")) %><br>
<% # %s is SSL certificate issuer identification
<% # label followed by the SSL certificate issuer identification
%>
<b><%= _("Organization (O):") %></b> <%= h(find_name_attribute(@issuer, "O")) %><br>
<% # %s is SSL certificate issuer identification
<% # label followed by the SSL certificate issuer identification
%>
<b><%= _("Organization Unit (OU):") %></b> <%= h(find_name_attribute(@issuer, "OU")) %>
</p>
Expand All @@ -47,13 +51,13 @@ textdomain "registration"
<h4><%= _("Validity") %></h4>
<blockquote>
<p>
<% # %s is date
<% # label followed by the certificate issue date
%>
<b><%= _("Issued On:") %></b> <%= h(@certificate.not_before.localtime.strftime("%F")) %><br>
<% # %s is date
<% # label followed by the certificate expiration date
%>
<b><%= _("Expires On:") %></b> <%= h(@certificate.not_after.localtime.strftime("%F")) %><br>
<% if true || Time.now > @certificate.not_after %>
<% if Time.now > @certificate.not_after %>
<% # warning added after the certificate expiration date
# if the certificate has expired
%>
Expand All @@ -64,9 +68,11 @@ textdomain "registration"
</blockquote>

<p>
<% # label followed by the certificate serial number (in HEX format, e.g. AB:CD:42:FF...)
%>
<b><%= _("Serial Number:") %></b> <%= h(@certificate.serial.to_s(16).scan(/../).join(":")) %><br>

<% # %s is SHA1 sum in HEX format, e.g. AB:CD:00:42:FF...
<% # label followed by the certificate SHA1 sum (in HEX format, e.g. AB:CD:42:FF...)
%>
<b><%= _("SHA1 Fingerprint:") %></b> <%= h(OpenSSL::Digest::SHA1.new(@certificate.to_der).to_s.upcase.scan(/../).join(':')) %>
</p>
7 changes: 4 additions & 3 deletions src/lib/registration/connect_helpers.rb
Expand Up @@ -154,10 +154,11 @@ def self.ssl_error_details()
end

def self.import_ssl_certificate(cert)

if UI::ImportCertificateDialog.run(cert) == :import
# TODO use Popup.Feedback
result = ::SUSE::Connect::SSLCertificate.import(cert)
result = Yast::Popup.Feedback(_("Importing the SSL certificate..."), "") do
::SUSE::Connect::SSLCertificate.import(cert)
end

log.info "Certificate import result: #{result}"
return true
end
Expand Down

0 comments on commit fe26a7c

Please sign in to comment.