-
Notifications
You must be signed in to change notification settings - Fork 140
Move error messages to translation file #878
Comments
@asquare14 The best way to start is by selecting one of the issues with the 'beginner-friendly' label. Like this issue (or click on the yellow label, to see all issues with that label). Even if you are not a beginner at coding, they are suitable for first time contributors. After that, if you are looking for something more challenging, you can take a look at the issues labeled 'rgsoc18'. I wouldn't recommend all of them, but we can chat about that later. To learn more about projects: see https://railsgirlssummerofcode.org/guide/projects/ |
Thank You !
…On Fri, Dec 22, 2017 at 2:37 PM, Maud de Vries ***@***.***> wrote:
@asquare14 <https://github.com/asquare14> The best way to start is by
selecting one of the issues with the 'beginner-friendly' label. Like this
issue (or click on the yellow label, to see all issues with that label).
Even if you are not a beginner at coding, they are suitable for first time
contributors.
Does this work for you?
After that, if you are looking for something more challenging, you can
take a look at the issues labeled 'rgsoc18'. I wouldn't recommend all of
them, but we can chat about that later.
To learn more about projects: see https://railsgirlssummerofcode.org/
guide/projects/
I don't know much more that what is in the guides ;-) , there is an email
address in the guide for further inquiries.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#878 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AV4EVWDVOi1YCr138_XQuFRKmTtUCi1nks5tC3FTgaJpZM4Qlyp3>
.
|
Hey @F3PiX ,I would like to work on the issue,will send a PR soon :) |
Hi @nileshgulia1 Welcome at the Teams App!!! Great that you want to contribute. 👍 🎉 @asquare14 Are you currently working on this issue? Or can we pass it to @nileshgulia1 ? @nileshgulia1 I'd hate to see you do double work for nothing, so please wait a few days until we know if @asquare14 is working on this. |
Nopes I'm not. He's free to work on it. All the best!
…On 27 Dec 2017 9:26 pm, "Maud de Vries" ***@***.***> wrote:
Hi @nileshgulia1 <https://github.com/nileshgulia1> Welcome at the Teams
App!!! Great that you want to contribute. 👍 🎉
@asquare14 <https://github.com/asquare14> Are you currently working on
this issue? Or can we pass it to @nileshgulia1
<https://github.com/nileshgulia1> ?
@nileshgulia1 <https://github.com/nileshgulia1> I'd hate to see you do
double work for nothing, so please wait a few days until we know if
@asquare14 <https://github.com/asquare14> is working on this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#878 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AV4EVQHruWy_n38teJnDQARUwhcSlzIeks5tEmi5gaJpZM4Qlyp3>
.
|
@nileshgulia1 All yours!!! 💃 @asquare14 Thanks for your swift reaction! Much appreciated. |
@nileshgulia1 One more thing: be sure to first pull in the latest changes - we just merged a huge PR - . Then create your branch, so that your commits are on top of the changes. (Ask away if you need more explanation/help.) |
hey @F3PiX ,need help translating error messages via i18n. def different_projects_required
if project1 && project1 == project2
errors.add(:projects, :must_not_be_selected_twice)
end
end
def accepted_projects_required
if projects.any? { |p| p && !p.accepted? } # if they don't exist, the presence validation will handle it
errors.add(:projects, :must_have_been_accepted)
end
end
def only_one_application_draft_allowed
unless team.application_drafts.where(season: season).none?
errors.add(:base, :Only_one_application_may_be_lodged)
end
end
errors:
models:
application_draft:
attributes:
projects:
must_not_be_selected_twice: must not be selected twice is this the right approach? |
This is a great start, yes!
Okay? |
@F3PiX Great,Thank you :) |
Hi @nileshgulia1 How are things going? Let me know if you need help? |
Hello,@F3PiX, Got busy doing other work,Yeah things are going great ,Sure i will ask if i need help.Thank you :) |
We have some custom error messages, for example here.
rgsoc-teams/app/models/application_draft.rb
Lines 141 to 145 in db178cf
We want to move these custom error messages to the translation file
en.yml
. In this commit you can see how it is done, for an error message on the Todo model and its user attribute.Collect all the error messages and put them into the translation file, at the right place.
Further reading: http://guides.rubyonrails.org/i18n.html#translations-for-active-record-models
The text was updated successfully, but these errors were encountered: