Gold messages: update wordings

This commit is contained in:
Chad Birch
2013-08-05 19:55:24 -06:00
committed by Neil Williams
parent d7759c9dce
commit 4aa1f713f6
4 changed files with 78 additions and 46 deletions

View File

@@ -1080,8 +1080,7 @@ class FrontController(RedditController, OAuth2ResourceController):
def GET_goldthanks(self, vendor):
vendor_url = None
if g.lounge_reddit:
lounge_url = "/r/" + g.lounge_reddit
lounge_md = strings.lounge_msg % {'link': lounge_url}
lounge_md = strings.lounge_msg
else:
lounge_md = None

View File

@@ -227,8 +227,8 @@ def send_gift(buyer, recipient, months, days, signed, giftmessage, comment_id):
sender = buyer.name
md_sender = "[%s](/user/%s)" % (sender, sender)
else:
sender = "someone"
md_sender = "An anonymous redditor"
sender = _("An anonymous redditor")
md_sender = _("An anonymous redditor")
create_gift_gold (buyer._id, recipient._id, days, c.start_time, signed)
@@ -238,19 +238,19 @@ def send_gift(buyer, recipient, months, days, signed, giftmessage, comment_id):
amount = "%d months" % months
if not comment:
subject = _('Let there be gold! %s just sent you reddit gold!') % sender
message = strings.youve_got_gold % dict(sender=md_sender, amount=amount)
if giftmessage and giftmessage.strip():
message += "\n\n" + strings.giftgold_note + giftmessage + '\n\n----'
else:
subject = _('Your comment has been gilded.')
message = strings.youve_got_comment_gold % dict(
url=comment.make_permalink_slow(),
)
message += '\n\n' + strings.gold_benefits_msg
message += '\n\n' + strings.lounge_msg % {'link': '/r/'+g.lounge_reddit}
subject = sender + " just sent you reddit gold!"
message += '\n\n' + strings.lounge_msg
try:
send_system_message(recipient, subject, message)
@@ -403,11 +403,12 @@ class IpnController(RedditController):
if custom:
payment_blob = validate_blob(custom)
buyer = payment_blob['buyer']
subject = _('gold order')
msg = _('your order has been received and gold will'
' be delivered shortly. please bear with us'
' as google wallet payments can take up to an'
' hour to complete')
subject = _('Your gold order has been received')
msg = _('Your order for reddit gold has been '
'received, and will be delivered shortly. '
'Please bear with us as Google Wallet '
'payments can take up to an hour to '
'complete.')
try:
send_system_message(buyer, subject, msg)
except MessageError:
@@ -546,18 +547,29 @@ class IpnController(RedditController):
if payment_blob['goldtype'] in ('autorenew', 'onetime'):
admintools.engolden(buyer, days)
subject = _("thanks for buying reddit gold!")
subject = _("Eureka! Thank you for investing in reddit gold!")
message = _("Thank you for buying reddit gold. Your patronage "
"supports the site and makes future development "
"possible. For example, one month of reddit gold "
"pays for 5 instance hours of reddit's servers.")
message += "\n\n" + strings.gold_benefits_msg
if g.lounge_reddit:
lounge_url = "/r/" + g.lounge_reddit
message = strings.lounge_msg % dict(link=lounge_url)
else:
message = ":)"
message += "\n\n" + strings.lounge_msg
elif payment_blob['goldtype'] == 'creddits':
buyer._incr("gold_creddits", months)
buyer._commit()
subject = _("thanks for buying creddits!")
message = _("To spend them, visit [/gold](/gold) or your favorite person's userpage.")
subject = _("Eureka! Thank you for investing in reddit gold "
"creddits!")
message = _("Thank you for buying creddits. Your patronage "
"supports the site and makes future development "
"possible. To spend your creddits and spread reddit "
"gold, visit [/gold](/gold) or your favorite "
"person's user page.")
message += "\n\n" + strings.gold_benefits_msg + "\n\n"
message += _("Thank you again for your support, and have fun "
"spreading gold!")
elif payment_blob['goldtype'] == 'gift':
recipient_name = payment_blob.get('recipient', None)
try:
@@ -571,8 +583,14 @@ class IpnController(RedditController):
comment_id = payment_blob.get("comment")
send_gift(buyer, recipient, months, days, signed, giftmessage, comment_id)
instagift = True
subject = _("thanks for giving reddit gold!")
message = _("Your gift to %s has been delivered." % recipient.name)
subject = _("Thanks for giving the gift of reddit gold!")
message = _("Your classy gift to %s has been delivered.\n\n"
"Thank you for gifting reddit gold. Your patronage "
"supports the site and makes future development "
"possible.") % recipient.name
message += "\n\n" + strings.gold_benefits_msg + "\n\n"
message += _("Thank you again for your support, and have fun "
"spreading gold!")
else:
dump_parameters(parameters)
raise ValueError("Got status '%s' in IPN/GC" % payment_blob['status'])
@@ -651,10 +669,10 @@ class GoldPaymentController(RedditController):
existing = retrieve_gold_transaction(transaction_id)
if event_type == 'cancelled':
subject = 'gold payment cancelled'
msg = ('your gold payment has been cancelled, contact '
'%(gold_email)s for details' % {'gold_email':
g.goldthanks_email})
subject = _('reddit gold payment cancelled')
msg = _('Your reddit gold payment has been cancelled, contact '
'%(gold_email)s for details') % {'gold_email':
g.goldthanks_email}
send_system_message(buyer, subject, msg)
if existing:
# note that we don't check status on existing, probably
@@ -673,19 +691,20 @@ class GoldPaymentController(RedditController):
goldtype, buyer, recipient, signed,
giftmessage, comment)
elif event_type == 'failed':
subject = 'gold payment failed'
msg = ('your gold payment has failed, contact %(gold_email)s for '
'details' % {'gold_email': g.goldthanks_email})
subject = _('reddit gold payment failed')
msg = _('Your reddit gold payment has failed, contact '
'%(gold_email)s for details') % {'gold_email':
g.goldthanks_email}
send_system_message(buyer, subject, msg)
# probably want to update gold_table here
elif event_type == 'refunded':
if not (existing and existing.status == 'processed'):
return
subject = 'gold refund'
msg = ('your gold payment has been refunded, contact '
'%(gold_email)s for details' % {'gold_email':
g.goldthanks_email})
subject = _('reddit gold refund')
msg = _('Your reddit gold payment has been refunded, contact '
'%(gold_email)s for details') % {'gold_email':
g.goldthanks_email}
send_system_message(buyer, subject, msg)
reverse_gold_purchase(transaction_id)
@@ -795,9 +814,9 @@ class StripeController(GoldPaymentController):
form.set_html('.status', _('payment submitted'))
# webhook usually sends near instantly, send a message in case
subject = _('gold payment')
msg = _('your payment is being processed and gold will be'
' delivered shortly')
subject = _('reddit gold payment')
msg = _('Your payment is being processed and reddit gold will be '
'delivered shortly.')
send_system_message(c.user, subject, msg)
@@ -967,8 +986,7 @@ def complete_gold_purchase(secret, transaction_id, payer_email, payer_id,
if goldtype == 'onetime':
subject = "thanks for buying reddit gold!"
if g.lounge_reddit:
lounge_url = "/r/" + g.lounge_reddit
message = strings.lounge_msg % dict(link=lounge_url)
message = strings.lounge_msg
else:
message = ":)"
else:

View File

@@ -138,14 +138,14 @@ string_dict = dict(
unverified_quota_msg = _("Looks like you're either a brand new user or your posts have not been doing well recently. You may have to wait a bit to post again. In the meantime feel free to [check out the reddiquette](%(reddiquette)s), join the conversation in a different thread, or [verify your email address](%(verify)s)."),
read_only_msg = _("reddit is in \"emergency read-only mode\" right now. :( you won't be able to log in. we're sorry, and are working frantically to fix the problem."),
heavy_load_msg = _("this page is temporarily in read-only mode due to heavy traffic."),
gold_benefits_msg = _("Being a reddit gold member gives you access to a bunch of new site features and other benefits. Be sure to check out **[the reddit gold information page](/gold/about)** to see what's currently available, and subscribe to **/r/goldbenefits** to keep up with announcements of new benefits."),
lounge_msg = _("please grab a drink and join us in [the lounge](%(link)s)."),
gold_benefits_msg = _("[reddit gold](/gold/about) is reddit's premium membership program. Gold members get extra features like new comment highlighting, notifications when your username is mentioned, \"Friends with benefits\", and more comments per page. You also get special benefits from gold partners for exceptional products and services.\n\nBe sure to check out the new options in the golden box at the bottom of [your preferences](/prefs) and take a look at [the about gold page](/gold/about) to see what else is available."),
lounge_msg = _("Grab a drink and join us in /r/lounge, the super-secret members-only community that may or may not exist."),
postcard_msg = _("You sent us a postcard! (Or something similar.) When we run out of room on our refrigerator, we might one day auction off the stuff that people sent in. Is it okay if we include your thing?"),
over_comment_limit = _("Sorry, the maximum number of comments is %(max)d. (However, if you subscribe to reddit gold, it goes up to %(goldmax)d.)"),
over_comment_limit_gold = _("Sorry, the maximum number of comments is %d."),
youve_got_gold = _("%(sender)s just sent you %(amount)s of reddit gold! Wasn't that nice?"),
youve_got_gold = _("%(sender)s just gifted you %(amount)s of reddit gold!"),
giftgold_note = _("Here's a note that was included:\n\n----\n\n"),
youve_got_comment_gold = _("A redditor liked [your comment](%(url)s) so much, they gave you a month of reddit gold. Shiny!"),
youve_got_comment_gold = _("Another user liked [your comment](%(url)s) so much that they gilded it, giving you reddit gold.\n\nEvery day over one million comments are posted to reddit, but only a chosen few are gilded to preserve them for the ages."),
gold_summary_autorenew = _("You're about to set up an ongoing, autorenewing subscription to reddit gold for yourself (%(user)s)."),
gold_summary_onetime = _("You're about to make a one-time purchase of %(amount)s of reddit gold for yourself (%(user)s)."),
gold_summary_creddits = _("You're about to purchase %(amount)s of reddit gold creddits. They work like gift certificates: each creddit you have will allow you to give one month of reddit gold to someone else."),

View File

@@ -30,6 +30,7 @@ from r2.models.token import AwardClaimToken
from _pylibmc import MemcachedError
from pylons import g
from pylons.i18n import _
from datetime import datetime, timedelta
from copy import copy
@@ -248,6 +249,14 @@ def update_gold_users(verbose=False):
count = 0
expiration_dates = {}
renew_msg = _("[Click here for details on how to set up an "
"automatically-renewing subscription or to renew.]"
"(/gold) If you have any thoughts, complaints, "
"rants, suggestions about reddit gold, please write "
"to us at %(gold_email)s. Your feedback would be "
"much appreciated.\n\nThank you for your past "
"patronage.") % {'gold_email': g.goldthanks_email}
for account in all_gold_users():
if not hasattr(account, "gold_expiration"):
g.log.error("%s has no gold_expiration" % account.name)
@@ -262,8 +271,10 @@ def update_gold_users(verbose=False):
if verbose:
print "%s just expired" % account.name
admintools.degolden(account)
send_system_message(account, "Your reddit gold subscription has expired. :(",
"Your subscription to reddit gold has expired. [Click here for details on how to renew, or to set up an automatically-renewing subscription.](http://www.reddit.com/gold) Or, if you don't want to, please write to us at 912@reddit.com and tell us where we let you down, so we can work on fixing the problem.")
subject = _("Your reddit gold subscription has expired.")
message = _("Your subscription to reddit gold has expired.")
message += "\n\n" + renew_msg
send_system_message(account, subject, message)
continue
count += 1
@@ -288,8 +299,12 @@ def update_gold_users(verbose=False):
if verbose:
print "Sending notice to %s" % account.name
g.hardcache.set(hc_key, True, 86400 * 10)
send_system_message(account, "Your reddit gold subscription is about to expire!",
"Your subscription to reddit gold will be expiring soon. [Click here for details on how to renew, or to set up an automatically-renewing subscription.](http://www.reddit.com/gold) Or, if you don't want to, please write to us at 912@reddit.com and tell us where we let you down, so we can work on fixing the problem.")
subject = _("Your reddit gold subscription is about to "
"expire!")
message = _("Your subscription to reddit gold will be "
"expiring soon.")
message += "\n\n" + renew_msg
send_system_message(account, subject, message)
if verbose:
for exp_date in sorted(expiration_dates.keys()):