From 43ceacabab9645c3531ca71284ce8675e2bd10fa Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 22 Jul 2013 16:52:46 -0400 Subject: [PATCH] Link to edit "About Me" links directly to the field. --- .../preferences_about_controller.js | 66 ++++++++++++++ .../controllers/preferences_controller.js | 90 ++++++++++--------- .../preferences_email_controller.js | 59 +++++++----- .../preferences_username_controller.js | 46 +++++++--- .../discourse/routes/application_routes.js | 1 + .../routes/preferences_email_route.js | 31 ------- .../discourse/routes/preferences_route.js | 23 ----- .../routes/preferences_username_route.js | 36 -------- .../discourse/routes/user_route.js | 5 +- .../templates/user/about.js.handlebars | 31 +++++++ .../templates/user/preferences.js.handlebars | 6 +- .../views/user/preferences_about_view.js | 18 ++++ config/locales/client.en.yml | 9 +- config/locales/server.cs.yml | 2 +- config/locales/server.da.yml | 2 +- config/locales/server.de.yml | 2 +- config/locales/server.en.yml | 2 +- config/locales/server.es.yml | 2 +- config/locales/server.fr.yml | 2 +- config/locales/server.id.yml | 2 +- config/locales/server.it.yml | 2 +- config/locales/server.ko.yml | 2 +- config/locales/server.nl.yml | 2 +- config/locales/server.pt.yml | 2 +- config/locales/server.pt_BR.yml | 2 +- config/locales/server.ru.yml | 2 +- config/locales/server.sv.yml | 2 +- config/locales/server.zh_CN.yml | 2 +- config/locales/server.zh_TW.yml | 2 +- config/routes.rb | 1 + 30 files changed, 263 insertions(+), 191 deletions(-) create mode 100644 app/assets/javascripts/discourse/controllers/preferences_about_controller.js delete mode 100644 app/assets/javascripts/discourse/routes/preferences_email_route.js delete mode 100644 app/assets/javascripts/discourse/routes/preferences_route.js delete mode 100644 app/assets/javascripts/discourse/routes/preferences_username_route.js create mode 100644 app/assets/javascripts/discourse/templates/user/about.js.handlebars create mode 100644 app/assets/javascripts/discourse/views/user/preferences_about_view.js diff --git a/app/assets/javascripts/discourse/controllers/preferences_about_controller.js b/app/assets/javascripts/discourse/controllers/preferences_about_controller.js new file mode 100644 index 000000000..ed41ee6b8 --- /dev/null +++ b/app/assets/javascripts/discourse/controllers/preferences_about_controller.js @@ -0,0 +1,66 @@ +/** + The route for editing a user's "About Me" bio. + + @class PreferencesAboutRoute + @extends Discourse.RestrictedUserRoute + @namespace Discourse + @module Discourse +**/ +Discourse.PreferencesAboutRoute = Discourse.RestrictedUserRoute.extend({ + model: function() { + return this.modelFor('user'); + }, + + renderTemplate: function() { + this.render({ into: 'user', outlet: 'userOutlet' }); + }, + + setupController: function(controller, model) { + controller.setProperties({ model: model, newBio: model.get('bio_raw') }); + }, + + // A bit odd, but if we leave to /preferences we need to re-render that outlet + exit: function() { + this._super(); + this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' }); + }, + + events: { + changeAbout: function() { + var route = this; + var controller = route.controllerFor('preferencesAbout'); + + controller.setProperties({ saving: true }); + return controller.get('model').save().then(function() { + controller.set('saving', false); + route.transitionTo('user.index'); + }, function() { + // model failed to save + controller.set('saving', false); + alert(I18n.t('generic_error')); + }); + } + } + +}); + + + +/** + This controller supports actions related to updating your "About Me" bio + + @class PreferencesAboutController + @extends Discourse.ObjectController + @namespace Discourse + @module Discourse +**/ +Discourse.PreferencesAboutController = Discourse.ObjectController.extend({ + saving: false, + + saveButtonText: function() { + if (this.get('saving')) return I18n.t("saving"); + return I18n.t("user.change"); + }.property('saving'), + + +}); \ No newline at end of file diff --git a/app/assets/javascripts/discourse/controllers/preferences_controller.js b/app/assets/javascripts/discourse/controllers/preferences_controller.js index 53105aa9e..99c817df0 100644 --- a/app/assets/javascripts/discourse/controllers/preferences_controller.js +++ b/app/assets/javascripts/discourse/controllers/preferences_controller.js @@ -1,3 +1,21 @@ +/** + The common route stuff for a user's preference + + @class PreferencesRoute + @extends Discourse.RestrictedUserRoute + @namespace Discourse + @module Discourse +**/ +Discourse.PreferencesRoute = Discourse.RestrictedUserRoute.extend({ + model: function() { + return this.modelFor('user'); + }, + + renderTemplate: function() { + this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' }); + } +}); + /** This controller supports actions related to updating one's preferences @@ -10,47 +28,32 @@ Discourse.PreferencesController = Discourse.ObjectController.extend({ // By default we haven't saved anything saved: false, - saveDisabled: (function() { + saveDisabled: function() { if (this.get('saving')) return true; - if (this.blank('content.name')) return true; - if (this.blank('content.email')) return true; + if (this.blank('name')) return true; + if (this.blank('email')) return true; return false; - }).property('saving', 'content.name', 'content.email'), + }.property('saving', 'name', 'email'), - digestFrequencies: (function() { - var freqs; - freqs = Em.A(); - freqs.addObject({ name: I18n.t('user.email_digests.daily'), value: 1 }); - freqs.addObject({ name: I18n.t('user.email_digests.weekly'), value: 7 }); - freqs.addObject({ name: I18n.t('user.email_digests.bi_weekly'), value: 14 }); - return freqs; - }).property(), + digestFrequencies: [{ name: I18n.t('user.email_digests.daily'), value: 1 }, + { name: I18n.t('user.email_digests.weekly'), value: 7 }, + { name: I18n.t('user.email_digests.bi_weekly'), value: 14 }], - autoTrackDurations: (function() { - var freqs; - freqs = Em.A(); - freqs.addObject({ name: I18n.t('user.auto_track_options.never'), value: -1 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.always'), value: 0 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_seconds', { count: 30 }), value: 30000 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_minutes', { count: 1 }), value: 60000 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_minutes', { count: 2 }), value: 120000 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_minutes', { count: 3 }), value: 180000 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_minutes', { count: 4 }), value: 240000 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_minutes', { count: 5 }), value: 300000 }); - freqs.addObject({ name: I18n.t('user.auto_track_options.after_n_minutes', { count: 10 }), value: 600000 }); - return freqs; - }).property(), + autoTrackDurations: [{ name: I18n.t('user.auto_track_options.never'), value: -1 }, + { name: I18n.t('user.auto_track_options.always'), value: 0 }, + { name: I18n.t('user.auto_track_options.after_n_seconds', { count: 30 }), value: 30000 }, + { name: I18n.t('user.auto_track_options.after_n_minutes', { count: 1 }), value: 60000 }, + { name: I18n.t('user.auto_track_options.after_n_minutes', { count: 2 }), value: 120000 }, + { name: I18n.t('user.auto_track_options.after_n_minutes', { count: 3 }), value: 180000 }, + { name: I18n.t('user.auto_track_options.after_n_minutes', { count: 4 }), value: 240000 }, + { name: I18n.t('user.auto_track_options.after_n_minutes', { count: 5 }), value: 300000 }, + { name: I18n.t('user.auto_track_options.after_n_minutes', { count: 10 }), value: 600000 }], - considerNewTopicOptions: (function() { - var opts; - opts = Em.A(); - opts.addObject({ name: I18n.t('user.new_topic_duration.not_viewed'), value: -1 }); - opts.addObject({ name: I18n.t('user.new_topic_duration.after_n_days', { count: 1 }), value: 60 * 24 }); - opts.addObject({ name: I18n.t('user.new_topic_duration.after_n_days', { count: 2 }), value: 60 * 48 }); - opts.addObject({ name: I18n.t('user.new_topic_duration.after_n_weeks', { count: 1 }), value: 7 * 60 * 24 }); - opts.addObject({ name: I18n.t('user.new_topic_duration.last_here'), value: -2 }); - return opts; - }).property(), + considerNewTopicOptions: [{ name: I18n.t('user.new_topic_duration.not_viewed'), value: -1 }, + { name: I18n.t('user.new_topic_duration.after_n_days', { count: 1 }), value: 60 * 24 }, + { name: I18n.t('user.new_topic_duration.after_n_days', { count: 2 }), value: 60 * 48 }, + { name: I18n.t('user.new_topic_duration.after_n_weeks', { count: 1 }), value: 7 * 60 * 24 }, + { name: I18n.t('user.new_topic_duration.last_here'), value: -2 }], save: function() { var preferencesController = this; @@ -58,7 +61,7 @@ Discourse.PreferencesController = Discourse.ObjectController.extend({ this.set('saved', false); // Cook the bio for preview - var model = this.get('content'); + var model = this.get('model'); return model.save().then(function() { // model was saved preferencesController.set('saving', false); @@ -66,8 +69,8 @@ Discourse.PreferencesController = Discourse.ObjectController.extend({ Discourse.User.current().set('name', model.get('name')); } - preferencesController.set('content.bio_cooked', - Discourse.Markdown.cook(preferencesController.get('content.bio_raw'))); + preferencesController.set('bio_cooked', + Discourse.Markdown.cook(preferencesController.get('bio_raw'))); preferencesController.set('saved', true); }, function() { // model failed to save @@ -76,16 +79,15 @@ Discourse.PreferencesController = Discourse.ObjectController.extend({ }); }, - saveButtonText: (function() { - if (this.get('saving')) return I18n.t('saving'); - return I18n.t('save'); - }).property('saving'), + saveButtonText: function() { + return this.get('saving') ? I18n.t('saving') : I18n.t('save'); + }.property('saving'), changePassword: function() { var preferencesController = this; if (!this.get('passwordProgress')) { this.set('passwordProgress', I18n.t("user.change_password.in_progress")); - return this.get('content').changePassword().then(function() { + return this.get('model').changePassword().then(function() { // password changed preferencesController.setProperties({ changePasswordProgress: false, diff --git a/app/assets/javascripts/discourse/controllers/preferences_email_controller.js b/app/assets/javascripts/discourse/controllers/preferences_email_controller.js index c8a55c797..0a2729958 100644 --- a/app/assets/javascripts/discourse/controllers/preferences_email_controller.js +++ b/app/assets/javascripts/discourse/controllers/preferences_email_controller.js @@ -1,3 +1,32 @@ +/** + The route for editing a user's email + + @class PreferencesEmailRoute + @extends Discourse.RestrictedUserRoute + @namespace Discourse + @module Discourse +**/ +Discourse.PreferencesEmailRoute = Discourse.RestrictedUserRoute.extend({ + model: function() { + return this.modelFor('user'); + }, + + renderTemplate: function() { + this.render({ into: 'user', outlet: 'userOutlet' }); + }, + + setupController: function(controller, model) { + controller.setProperties({ model: model, newEmail: model.get('email') }); + }, + + // A bit odd, but if we leave to /preferences we need to re-render that outlet + exit: function() { + this._super(); + this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' }); + } +}); + + /** This controller supports actions related to updating one's email address @@ -13,25 +42,14 @@ Discourse.PreferencesEmailController = Discourse.ObjectController.extend({ success: false, newEmail: null, - saveDisabled: (function() { - if (this.get('saving')) return true; - if (this.blank('newEmail')) return true; - if (this.get('taken')) return true; - if (this.get('unchanged')) return true; - }).property('newEmail', 'taken', 'unchanged', 'saving'), + newEmailEmpty: Em.computed.empty('newEmail'), + saveDisabled: Em.computed.or('saving', 'newEmailEmpty', 'taken', 'unchanged'), + unchanged: Discourse.computed.propertyEqual('newEmail', 'email'), - unchanged: (function() { - return this.get('newEmail') === this.get('content.email'); - }).property('newEmail', 'content.email'), - - initializeEmail: (function() { - this.set('newEmail', this.get('content.email')); - }).observes('content.email'), - - saveButtonText: (function() { + saveButtonText: function() { if (this.get('saving')) return I18n.t("saving"); - return I18n.t("user.change_email.action"); - }).property('saving'), + return I18n.t("user.change"); + }.property('saving'), changeEmail: function() { var preferencesEmailController = this; @@ -39,9 +57,10 @@ Discourse.PreferencesEmailController = Discourse.ObjectController.extend({ return this.get('content').changeEmail(this.get('newEmail')).then(function() { preferencesEmailController.set('success', true); }, function() { - // Error - preferencesEmailController.set('error', true); - preferencesEmailController.set('saving', false); + preferencesEmailController.setProperties({ + error: true, + saving: false + }); }); } diff --git a/app/assets/javascripts/discourse/controllers/preferences_username_controller.js b/app/assets/javascripts/discourse/controllers/preferences_username_controller.js index 710a82741..d0b59895c 100644 --- a/app/assets/javascripts/discourse/controllers/preferences_username_controller.js +++ b/app/assets/javascripts/discourse/controllers/preferences_username_controller.js @@ -1,3 +1,32 @@ +/** + The route for updating a user's username + + @class PreferencesUsernameRoute + @extends Discourse.RestrictedUserRoute + @namespace Discourse + @module Discourse +**/ +Discourse.PreferencesUsernameRoute = Discourse.RestrictedUserRoute.extend({ + model: function() { + return this.modelFor('user'); + }, + + renderTemplate: function() { + return this.render({ into: 'user', outlet: 'userOutlet' }); + }, + + // A bit odd, but if we leave to /preferences we need to re-render that outlet + exit: function() { + this._super(); + this.render('preferences', { into: 'user', outlet: 'userOutlet', controller: 'preferences' }); + }, + + setupController: function(controller, user) { + controller.setProperties({ model: user, newUsername: user.get('username') }); + } +}); + + /** This controller supports actions related to updating one's username @@ -13,18 +42,9 @@ Discourse.PreferencesUsernameController = Discourse.ObjectController.extend({ errorMessage: null, newUsername: null, - saveDisabled: function() { - if (this.get('saving')) return true; - if (this.blank('newUsername')) return true; - if (this.get('taken')) return true; - if (this.get('unchanged')) return true; - if (this.get('errorMessage')) return true; - return false; - }.property('newUsername', 'taken', 'errorMessage', 'unchanged', 'saving'), - - unchanged: function() { - return this.get('newUsername') === this.get('content.username'); - }.property('newUsername', 'content.username'), + newUsernameEmpty: Em.computed.empty('newUsername'), + saveDisabled: Em.computed.or('saving', 'newUsernameEmpty', 'taken', 'unchanged', 'errorMessage'), + unchanged: Discourse.computed.propertyEqual('newUsername', 'username'), checkTaken: function() { if( this.get('newUsername') && this.get('newUsername').length < 3 ) { @@ -47,7 +67,7 @@ Discourse.PreferencesUsernameController = Discourse.ObjectController.extend({ saveButtonText: function() { if (this.get('saving')) return I18n.t("saving"); - return I18n.t("user.change_username.action"); + return I18n.t("user.change"); }.property('saving'), changeUsername: function() { diff --git a/app/assets/javascripts/discourse/routes/application_routes.js b/app/assets/javascripts/discourse/routes/application_routes.js index 0df4cba54..c60b93784 100644 --- a/app/assets/javascripts/discourse/routes/application_routes.js +++ b/app/assets/javascripts/discourse/routes/application_routes.js @@ -56,6 +56,7 @@ Discourse.Route.buildRoutes(function() { this.resource('preferences', { path: '/preferences' }, function() { this.route('username', { path: '/username' }); this.route('email', { path: '/email' }); + this.route('about', { path: '/about-me' }); }); this.route('invited', { path: 'invited' }); diff --git a/app/assets/javascripts/discourse/routes/preferences_email_route.js b/app/assets/javascripts/discourse/routes/preferences_email_route.js deleted file mode 100644 index 156cbcc68..000000000 --- a/app/assets/javascripts/discourse/routes/preferences_email_route.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - The route for editing a user's email - - @class PreferencesEmailRoute - @extends Discourse.RestrictedUserRoute - @namespace Discourse - @module Discourse -**/ -Discourse.PreferencesEmailRoute = Discourse.RestrictedUserRoute.extend({ - - model: function() { - return this.modelFor('user'); - }, - - renderTemplate: function() { - this.render({ into: 'user', outlet: 'userOutlet' }); - }, - - // A bit odd, but if we leave to /preferences we need to re-render that outlet - exit: function() { - this._super(); - this.render('preferences', { - into: 'user', - outlet: 'userOutlet', - controller: 'preferences' - }); - } - -}); - - diff --git a/app/assets/javascripts/discourse/routes/preferences_route.js b/app/assets/javascripts/discourse/routes/preferences_route.js deleted file mode 100644 index f32a4e48d..000000000 --- a/app/assets/javascripts/discourse/routes/preferences_route.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - The common route stuff for a user's preference - - @class PreferencesRoute - @extends Discourse.RestrictedUserRoute - @namespace Discourse - @module Discourse -**/ -Discourse.PreferencesRoute = Discourse.RestrictedUserRoute.extend({ - - model: function() { - return this.modelFor('user'); - }, - - renderTemplate: function() { - this.render('preferences', { - into: 'user', - outlet: 'userOutlet', - controller: 'preferences' - }); - } - -}); diff --git a/app/assets/javascripts/discourse/routes/preferences_username_route.js b/app/assets/javascripts/discourse/routes/preferences_username_route.js deleted file mode 100644 index b65d47e69..000000000 --- a/app/assets/javascripts/discourse/routes/preferences_username_route.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - The route for updating a user's username - - @class PreferencesUsernameRoute - @extends Discourse.RestrictedUserRoute - @namespace Discourse - @module Discourse -**/ -Discourse.PreferencesUsernameRoute = Discourse.RestrictedUserRoute.extend({ - - model: function() { - return this.modelFor('user'); - }, - - renderTemplate: function() { - return this.render({ into: 'user', outlet: 'userOutlet' }); - }, - - // A bit odd, but if we leave to /preferences we need to re-render that outlet - exit: function() { - this._super(); - this.render('preferences', { - into: 'user', - outlet: 'userOutlet', - controller: 'preferences' - }); - }, - - setupController: function(controller, user) { - controller.set('model', user); - controller.set('newUsername', user.get('username')); - } - -}); - - diff --git a/app/assets/javascripts/discourse/routes/user_route.js b/app/assets/javascripts/discourse/routes/user_route.js index b48eeb8e5..52c4d0488 100644 --- a/app/assets/javascripts/discourse/routes/user_route.js +++ b/app/assets/javascripts/discourse/routes/user_route.js @@ -20,13 +20,16 @@ Discourse.UserRoute = Discourse.Route.extend({ return Discourse.User.create({username: params.username}); }, + afterModel: function() { + return this.modelFor('user').findDetails(); + }, + serialize: function(params) { if (!params) return {}; return { username: Em.get(params, 'username').toLowerCase() }; }, setupController: function(controller, user) { - user.findDetails(); controller.set('model', user); // Add a search context diff --git a/app/assets/javascripts/discourse/templates/user/about.js.handlebars b/app/assets/javascripts/discourse/templates/user/about.js.handlebars new file mode 100644 index 000000000..57a15cc1d --- /dev/null +++ b/app/assets/javascripts/discourse/templates/user/about.js.handlebars @@ -0,0 +1,31 @@ +
+ +
+
+

{{i18n user.change_about.title}}

+
+
+ + {{#if error}} +
+
+
{{i18n user.change_about.error}}
+
+
+ {{/if}} + +
+ +
+ {{pagedown value=bio_raw}} +
+
+ +
+
+ + {{#if saved}}{{i18n saved}}{{/if}} +
+
+ +
diff --git a/app/assets/javascripts/discourse/templates/user/preferences.js.handlebars b/app/assets/javascripts/discourse/templates/user/preferences.js.handlebars index 6ee825ecb..2512f57f5 100644 --- a/app/assets/javascripts/discourse/templates/user/preferences.js.handlebars +++ b/app/assets/javascripts/discourse/templates/user/preferences.js.handlebars @@ -4,7 +4,7 @@
{{username}} - {{#linkTo "preferences.username" class="btn pad-left"}}{{i18n user.change_username.action}}{{/linkTo}} + {{#linkTo "preferences.username" class="btn pad-left"}}{{i18n user.change}}{{/linkTo}}
{{{i18n user.username.short_instructions username="username"}}} @@ -25,7 +25,7 @@
{{email}} - {{#linkTo "preferences.email" class="btn pad-left"}}{{i18n user.change_email.action}}{{/linkTo}} + {{#linkTo "preferences.email" class="btn pad-left"}}{{i18n user.change}}{{/linkTo}}
{{i18n user.email.instructions}} @@ -35,7 +35,7 @@
- {{i18n user.change_password.action}} {{passwordProgress}} + {{i18n user.change}} {{passwordProgress}}
diff --git a/app/assets/javascripts/discourse/views/user/preferences_about_view.js b/app/assets/javascripts/discourse/views/user/preferences_about_view.js new file mode 100644 index 000000000..258e64bb6 --- /dev/null +++ b/app/assets/javascripts/discourse/views/user/preferences_about_view.js @@ -0,0 +1,18 @@ +/** + This view handles rendering of a user's bio editor + + @class PreferencesAboutView + @extends Discourse.View + @namespace Discourse + @module Discourse +**/ +Discourse.PreferencesAboutView = Discourse.View.extend({ + templateName: 'user/about', + classNames: ['user-preferences'], + + didInsertElement: function() { + this.$('textarea').focus(); + } +}); + + diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index eb3446742..5e558f033 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -184,25 +184,26 @@ en: dynamic_favicon: "Show incoming message notifications on favicon" external_links_in_new_tab: "Open all external links in a new tab" enable_quoting: "Enable quote reply for highlighted text" - + change: "change" moderator: "{{user}} is a moderator" admin: "{{user}} is an admin" change_password: - action: "change" success: "(email sent)" in_progress: "(sending email)" error: "(error)" + change_about: + title: "Change About Me" + change_username: - action: "change" title: "Change Username" confirm: "There could be consequences to changing your username. Are you absolutely sure you want to?" taken: "Sorry, that username is taken." error: "There was an error changing your username." invalid: "That username is invalid. It must only include numbers and letters" + change_email: - action: 'change' title: "Change Email" taken: "Sorry, that email is not available." error: "There was an error changing your email. Perhaps that address is already in use?" diff --git a/config/locales/server.cs.yml b/config/locales/server.cs.yml index 96716ef55..caf79aa62 100644 --- a/config/locales/server.cs.yml +++ b/config/locales/server.cs.yml @@ -123,7 +123,7 @@ cs: cant_send_pm: "Bohužel, tomuto uživateli nemůžete poslat soukromou zprávu." user_profile: - no_info_me: "
Pole 'o mně' je v tuto chvíli prázdné, nechcete si ho vyplnit?
" + no_info_me: "
Pole 'o mně' je v tuto chvíli prázdné, nechcete si ho vyplnit?
" no_info_other: "
%{name} o sobě zatím žádné informace nevyplnil
" category: diff --git a/config/locales/server.da.yml b/config/locales/server.da.yml index 16bf97f3b..95fcde2a3 100644 --- a/config/locales/server.da.yml +++ b/config/locales/server.da.yml @@ -76,7 +76,7 @@ da: cant_send_pm: "Beklager, du kan ikke sende en privat besked til den bruger." user_profile: - no_info_me: "
“Om mig” feltet på din profil er pt. tomt, ønsker du at udfylde det?
" + no_info_me: "
“Om mig” feltet på din profil er pt. tomt, ønsker du at udfylde det?
" no_info_other: "
%{name} har ikke skrevet noget i “Om mig”-feltet endnu
" category: diff --git a/config/locales/server.de.yml b/config/locales/server.de.yml index 1f34492e4..c377df314 100644 --- a/config/locales/server.de.yml +++ b/config/locales/server.de.yml @@ -111,7 +111,7 @@ de: cant_send_pm: "Entschuldige, du kannst keine private Nachricht an diesen Nutzer schicken." user_profile: - no_info_me: "
Das 'Über mich'-Feld deines Profils ist aktuell leer, möchtest Du es ausfüllen?
" + no_info_me: "
Das 'Über mich'-Feld deines Profils ist aktuell leer, möchtest Du es ausfüllen?
" no_info_other: "
%{name} hat noch nichts in das 'Über mich'-Feld des Nutzerprofils eingetragen
" category: diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 7e30be78e..6554f2007 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -122,7 +122,7 @@ en: cant_send_pm: "Sorry, you cannot send a private message to that user." user_profile: - no_info_me: "
the About Me field of your profile is currently blank, would you like to fill it out?
" + no_info_me: "
the About Me field of your profile is currently blank, would you like to fill it out?
" no_info_other: "
%{name} hasn't entered anything in the About Me field of their profile yet
" category: diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 95a7c93de..1f76374ef 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -76,7 +76,7 @@ es: cant_send_pm: "Lo sentimos, no puedes enviar un mensaje privado a este usuario." user_profile: - no_info_me: "
El campo 'Sobre mí' de tu perfil está actualmente en blanco, ¿Te gustaría rellenarlo?
" + no_info_me: "
El campo 'Sobre mí' de tu perfil está actualmente en blanco, ¿Te gustaría rellenarlo?
" no_info_other: "
%{name} no ha introducido nada aún en el campo 'Sobre mí' de su perfil
" category: diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml index b4a1e36a6..bfd6fe54d 100644 --- a/config/locales/server.fr.yml +++ b/config/locales/server.fr.yml @@ -122,7 +122,7 @@ fr: cant_send_pm: "Désolé, vous ne pouvez pas envoyer de message privé à cet utilisateur." user_profile: - no_info_me: "
le champ À propos de moi de votre profil est actuellement vide, souhaitez-vous le remplir ?
" + no_info_me: "
le champ À propos de moi de votre profil est actuellement vide, souhaitez-vous le remplir ?
" no_info_other: "
%{name} n'a rien renseigné dans le champ À propos de moi de son profil
" category: diff --git a/config/locales/server.id.yml b/config/locales/server.id.yml index cc35f87a3..f8f4b154c 100644 --- a/config/locales/server.id.yml +++ b/config/locales/server.id.yml @@ -72,7 +72,7 @@ id: cant_send_pm: "Sorry, you cannot send a private message to that user." user_profile: - no_info_me: "
the About Me field of your profile is currently blank, would you like to fill it out?
" + no_info_me: "
the About Me field of your profile is currently blank, would you like to fill it out?
" no_info_other: "
%{name} hasn't entered anything in the About Me field of their profile yet
" category: diff --git a/config/locales/server.it.yml b/config/locales/server.it.yml index 2938baf3b..5eeb2b9bc 100644 --- a/config/locales/server.it.yml +++ b/config/locales/server.it.yml @@ -107,7 +107,7 @@ it: cant_send_pm: "Spriacenti, non puoi mandare un messaggio privato a quell'utente." user_profile: - no_info_me: "
il campo About Me del tuo profilo è vuoto, vuoi compilarlo?
" + no_info_me: "
il campo About Me del tuo profilo è vuoto, vuoi compilarlo?
" no_info_other: "
%{name} non ha ancora compilato il campo About Me del suo profilo.
" category: diff --git a/config/locales/server.ko.yml b/config/locales/server.ko.yml index eb549d843..e9602bc03 100644 --- a/config/locales/server.ko.yml +++ b/config/locales/server.ko.yml @@ -101,7 +101,7 @@ ko: cant_send_pm: "Sorry, you cannot send a private message to that user." user_profile: - no_info_me: "
the About Me field of your profile is currently blank, would you like to fill it out?
" + no_info_me: "
the About Me field of your profile is currently blank, would you like to fill it out?
" no_info_other: "
%{name} hasn't entered anything in the About Me field of their profile yet
" category: diff --git a/config/locales/server.nl.yml b/config/locales/server.nl.yml index 4a7b0c2ef..5ac66ed33 100644 --- a/config/locales/server.nl.yml +++ b/config/locales/server.nl.yml @@ -121,7 +121,7 @@ nl: cant_send_pm: "Sorry, je kan geen privébericht sturen naar deze persoon." user_profile: - no_info_me: "
Het Over Mij-profielveld is nog leeg, zou je deze willen invullen?
" + no_info_me: "
Het Over Mij-profielveld is nog leeg, zou je deze willen invullen?
" no_info_other: "
%{name} heeft nog niks in zijn of haar Over Mij-profielveld ingevuld
" category: diff --git a/config/locales/server.pt.yml b/config/locales/server.pt.yml index e9272d915..eeda18c50 100644 --- a/config/locales/server.pt.yml +++ b/config/locales/server.pt.yml @@ -63,7 +63,7 @@ pt: cant_send_pm: "Desculpa, não podes enviar uma mensagem privada para esse utilizador." user_profile: - no_info_me: "
o campo Sobre mim do teu perfil está em branco, gostavas de o completar?
" + no_info_me: "
o campo Sobre mim do teu perfil está em branco, gostavas de o completar?
" no_info_other: "
%{name} ainda não colocou nada no campo Sobre Mim
" category: diff --git a/config/locales/server.pt_BR.yml b/config/locales/server.pt_BR.yml index 0ecc8d653..e412cd8db 100644 --- a/config/locales/server.pt_BR.yml +++ b/config/locales/server.pt_BR.yml @@ -104,7 +104,7 @@ pt_BR: archetype: cant_send_pm: "Desculpe, não podes enviar uma mensagem particular para esse utilizador." user_profile: - no_info_me: "
o campo Sobre mim do seu perfil está em branco, quer completar?
" + no_info_me: "
o campo Sobre mim do seu perfil está em branco, quer completar?
" no_info_other: "
%{name} ainda não colocou nada no campo Sobre Mim
" category: topic_prefix: "Definição da categoria %{category}" diff --git a/config/locales/server.ru.yml b/config/locales/server.ru.yml index d9e359a83..3a9cdb736 100644 --- a/config/locales/server.ru.yml +++ b/config/locales/server.ru.yml @@ -126,7 +126,7 @@ ru: cant_send_pm: Извините, вы не можете посылать личные сообщения данному пользователю. user_profile: no_info_me: | -
Вы оставили пустым поле «Обо мне" хотите заполнить его сейчас?
+
Вы оставили пустым поле «Обо мне" хотите заполнить его сейчас?
no_info_other: "
%{name} еще не заполнил поле «Обо мне» в своём профайле.
" category: topic_prefix: 'Описание категории %{category}' diff --git a/config/locales/server.sv.yml b/config/locales/server.sv.yml index b697c3c1b..dc8a55ab5 100644 --- a/config/locales/server.sv.yml +++ b/config/locales/server.sv.yml @@ -90,7 +90,7 @@ sv: cant_send_pm: "Tyvärr, du kan inte skicka ett privat meddelande till den användaren." user_profile: - no_info_me: "
Din profils Om Mig-fält är för närvarande tomt, skulle du vilja fylla i det?
" + no_info_me: "
Din profils Om Mig-fält är för närvarande tomt, skulle du vilja fylla i det?
" no_info_other: "
%{name} har inte skrivit någonting i dess profils Om Mig-fält ännu
" category: diff --git a/config/locales/server.zh_CN.yml b/config/locales/server.zh_CN.yml index 759f8fae2..462f3a90c 100644 --- a/config/locales/server.zh_CN.yml +++ b/config/locales/server.zh_CN.yml @@ -111,7 +111,7 @@ zh_CN: cant_send_pm: "抱歉,你不能向该用户发送私信。" user_profile: - no_info_me: "
你的介绍信息中,“关于我”部分目前还是空白,介绍一下你自己,好不好?
" + no_info_me: "
你的介绍信息中,“关于我”部分目前还是空白,介绍一下你自己,好不好?
" no_info_other: "
%{name} 尚未在他/她的介绍中的“关于我”部分填写任何信息
" category: diff --git a/config/locales/server.zh_TW.yml b/config/locales/server.zh_TW.yml index 2d93c017d..d0b41e44a 100644 --- a/config/locales/server.zh_TW.yml +++ b/config/locales/server.zh_TW.yml @@ -107,7 +107,7 @@ zh_TW: cant_send_pm: "抱歉,你不能向該用戶發送私信。" user_profile: - no_info_me: "
你的介紹信息中,“關于我”部分目前還是空白,介紹一下你自己,好不好?
" + no_info_me: "
你的介紹信息中,“關于我”部分目前還是空白,介紹一下你自己,好不好?
" no_info_other: "
%{name} 尚未在他/她的介紹中的“關于我”部分填寫任何信息
" category: diff --git a/config/routes.rb b/config/routes.rb index 6177ecd44..028c1e1c1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -125,6 +125,7 @@ Discourse::Application.routes.draw do get 'users/:username/preferences' => 'users#preferences', constraints: {username: USERNAME_ROUTE_FORMAT}, as: :email_preferences get 'users/:username/preferences/email' => 'users#preferences', constraints: {username: USERNAME_ROUTE_FORMAT} put 'users/:username/preferences/email' => 'users#change_email', constraints: {username: USERNAME_ROUTE_FORMAT} + get 'users/:username/preferences/about-me' => 'users#preferences', constraints: {username: USERNAME_ROUTE_FORMAT} get 'users/:username/preferences/username' => 'users#preferences', constraints: {username: USERNAME_ROUTE_FORMAT} put 'users/:username/preferences/username' => 'users#username', constraints: {username: USERNAME_ROUTE_FORMAT} get 'users/:username/avatar(/:size)' => 'users#avatar', constraints: {username: USERNAME_ROUTE_FORMAT}