From b4d90db3b0aa2c7e1493cc31be02e56bfa19deec Mon Sep 17 00:00:00 2001 From: Max Goodman Date: Thu, 16 Aug 2012 16:43:52 -0700 Subject: [PATCH] Localize "an error occurred" in r.ui.Form. --- r2/r2/lib/strings.py | 1 + r2/r2/public/static/js/ui.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/r2/r2/lib/strings.py b/r2/r2/lib/strings.py index e41eeed1c..2ac91d31e 100644 --- a/r2/r2/lib/strings.py +++ b/r2/r2/lib/strings.py @@ -188,6 +188,7 @@ Note: there are a couple of places outside of your subreddit where someone can c go = _("go"), view_subreddit_traffic = _("view subreddit traffic"), + an_error_occurred = _("an error occurred"), ) class StringHandler(object): diff --git a/r2/r2/public/static/js/ui.js b/r2/r2/public/static/js/ui.js index 9b9ab124e..3b575583b 100644 --- a/r2/r2/public/static/js/ui.js +++ b/r2/r2/public/static/js/ui.js @@ -141,6 +141,6 @@ r.ui.Form.prototype = $.extend(new r.ui.Base(), { }, _handleNetError: function(result, err, xhr) { - this.showStatus('an error occurred (' + xhr.status + ')', true) + this.showStatus(r.strings.an_error_occurred + ' (' + xhr.status + ')', true) } })