Link to edit "About Me" links directly to the field.

This commit is contained in:
Robin Ward 2013-07-22 16:52:46 -04:00
parent b0ca3a34ca
commit 43ceacabab
30 changed files with 263 additions and 191 deletions

View File

@ -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'),
});

View File

@ -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,

View File

@ -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
});
});
}

View File

@ -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() {

View File

@ -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' });

View File

@ -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'
});
}
});

View File

@ -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'
});
}
});

View File

@ -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'));
}
});

View File

@ -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

View File

@ -0,0 +1,31 @@
<form class="form-horizontal">
<div class="control-group">
<div class="controls">
<h3>{{i18n user.change_about.title}}</h3>
</div>
</div>
{{#if error}}
<div class="control-group">
<div class="instructions">
<div class='alert error'>{{i18n user.change_about.error}}</div>
</div>
</div>
{{/if}}
<div class="control-group">
<label class="control-label">{{i18n user.bio}}</label>
<div class="controls">
{{pagedown value=bio_raw}}
</div>
</div>
<div class="control-group">
<div class="controls">
<button {{action changeAbout}} {{bindAttr disabled="saveDisabled"}} class="btn btn-primary">{{saveButtonText}}</button>
{{#if saved}}{{i18n saved}}{{/if}}
</div>
</div>
</form>

View File

@ -4,7 +4,7 @@
<label class="control-label">{{i18n user.username.title}}</label>
<div class="controls">
<span class='static'>{{username}}</span>
{{#linkTo "preferences.username" class="btn pad-left"}}{{i18n user.change_username.action}}{{/linkTo}}
{{#linkTo "preferences.username" class="btn pad-left"}}{{i18n user.change}}{{/linkTo}}
</div>
<div class='instructions'>
{{{i18n user.username.short_instructions username="username"}}}
@ -25,7 +25,7 @@
<label class="control-label">{{i18n user.email.title}}</label>
<div class="controls">
<span class='static'>{{email}}</span>
{{#linkTo "preferences.email" class="btn pad-left"}}{{i18n user.change_email.action}}{{/linkTo}}
{{#linkTo "preferences.email" class="btn pad-left"}}{{i18n user.change}}{{/linkTo}}
</div>
<div class='instructions'>
{{i18n user.email.instructions}}
@ -35,7 +35,7 @@
<div class="control-group">
<label class="control-label">{{i18n user.password.title}}</label>
<div class="controls">
<a href="#" {{action changePassword}} class='btn'>{{i18n user.change_password.action}}</a> {{passwordProgress}}
<a href="#" {{action changePassword}} class='btn'>{{i18n user.change}}</a> {{passwordProgress}}
</div>
</div>

View File

@ -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();
}
});

View File

@ -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?"

View File

@ -123,7 +123,7 @@ cs:
cant_send_pm: "Bohužel, tomuto uživateli nemůžete poslat soukromou zprávu."
user_profile:
no_info_me: "<div class='missing-profile'>Pole 'o mně' je v tuto chvíli prázdné, <a href='/users/%{username_lower}/preferences'>nechcete si ho vyplnit?</a></div>"
no_info_me: "<div class='missing-profile'>Pole 'o mně' je v tuto chvíli prázdné, <a href='/users/%{username_lower}/preferences/about-me'>nechcete si ho vyplnit?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} o sobě zatím žádné informace nevyplnil</div>"
category:

View File

@ -76,7 +76,7 @@ da:
cant_send_pm: "Beklager, du kan ikke sende en privat besked til den bruger."
user_profile:
no_info_me: "<div class='missing-profile'>“Om mig” feltet på din profil er pt. tomt, <a href='/users/%{username_lower}/preferences'>ønsker du at udfylde det</a>?</div>"
no_info_me: "<div class='missing-profile'>“Om mig” feltet på din profil er pt. tomt, <a href='/users/%{username_lower}/preferences/about-me'>ønsker du at udfylde det</a>?</div>"
no_info_other: "<div class='missing-profile'>%{name} har ikke skrevet noget i “Om mig”-feltet endnu</div>"
category:

View File

@ -111,7 +111,7 @@ de:
cant_send_pm: "Entschuldige, du kannst keine private Nachricht an diesen Nutzer schicken."
user_profile:
no_info_me: "<div class='missing-profile'>Das 'Über mich'-Feld deines Profils ist aktuell leer, <a href='/users/%{username_lower}/preferences'>möchtest Du es ausfüllen?</a></div>"
no_info_me: "<div class='missing-profile'>Das 'Über mich'-Feld deines Profils ist aktuell leer, <a href='/users/%{username_lower}/preferences/about-me'>möchtest Du es ausfüllen?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} hat noch nichts in das 'Über mich'-Feld des Nutzerprofils eingetragen</div>"
category:

View File

@ -122,7 +122,7 @@ en:
cant_send_pm: "Sorry, you cannot send a private message to that user."
user_profile:
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences'>would you like to fill it out?</a></div>"
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences/about-me'>would you like to fill it out?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} hasn't entered anything in the About Me field of their profile yet</div>"
category:

View File

@ -76,7 +76,7 @@ es:
cant_send_pm: "Lo sentimos, no puedes enviar un mensaje privado a este usuario."
user_profile:
no_info_me: "<div class='missing-profile'>El campo 'Sobre mí' de tu perfil está actualmente en blanco, <a href='/users/%{username_lower}/preferences'>¿Te gustaría rellenarlo?</a></div>"
no_info_me: "<div class='missing-profile'>El campo 'Sobre mí' de tu perfil está actualmente en blanco, <a href='/users/%{username_lower}/preferences/about-me'>¿Te gustaría rellenarlo?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} no ha introducido nada aún en el campo 'Sobre mí' de su perfil</div>"
category:

View File

@ -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: "<div class='missing-profile'>le champ À propos de moi de votre profil est actuellement vide, <a href='/users/%{username_lower}/preferences'>souhaitez-vous le remplir ?</a></div>"
no_info_me: "<div class='missing-profile'>le champ À propos de moi de votre profil est actuellement vide, <a href='/users/%{username_lower}/preferences/about-me'>souhaitez-vous le remplir ?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} n'a rien renseigné dans le champ À propos de moi de son profil</div>"
category:

View File

@ -72,7 +72,7 @@ id:
cant_send_pm: "Sorry, you cannot send a private message to that user."
user_profile:
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences'>would you like to fill it out?</a></div>"
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences/about-me'>would you like to fill it out?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} hasn't entered anything in the About Me field of their profile yet</div>"
category:

View File

@ -107,7 +107,7 @@ it:
cant_send_pm: "Spriacenti, non puoi mandare un messaggio privato a quell'utente."
user_profile:
no_info_me: "<div class='missing-profile'>il campo About Me del tuo profilo è vuoto, <a href='/users/%{username_lower}/preferences'>vuoi compilarlo?</a></div>"
no_info_me: "<div class='missing-profile'>il campo About Me del tuo profilo è vuoto, <a href='/users/%{username_lower}/preferences/about-me'>vuoi compilarlo?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} non ha ancora compilato il campo About Me del suo profilo.</div>"
category:

View File

@ -101,7 +101,7 @@ ko:
cant_send_pm: "Sorry, you cannot send a private message to that user."
user_profile:
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences'>would you like to fill it out?</a></div>"
no_info_me: "<div class='missing-profile'>the About Me field of your profile is currently blank, <a href='/users/%{username_lower}/preferences/about-me'>would you like to fill it out?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} hasn't entered anything in the About Me field of their profile yet</div>"
category:

View File

@ -121,7 +121,7 @@ nl:
cant_send_pm: "Sorry, je kan geen privébericht sturen naar deze persoon."
user_profile:
no_info_me: "<div class='missing-profile'>Het Over Mij-profielveld is nog leeg, <a href='/users/%{username_lower}/preferences'>zou je deze willen invullen?</a></div>"
no_info_me: "<div class='missing-profile'>Het Over Mij-profielveld is nog leeg, <a href='/users/%{username_lower}/preferences/about-me'>zou je deze willen invullen?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} heeft nog niks in zijn of haar Over Mij-profielveld ingevuld</div>"
category:

View File

@ -63,7 +63,7 @@ pt:
cant_send_pm: "Desculpa, não podes enviar uma mensagem privada para esse utilizador."
user_profile:
no_info_me: "<div class='missing-profile'>o campo Sobre mim do teu perfil está em branco, <a href='/users/%{username_lower}/preferences'>gostavas de o completar?</a></div>"
no_info_me: "<div class='missing-profile'>o campo Sobre mim do teu perfil está em branco, <a href='/users/%{username_lower}/preferences/about-me'>gostavas de o completar?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} ainda não colocou nada no campo Sobre Mim</div>"
category:

View File

@ -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: "<div class='missing-profile'>o campo Sobre mim do seu perfil está em branco, <a href='/users/%{username_lower}/preferences'>quer completar?</a></div>"
no_info_me: "<div class='missing-profile'>o campo Sobre mim do seu perfil está em branco, <a href='/users/%{username_lower}/preferences/about-me'>quer completar?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} ainda não colocou nada no campo Sobre Mim</div>"
category:
topic_prefix: "Definição da categoria %{category}"

View File

@ -126,7 +126,7 @@ ru:
cant_send_pm: Извините, вы не можете посылать личные сообщения данному пользователю.
user_profile:
no_info_me: |
<div class='missing-profile'>Вы оставили пустым поле «Обо мне" <a href='/users/%{username_lower}/preferences'> хотите заполнить его сейчас? </a></div>
<div class='missing-profile'>Вы оставили пустым поле «Обо мне" <a href='/users/%{username_lower}/preferences/about-me'> хотите заполнить его сейчас? </a></div>
no_info_other: "<div class='missing-profile'>%{name} еще не заполнил поле «Обо мне» в своём профайле. </div>"
category:
topic_prefix: 'Описание категории %{category}'

View File

@ -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: "<div class='missing-profile'>Din profils Om Mig-fält är för närvarande tomt, <a href='/users/%{username_lower}/preferences'>skulle du vilja fylla i det?</a></div>"
no_info_me: "<div class='missing-profile'>Din profils Om Mig-fält är för närvarande tomt, <a href='/users/%{username_lower}/preferences/about-me'>skulle du vilja fylla i det?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} har inte skrivit någonting i dess profils Om Mig-fält ännu</div>"
category:

View File

@ -111,7 +111,7 @@ zh_CN:
cant_send_pm: "抱歉,你不能向该用户发送私信。"
user_profile:
no_info_me: "<div class='missing-profile'>你的介绍信息中,“关于我”部分目前还是空白,<a href='/users/%{username_lower}/preferences'>介绍一下你自己,好不好?</a></div>"
no_info_me: "<div class='missing-profile'>你的介绍信息中,“关于我”部分目前还是空白,<a href='/users/%{username_lower}/preferences/about-me'>介绍一下你自己,好不好?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} 尚未在他/她的介绍中的“关于我”部分填写任何信息</div>"
category:

View File

@ -107,7 +107,7 @@ zh_TW:
cant_send_pm: "抱歉,你不能向該用戶發送私信。"
user_profile:
no_info_me: "<div class='missing-profile'>你的介紹信息中,“關于我”部分目前還是空白,<a href='/users/%{username_lower}/preferences'>介紹一下你自己,好不好?</a></div>"
no_info_me: "<div class='missing-profile'>你的介紹信息中,“關于我”部分目前還是空白,<a href='/users/%{username_lower}/preferences/about-me'>介紹一下你自己,好不好?</a></div>"
no_info_other: "<div class='missing-profile'>%{name} 尚未在他/她的介紹中的“關于我”部分填寫任何信息</div>"
category:

View File

@ -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}