Add auto description attribution to copied multireddits.

This commit is contained in:
Max Goodman
2013-06-14 03:01:41 -07:00
parent fb57f0789d
commit 23a4cdc965
2 changed files with 5 additions and 0 deletions

View File

@@ -217,6 +217,7 @@ Note: there are a couple of places outside of your subreddit where someone can c
awesomeness_goes_here = _('awesomeness goes here'),
add_multi_sr = _('add a subreddit to your multi.'),
open_multi = _('open this multi'),
copied_from = _('copied from %(source)s'),
)
class StringHandler(object):

View File

@@ -148,6 +148,10 @@ r.multi.MultiReddit = Backbone.Model.extend({
var attrs = _.clone(this.attributes)
delete attrs.path
attrs.visibility = 'private'
attrs.description_md = this.get('description_md') + '\n\n' + r.strings('copied_from', {
// ensure that linking happens (currently /user/foo is not autolinked)
source: '[' + this.get('path') + '](' + this.get('path') + ')'
})
newMulti.set(attrs)
return newMulti
}