Skip to content

Commit

Permalink
Merge pull request #210 from candlepin/bkearney/stringUpdates
Browse files Browse the repository at this point in the history
Bkearney/string updates
  • Loading branch information
jbowes committed Aug 16, 2012
2 parents 404361f + ccb3005 commit 78bcf96
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 62 deletions.
16 changes: 8 additions & 8 deletions bin/rhn-migrate-classic-to-rhsm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ options_table = [
help=_("Service level to subscribe this system to. For no service "
"level use --service-level=\"\"")),
Option("--serverurl", dest='serverurl',
help=_("Specify the SAM/System Engine server to migrate TO.")),
help=_("Specify the Subscription Management Server to migrate TO.")),
]

parser = OptionParser(usage=_("%prog [OPTIONS]"),
Expand Down Expand Up @@ -193,7 +193,7 @@ def checkOkToProceed(secreds, serverurl):

# check if this machine is already registered to Certicate-based RHN
if ConsumerIdentity.existsAndValid():
print _("\nThis machine appears to be already registered to Certificate-based RHN. Exiting.")
print _("\nThis machine appears to be already registered to Red Hat Subscription Management. Exiting.")
consumer = ConsumerIdentity.read()
systemExit(1, _("\nPlease visit https://access.redhat.com/management/consumers/%s to view the profile details.") % consumer.getConsumerId())

Expand Down Expand Up @@ -397,7 +397,7 @@ def transferHttpProxySettings():

def register(credentials, serverurl):
# For registering the machine, use the CLI tool to reuse the username/password (because the GUI will prompt for them again)
print _("\nAttempting to register system to Certificate-based RHN ...")
print _("\nAttempting to register system to Red Hat Subscription Management ...")
cmd = ['subscription-manager', 'register', '--username=' + credentials.username, '--password=' + credentials.password]
if serverurl:
# insert just after register (not sure if order matters,
Expand All @@ -409,7 +409,7 @@ def register(credentials, serverurl):
systemExit(2, _("\nUnable to register.\nFor further assistance, please contact Red Hat Global Support Services."))
else:
consumer = ConsumerIdentity.read()
print _("System '%s' successfully registered to Certificate-based RHN.\n") % consumer.getConsumerName()
print _("System '%s' successfully registered to Red Hat Subscription Management.\n") % consumer.getConsumerName()
return consumer


Expand Down Expand Up @@ -543,7 +543,7 @@ def enableExtraChannels(subscribedChannels, cp):
repofile.write()
except:
print _("\nUnable to enable extra repositories.")
print _("Please ensure system is subscribed to entitlements, and alter /etc/yum.repos.d/redhat.repo to enable extra repositories.")
print _("Please ensure system has subscriptions attached, and see 'subscription-manager repos --help' to enable additional repositories")


def writeMigrationFacts():
Expand Down Expand Up @@ -602,11 +602,11 @@ def authenticate(prompt):
def main():
serverurl = None
if options.serverurl:
rhncreds = authenticate(_("RHN Username: "))
rhncreds = authenticate(_("Red Hat account: "))
secreds = authenticate(_("System Engine Username: "))
serverurl = options.serverurl
else:
rhncreds = authenticate(_("RHN Username: "))
rhncreds = authenticate(_("Red Hat account: "))
if not isHosted():
secreds = authenticate(_("System Engine Username: "))
else:
Expand All @@ -630,7 +630,7 @@ def main():
deployProdCertificates(subscribedChannels)

writeMigrationFacts()
print _("\nPreparing to unregister system from RHN classic ...")
print _("\nPreparing to unregister system from RHN Classic ...")
unRegisterSystemFromRhnClassic(sc, sk)

# register the system to Certificate-based RHN and consume a subscription
Expand Down
8 changes: 4 additions & 4 deletions src/rhsm_icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,17 @@ display_icon (Context * context, StatusType status_type)
"with RHN. Please enter your Red Hat login to ensure "
"your system is up-to-date.");
} else if (status_type == RHSM_EXPIRED) {
tooltip = _("Invalid or Missing Entitlement Certificates");
tooltip = _("Invalid or Missing Entitlement Subscriptions");
notification_title = tooltip;
notification_body =
_("This system is missing one or more "
"valid entitlement certificates.");
"subscriptions.");
} else if (status_type == RHSM_PARTIALLY_VALID) {
tooltip = _("Partially Entitled Products");
notification_title = tooltip;
notification_body =
_("This system is missing one or more valid "
"entitlement certificates to fully cover its "
"subscriptions to fully cover its "
"products.");
} else {
tooltip = _("This System's Subscriptions Are About to Expire");
Expand Down Expand Up @@ -332,7 +332,7 @@ check_status (Context * context)
return true;
}

/*
/*
* initial status check, 4 mins after launch (so the panel can load).
* return false so it won't run again.
*/
Expand Down
14 changes: 7 additions & 7 deletions src/subscription_manager/branding/redhat_branding.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ def __init__(self):
self.CLI_REGISTER = _("register the client to the Customer Portal or another subscription management service.")
self.CLI_UNREGISTER = _("unregister the client from the Customer Portal or another subscription management service.")
self.RHSMD_REGISTERED_TO_OTHER = \
_("This system is registered to RHN Classic")
_("This system is registered to RHN Classic.")
self.REGISTERED_TO_OTHER_WARNING = _("WARNING") + \
"\n\n" + \
_("This system has already been registered with RHN using RHN Classic technology.") + \
_("This system has already been registered with Red Hat using RHN Classic technology.") + \
"\n\n" + \
_("The tool you are using is attempting to re-register using Red Hat Subscription Management technology. Red Hat recommends (except in a few cases) that customers only register once.") + \
_("The tool you are using is attempting to re-register using Red Hat Subscription Management technology. Red Hat recommends that customers only register once.") + \
"\n\n" + \
_("To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563")
_("To learn how to unregister from either service please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563")
self.REGISTERED_TO_OTHER_SUMMARY = _("RHN Classic")

self.GUI_REGISTRATION_HEADER = \
_("Please enter your Red Hat account information:")
self.REGISTERED_TO_BOTH_WARNING = \
_("This system is registered using both RHN Classic technology and RHN Certificate-Based technology.") + \
_("This system is registered using both RHN Classic and Red Hat Subscription Management.") + \
"\n\n" + \
_("Red Hat recommends (except in a few cases) that customers only register with RHN via one method.") + \
_("Red Hat recommends that customers only register to one service.") + \
"\n\n" + \
_("To learn more about RHN registration and technologies please consult this Knowledge Base Article: https://access.redhat.com/kb/docs/DOC-45563")
self.REGISTERED_TO_BOTH_SUMMARY = _("RHN classic and subscription management service")
self.REGISTERED_TO_BOTH_SUMMARY = _("RHN classic and Red Hat Subscription Management")
self.GUI_FORGOT_LOGIN_TIP = \
_("Tip: Forgot your login or password? Look it up at http://red.ht/lost_password")
4 changes: 2 additions & 2 deletions src/subscription_manager/gui/data/manually_subscribe.glade
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<property name="yalign">0</property>
<property name="xpad">10</property>
<property name="ypad">10</property>
<property name="label" translatable="yes">You will need to manually subscribe this system after completing firstboot. Subscription Manager can be found in &lt;b&gt;System &gt; Administration &gt; Subscription Manager&lt;/b&gt;.</property>
<property name="label" translatable="yes">You will need to use Subscription Manager to manually subscribe this system after completing firstboot.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</widget>
Expand Down Expand Up @@ -75,7 +75,7 @@
<property name="yalign">0</property>
<property name="xpad">10</property>
<property name="ypad">10</property>
<property name="label" translatable="yes">You will need to manually subscribe this system after completing firstboot. Subscription Manager can be found in &lt;b&gt;System &gt; Administration &gt; Subscription Manager&lt;/b&gt;.</property>
<property name="label" translatable="yes">You will need to use Subscription Manager to manually subscribe this system after completing firstboot.</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
</widget>
Expand Down
8 changes: 3 additions & 5 deletions src/subscription_manager/gui/firstboot/rhsm_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ def _on_get_service_levels_cb(self, result, error=None):
self._parent.pre_done(MANUALLY_SUBSCRIBE_PAGE)
elif isinstance(error, NoProductsException):
message = _("No installed products on system. No need to "
"update certificates at this time.")
"update subscriptions at this time.")
self._parent.manual_message = message
self._parent.pre_done(MANUALLY_SUBSCRIBE_PAGE)
elif isinstance(error, AllProductsCoveredException):
message = _("All installed products are covered by valid "
"entitlements. Please run 'Subscription Manager' "
"to subscribe to additional products.")
message = _("All installed products are fully subscribed.")
self._parent.manual_message = message
self._parent.pre_done(MANUALLY_SUBSCRIBE_PAGE)
else:
Expand Down Expand Up @@ -80,7 +78,7 @@ def _on_get_service_levels_cb(self, result, error=None):
else:
message = _("No service levels will cover all installed products. "
"Please run 'Subscription Manager' to manually "
"entitle this system.")
"subscribe this system.")
self._parent.manual_message = message
self._parent.pre_done(MANUALLY_SUBSCRIBE_PAGE)

Expand Down
23 changes: 9 additions & 14 deletions src/subscription_manager/gui/installedtab.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from subscription_manager import managerlib, cert_sorter
from subscription_manager.cert_sorter import CertSorter, FUTURE_SUBSCRIBED, \
NOT_SUBSCRIBED, EXPIRED, PARTIALLY_SUBSCRIBED
from subscription_manager.branding import get_branding
from subscription_manager.certdirectory import EntitlementDirectory, ProductDirectory
from subscription_manager.gui import widgets
from subscription_manager.hwprobe import ClassicCheck
Expand Down Expand Up @@ -287,7 +288,7 @@ def _set_validity_status(self):
if ClassicCheck().is_registered_with_classic():
self._set_status_icons(VALID)
self.subscription_status_label.set_text(
_("This system is registered to RHN Classic"))
get_branding().RHSMD_REGISTERED_TO_OTHER)
return

is_registered = ConsumerIdentity.existsAndValid()
Expand All @@ -307,41 +308,35 @@ def _set_validity_status(self):
# Change wording slightly for just one product
if warn_count > 1:
self.subscription_status_label.set_markup(
_("You have <b>%s</b> products with <i>invalid</i> entitlement certificates.")
_("%s installed products do not have valid subscriptions.")
% warn_count)
else:
self.subscription_status_label.set_markup(
_("You have <b>1</b> product with an <i>invalid</i> entitlement certificate."))
_("1 installed product does not have a valid subscription."))

elif partial_count > 0:
self._set_status_icons(PARTIAL)
# Change wording slightly for just one product
if partial_count > 1:
self.subscription_status_label.set_markup(
_("You have <b>%s</b> products in need of <i>additional</i> entitlement certificates.")
% partial_count)
else:
self.subscription_status_label.set_markup(
_("You have <b>1</b> product in need of <i>additional</i> entitlement certificates."))
self.subscription_status_label.set_markup(
_("This system does not match subscription limits."))

else:
first_invalid = find_first_invalid_date(self.entitlement_dir,
self.product_dir, self.facts.get_facts())
self._set_status_icons(VALID)
if first_invalid:
self.subscription_status_label.set_markup(
_("Product entitlement certificates <i>valid</i> until %s") % \
_("System is properly subscribed through %s.") % \
managerlib.formatDate(first_invalid))
else:
# No product certs installed, no first invalid date, and
# the subscription assistant can't do anything, so we'll disable
# the button to launch it:
self.subscription_status_label.set_text(
_("No product certificates installed."))
_("No installed products detected."))

if not is_registered:
self.subscription_status_label.set_text(
_("You must register this system before subscribing."))
_("Keep your system up to date by registering."))

def set_registered(self, is_registered):
self.update_certificates_button.set_property('visible', is_registered)
Expand Down
16 changes: 8 additions & 8 deletions src/subscription_manager/gui/registergui.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ class PerformSubscribeScreen(NoGuiScreen):

def __init__(self, parent, backend):
super(PerformSubscribeScreen, self).__init__(parent, backend)
self.pre_message = _("Subscribing to entitlements")
self.pre_message = _("Attaching subscriptions")

def _on_subscribing_finished_cb(self, unused, error=None):
try:
Expand Down Expand Up @@ -465,10 +465,10 @@ def _on_get_service_levels_cb(self, result, error=None):
OkDialog(_("Unable to auto-subscribe, server does not support service levels."),
parent=self._parent.window)
elif isinstance(error, NoProductsException):
InfoDialog(_("No installed products on system. No need to update certificates at this time."),
InfoDialog(_("No installed products on system. No need to update subscriptions at this time."),
parent=self._parent.window)
elif isinstance(error, AllProductsCoveredException):
InfoDialog(_("All installed products are covered by valid entitlements. No need to update certificates at this time."),
InfoDialog(_("All installed products are covered by valid entitlements. No need to update subscriptions at this time."),
parent=self._parent.window)
else:
handle_gui_exception(error, _("Error subscribing"),
Expand All @@ -485,11 +485,11 @@ def _on_get_service_levels_cb(self, result, error=None):
if current_sla is not None and \
not self._can_add_more_subs(current_sla, sla_data_map):
handle_gui_exception(None,
_("Unable to subscribe to any additional "
"products at current service level: %s. "
_("No available subscriptions at "
"the current service level: %s. "
"Please use the \"All Available "
"Subscriptions\" tab to manually "
"entitle this system.") % current_sla,
"subscribe this system.") % current_sla,
self._parent.window)
self._parent.finish_registration(failed=True)
return
Expand All @@ -503,9 +503,9 @@ def _on_get_service_levels_cb(self, result, error=None):
else:
log.info("No suitable service levels found.")
handle_gui_exception(None,
_("No service levels will cover all installed "
_("No service level will cover all installed "
"products. Please use the \"All Available "
"Subscriptions\" tab to manually entitle "
"Subscriptions\" tab to manually subscribe "
"this system."), parent=self._parent.window)
self._parent.finish_registration(failed=True)

Expand Down
Loading

0 comments on commit 78bcf96

Please sign in to comment.