Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Defer translating system messages.
Browse files Browse the repository at this point in the history
Currently, messages are sent using the language of the sender, which
doesn't work well for system messages. We're going to avoid translating
them for now until we can return such messages in the language of the
receiver.
  • Loading branch information
chromakode committed Oct 9, 2012
1 parent db7b531 commit 47549b4
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions r2/r2/lib/system_messages.py
Expand Up @@ -21,7 +21,7 @@
###############################################################################

from pylons import request
from pylons.i18n import _
from pylons.i18n import N_

from r2.models import Account, Message
from r2.lib.db import queries
Expand All @@ -30,38 +30,38 @@
user_added_messages = {
"moderator_invite": {
"pm": {
"subject": _("invitation to moderate %(url)s"),
"msg": _("**gadzooks! you are invited to become a moderator of [%(title)s](%(url)s)!**\n\n"
"*to accept*, visit the [moderators page for %(url)s](%(url)s/about/moderators) and click \"accept\".\n\n"
"*otherwise,* if you did not expect to receive this, you can simply ignore this invitation or report it."),
"subject": N_("invitation to moderate %(url)s"),
"msg": N_("**gadzooks! you are invited to become a moderator of [%(title)s](%(url)s)!**\n\n"
"*to accept*, visit the [moderators page for %(url)s](%(url)s/about/moderators) and click \"accept\".\n\n"
"*otherwise,* if you did not expect to receive this, you can simply ignore this invitation or report it."),
},
"modmail": {
"subject": _("moderator invited"),
"msg": _("%(user)s has been invited by %(author)s to moderate %(url)s."),
"subject": N_("moderator invited"),
"msg": N_("%(user)s has been invited by %(author)s to moderate %(url)s."),
},
},
"accept_moderator_invite": {
"modmail": {
"subject": _("moderator added"),
"msg": _("%(user)s has accepted an invitation to become moderator of %(url)s."),
"subject": N_("moderator added"),
"msg": N_("%(user)s has accepted an invitation to become moderator of %(url)s."),
},
},
"contributor": {
"pm": {
"subject": _("you are an approved submitter"),
"msg": _("you have been added as an approved submitter to [%(title)s](%(url)s)."),
"subject": N_("you are an approved submitter"),
"msg": N_("you have been added as an approved submitter to [%(title)s](%(url)s)."),
},
},
"banned": {
"pm": {
"subject": _("you've been banned"),
"msg": _("you have been banned from posting to [%(title)s](%(url)s)."),
"subject": N_("you've been banned"),
"msg": N_("you have been banned from posting to [%(title)s](%(url)s)."),
},
},
"traffic": {
"pm": {
"subject": _("you can view traffic on a promoted link"),
"msg": _('you have been added to the list of users able to see [traffic for the sponsored link "%(title)s"](%(traffic_url)s).'),
"subject": N_("you can view traffic on a promoted link"),
"msg": N_('you have been added to the list of users able to see [traffic for the sponsored link "%(title)s"](%(traffic_url)s).'),
},
},
}
Expand Down

0 comments on commit 47549b4

Please sign in to comment.