Maarten van den Berg 7 years ago
parent
commit
5e3ca1bd89
43 changed files with 431 additions and 211 deletions
  1. 2 2
      app/controllers/activities_controller.rb
  2. 1 1
      app/controllers/application_controller.rb
  3. 14 14
      app/controllers/authentication_controller.rb
  4. 3 3
      app/controllers/groups_controller.rb
  5. 5 5
      app/controllers/members_controller.rb
  6. 3 3
      app/controllers/people_controller.rb
  7. 2 2
      app/helpers/authentication_helper.rb
  8. 2 2
      app/helpers/groups_helper.rb
  9. 2 2
      app/mailers/authentication_mailer.rb
  10. 2 2
      app/models/activity.rb
  11. 1 1
      app/models/member.rb
  12. 1 1
      app/models/participant.rb
  13. 1 1
      app/models/person.rb
  14. 1 1
      app/models/user.rb
  15. 2 2
      app/views/activities/_wide_presence_buttons.haml
  16. 3 3
      app/views/activities/show.html.haml
  17. 8 8
      app/views/groups/index.html.erb
  18. 2 2
      app/views/groups/new.html.erb
  19. 10 10
      app/views/groups/show.html.haml
  20. 1 1
      app/views/groups/user_groups.html.haml
  21. 1 1
      app/views/members/_form.html.erb
  22. 3 3
      app/views/members/edit.html.erb
  23. 7 7
      app/views/members/index.html.erb
  24. 2 2
      app/views/members/invite.html.haml
  25. 2 2
      app/views/members/new.html.erb
  26. 3 3
      app/views/members/show.html.erb
  27. 3 3
      app/views/people/edit.html.erb
  28. 5 5
      app/views/people/index.html.erb
  29. 2 2
      app/views/people/new.html.erb
  30. 3 3
      app/views/people/show.html.erb
  31. 3 3
      config/locales/actionview_nl.yml
  32. 31 20
      config/locales/activities/en.yml
  33. 31 20
      config/locales/activities/nl.yml
  34. 31 15
      config/locales/authentication/en.yml
  35. 30 15
      config/locales/authentication/nl.yml
  36. 2 2
      config/locales/dashboard/en.yml
  37. 2 2
      config/locales/dashboard/nl.yml
  38. 55 10
      config/locales/en.yml
  39. 34 4
      config/locales/groups/en.yml
  40. 34 4
      config/locales/groups/nl.yml
  41. 54 9
      config/locales/nl.yml
  42. 14 5
      config/locales/person/en.yml
  43. 13 5
      config/locales/person/nl.yml

+ 2 - 2
app/controllers/activities_controller.rb

48
       if @activity.save
48
       if @activity.save
49
         format.html {
49
         format.html {
50
           redirect_to group_activity_url(@group, @activity)
50
           redirect_to group_activity_url(@group, @activity)
51
-          flash_message(:info, 'Activity was successfully created.')
51
+          flash_message(:info, I18n.t('activities.created'))
52
         }
52
         }
53
         format.json { render :show, status: :created, location: @activity }
53
         format.json { render :show, status: :created, location: @activity }
54
       else
54
       else
65
       if @activity.update(activity_params)
65
       if @activity.update(activity_params)
66
         format.html {
66
         format.html {
67
           redirect_to group_activity_url(@group, @activity)
67
           redirect_to group_activity_url(@group, @activity)
68
-          flash_message(:info, 'Activity was successfully updated.')
68
+          flash_message(:info, I18n.t('activities.updated'))
69
         }
69
         }
70
         format.json { render :show, status: :ok, location: @activity }
70
         format.json { render :show, status: :ok, location: @activity }
71
       else
71
       else

+ 1 - 1
app/controllers/application_controller.rb

7
 
7
 
8
   private
8
   private
9
   def invalid_auth_token
9
   def invalid_auth_token
10
-    render text: "You submitted an invalid request! If you got here after clicking a link, it's possible that someone is doing something nasty!", status: 400
10
+    render text: I18n.t(:invalid_csrf), status: 400
11
   end
11
   end
12
 end
12
 end

+ 14 - 14
app/controllers/authentication_controller.rb

6
 
6
 
7
   def login
7
   def login
8
     if params[:session][:email].blank? || params[:session][:password].blank?
8
     if params[:session][:email].blank? || params[:session][:password].blank?
9
-      flash_message(:warning, "You forgot to add value")
9
+      flash_message(:warning, I18n.t(:value_required))
10
       redirect_to action: 'login_form'
10
       redirect_to action: 'login_form'
11
     else
11
     else
12
       u = User.find_by(email: params[:session][:email])
12
       u = User.find_by(email: params[:session][:email])
14
       if u && u.confirmed && u.authenticate(params[:session][:password])
14
       if u && u.confirmed && u.authenticate(params[:session][:password])
15
         log_in(u, params[:session][:remember_me].to_i)
15
         log_in(u, params[:session][:remember_me].to_i)
16
 
16
 
17
-        flash_message(:success, "Hello, #{u.person.full_name}!")
17
+        flash_message(:success, I18n.t(:greeting, name: u.person.first_name))
18
         redirect_to root_path
18
         redirect_to root_path
19
       elsif u and not u.confirmed
19
       elsif u and not u.confirmed
20
-        flash_message(:warning, "Your account has not been activated yet, please confirm using the email you have received.")
20
+        flash_message(:warning, I18n.t('authentication.activation_required'))
21
         redirect_to action: 'login_form'
21
         redirect_to action: 'login_form'
22
       else
22
       else
23
-        flash_message(:danger, "Invalid username/password combination!")
23
+        flash_message(:danger, I18n.t('authentication.invalid_user_or_pass'))
24
         redirect_to action: 'login_form'
24
         redirect_to action: 'login_form'
25
       end
25
       end
26
     end
26
     end
47
     person = Person.find_by(email: params[:user][:email])
47
     person = Person.find_by(email: params[:user][:email])
48
 
48
 
49
     if not person
49
     if not person
50
-      flash_message(:warning, "That email address is unknown!")
50
+      flash_message(:warning, I18n.t('authentication.unknown_email'))
51
       redirect_to action: 'create_password_form'
51
       redirect_to action: 'create_password_form'
52
       return
52
       return
53
     end
53
     end
54
 
54
 
55
     user = User.find_by(person: person)
55
     user = User.find_by(person: person)
56
     if user and user.confirmed
56
     if user and user.confirmed
57
-      flash_message(:warning, "Your account has already been activated, please use the login form if you have forgotten your password.")
57
+      flash_message(:warning, I18n.t('authentication.already_activated'))
58
       redirect_to action: 'login'
58
       redirect_to action: 'login'
59
       return
59
       return
60
     end
60
     end
69
     end
69
     end
70
 
70
 
71
     AuthenticationMailer::password_confirm_email(user).deliver_now
71
     AuthenticationMailer::password_confirm_email(user).deliver_now
72
-    flash_message(:success, "An email has been sent, check your inbox!")
72
+    flash_message(:success, I18n.t('authentication.emails.sent'))
73
     redirect_to action: 'login'
73
     redirect_to action: 'login'
74
   end
74
   end
75
 
75
 
80
   def forgotten_password
80
   def forgotten_password
81
     user = User.find_by(email: params[:password_reset][:email])
81
     user = User.find_by(email: params[:password_reset][:email])
82
     if not user
82
     if not user
83
-      flash_message(:danger, "That email address is not associated with any user.")
83
+      flash_message(:danger, I18n.t('authentication.unknown_email'))
84
       redirect_to action: 'forgotten_password_form'
84
       redirect_to action: 'forgotten_password_form'
85
       return
85
       return
86
     end
86
     end
87
     AuthenticationMailer::password_reset_email(user).deliver_later
87
     AuthenticationMailer::password_reset_email(user).deliver_later
88
-    flash_message(:success, "An email has been sent, check your inbox!")
88
+    flash_message(:success, I18n.t('authentication.emails.sent'))
89
     redirect_to action: 'login'
89
     redirect_to action: 'login'
90
   end
90
   end
91
 
91
 
104
     end
104
     end
105
 
105
 
106
     if not params[:password] == params[:password_confirmation]
106
     if not params[:password] == params[:password_confirmation]
107
-      flash_message(:warning, "Password confirmation does not match your password!")
107
+      flash_message(:warning, I18n.t('authentication.password_repeat_mismatch'))
108
       redirect_to action: 'reset_password_form', token: params[:token]
108
       redirect_to action: 'reset_password_form', token: params[:token]
109
       return
109
       return
110
     end
110
     end
116
 
116
 
117
     token.destroy!
117
     token.destroy!
118
 
118
 
119
-    flash_message(:success, "Your password has been reset, you may now log in.")
119
+    flash_message(:success, I18n.t('authentication.password_reset_complete'))
120
     redirect_to action: 'login'
120
     redirect_to action: 'login'
121
   end
121
   end
122
 
122
 
140
 
140
 
141
     token.destroy!
141
     token.destroy!
142
 
142
 
143
-    flash_message(:success, "Your account has been confirmed, you may now log in.")
143
+    flash_message(:success, I18n.t('authentication.activation_complete'))
144
     redirect_to action: 'login'
144
     redirect_to action: 'login'
145
   end
145
   end
146
 
146
 
151
 
151
 
152
   def token_valid?(token)
152
   def token_valid?(token)
153
     if token.nil?
153
     if token.nil?
154
-      flash_message(:warning, "No valid token specified!")
154
+      flash_message(:warning, I18n.t('authentication.invalid_token'))
155
       redirect_to action: 'login'
155
       redirect_to action: 'login'
156
       return false
156
       return false
157
     end
157
     end
158
     if token.expires and token.expires < DateTime.now
158
     if token.expires and token.expires < DateTime.now
159
-      flash_message(:warning, "That token has expired, please request a new one.")
159
+      flash_message(:warning, I18n.t('authentication.token_expired'))
160
       redirect_to action: 'login'
160
       redirect_to action: 'login'
161
       return false
161
       return false
162
     end
162
     end

+ 3 - 3
app/controllers/groups_controller.rb

56
       if @group.save
56
       if @group.save
57
         format.html {
57
         format.html {
58
           redirect_to @group
58
           redirect_to @group
59
-          flash_message(:info, 'Group was successfully created.')
59
+          flash_message(:info, I18n.t('groups.created'))
60
         }
60
         }
61
         format.json { render :show, status: :created, location: @group }
61
         format.json { render :show, status: :created, location: @group }
62
       else
62
       else
73
       if @group.update(group_params)
73
       if @group.update(group_params)
74
         format.html {
74
         format.html {
75
           redirect_to @group
75
           redirect_to @group
76
-          flash_message(:info, 'Group was successfully updated.')
76
+          flash_message(:info, I18n.t('groups.updated'))
77
         }
77
         }
78
         format.json { render :show, status: :ok, location: @group }
78
         format.json { render :show, status: :ok, location: @group }
79
       else
79
       else
90
     respond_to do |format|
90
     respond_to do |format|
91
       format.html {
91
       format.html {
92
         redirect_to groups_url
92
         redirect_to groups_url
93
-        flash_message(:info, 'Group was successfully destroyed.')
93
+        flash_message(:info, I18n.t('groups.destroyed'))
94
       }
94
       }
95
       format.json { head :no_content }
95
       format.json { head :no_content }
96
     end
96
     end

+ 5 - 5
app/controllers/members_controller.rb

30
 
30
 
31
   def promote
31
   def promote
32
     @member.update_attribute(:is_leader, true)
32
     @member.update_attribute(:is_leader, true)
33
-    flash_message(:success, "#{@member.person.full_name} is now a group leader.")
33
+    flash_message(:success, I18n.t('groups.leader_added', name: @member.person.full_name))
34
     redirect_to group_members_path(@group)
34
     redirect_to group_members_path(@group)
35
   end
35
   end
36
 
36
 
37
   def demote
37
   def demote
38
     @member.update_attribute(:is_leader, false)
38
     @member.update_attribute(:is_leader, false)
39
-    flash_message(:success, "#{@member.person.full_name} is no longer a group leader.")
39
+    flash_message(:success, I18n.t('groups.leader_removed', name: @member.person.full_name))
40
     redirect_to group_members_path(@group)
40
     redirect_to group_members_path(@group)
41
   end
41
   end
42
 
42
 
91
       if @member.save
91
       if @member.save
92
         format.html {
92
         format.html {
93
           redirect_to group_member_url(@group, @member)
93
           redirect_to group_member_url(@group, @member)
94
-          flash_message(:info, "#{@member.full_name} was added successfully.")
94
+          flash_message(:info, I18n.t('groups.member_added', name: @member.person.name))
95
         }
95
         }
96
         format.json { render :show, status: :created, location: @member }
96
         format.json { render :show, status: :created, location: @member }
97
       else
97
       else
109
       if @member.update(member_params)
109
       if @member.update(member_params)
110
         format.html {
110
         format.html {
111
           redirect_to group_member_url(@group, @member)
111
           redirect_to group_member_url(@group, @member)
112
-          flash_message(:info, 'Member was successfully updated.')
112
+          flash_message(:info, I18n.t('groups.member_updated'))
113
         }
113
         }
114
         format.json { render :show, status: :ok, location: @member }
114
         format.json { render :show, status: :ok, location: @member }
115
       else
115
       else
127
     respond_to do |format|
127
     respond_to do |format|
128
       format.html {
128
       format.html {
129
         redirect_to group_members_url(@group)
129
         redirect_to group_members_url(@group)
130
-        flash_message(:info, "#{@member.person.full_name} was successfully removed.")
130
+        flash_message(:info, I18n.t('groups.member_removed', name: @member.person.name))
131
       }
131
       }
132
       format.json { head :no_content }
132
       format.json { head :no_content }
133
     end
133
     end

+ 3 - 3
app/controllers/people_controller.rb

34
     respond_to do |format|
34
     respond_to do |format|
35
       if @person.save
35
       if @person.save
36
         format.html do
36
         format.html do
37
-          flash_message(:success, "Person was successfully created.")
37
+          flash_message(:success, I18n.t('person.created'))
38
           redirect_to @person
38
           redirect_to @person
39
         end
39
         end
40
         format.json { render :show, status: :created, location: @person }
40
         format.json { render :show, status: :created, location: @person }
51
     respond_to do |format|
51
     respond_to do |format|
52
       if @person.update(person_params)
52
       if @person.update(person_params)
53
         format.html do
53
         format.html do
54
-          flash_message(:success, "Person was successfully updated.")
54
+          flash_message(:success, I18n.t('person.updated'))
55
           redirect_to @person
55
           redirect_to @person
56
         end
56
         end
57
 
57
 
69
     @person.destroy
69
     @person.destroy
70
     respond_to do |format|
70
     respond_to do |format|
71
       format.html do
71
       format.html do
72
-        flash_message(:success, 'Person was successfully destroyed.')
72
+        flash_message(:success, I18n.t('person.destroyed'))
73
         redirect_to people_url
73
         redirect_to people_url
74
       end
74
       end
75
 
75
 

+ 2 - 2
app/helpers/authentication_helper.rb

114
 
114
 
115
   def require_login!
115
   def require_login!
116
     if !is_logged_in?
116
     if !is_logged_in?
117
-      flash_message(:warning, "You need to be logged in to do that.")
117
+      flash_message(:warning, I18n.t('authentication.login_required'))
118
       redirect_to controller: 'authentication', action: 'login_form'
118
       redirect_to controller: 'authentication', action: 'login_form'
119
     end
119
     end
120
   end
120
   end
121
 
121
 
122
   def require_admin!
122
   def require_admin!
123
     if !current_person.is_admin?
123
     if !current_person.is_admin?
124
-      flash_message(:danger, "You need to be an administrator to do that.")
124
+      flash_message(:danger, I18n.t('authentication.admin_required'))
125
       redirect_to '/dashboard'
125
       redirect_to '/dashboard'
126
     end
126
     end
127
   end
127
   end

+ 2 - 2
app/helpers/groups_helper.rb

2
   def require_membership!
2
   def require_membership!
3
     require_login!
3
     require_login!
4
     if !(@group.is_member?(current_person) || current_person.is_admin?)
4
     if !(@group.is_member?(current_person) || current_person.is_admin?)
5
-      flash_message(:danger, "You need to be a member of that group to do that.")
5
+      flash_message(:danger, I18n.t('groups.membership_required'))
6
       redirect_to dashboard_home_path
6
       redirect_to dashboard_home_path
7
     end
7
     end
8
   end
8
   end
12
 
12
 
13
     if !(@group.is_leader?(current_person) ||
13
     if !(@group.is_leader?(current_person) ||
14
          current_person.is_admin?)
14
          current_person.is_admin?)
15
-      flash_message(:danger, "You need to be a group leader to do that.")
15
+      flash_message(:danger, I18n.t('groups.leadership_required'))
16
       redirect_to dashboard_home_path
16
       redirect_to dashboard_home_path
17
     end
17
     end
18
   end
18
   end

+ 2 - 2
app/mailers/authentication_mailer.rb

8
     @token = token
8
     @token = token
9
     @user = user
9
     @user = user
10
 
10
 
11
-    mail(to: @user.email, subject: "Reset your Aardbei-password")
11
+    mail(to: @user.email, subject: I18n.t('authentication.emails.forgot.subject'))
12
   end
12
   end
13
 
13
 
14
   def password_confirm_email(user)
14
   def password_confirm_email(user)
20
     @token = token
20
     @token = token
21
     @user = user
21
     @user = user
22
 
22
 
23
-    mail(to: @user.email, subject: "Confirm your Aardbei-account")
23
+    mail(to: @user.email, subject: I18n.t('authentication.emails.confirm.subject'))
24
   end
24
   end
25
 end
25
 end

+ 2 - 2
app/models/activity.rb

99
   # is set before the event starts.
99
   # is set before the event starts.
100
   def deadline_before_start
100
   def deadline_before_start
101
     if self.deadline > self.start
101
     if self.deadline > self.start
102
-      errors.add(:deadline, 'must be before start')
102
+      errors.add(:deadline, I18n.t('activities.errors.must_be_before_start'))
103
     end
103
     end
104
   end
104
   end
105
 
105
 
106
   # Assert that the activity's end, if any, occurs after the event's start.
106
   # Assert that the activity's end, if any, occurs after the event's start.
107
   def end_after_start
107
   def end_after_start
108
     if self.end < self.start
108
     if self.end < self.start
109
-      errors.add(:end, 'must be after start')
109
+      errors.add(:end, I18n.t('activities.errors.must_be_after_start'))
110
     end
110
     end
111
   end
111
   end
112
 end
112
 end

+ 1 - 1
app/models/member.rb

14
   validates :person_id,
14
   validates :person_id,
15
     uniqueness: {
15
     uniqueness: {
16
       scope: :group_id,
16
       scope: :group_id,
17
-      message: "is already a member of this group"
17
+      message: I18n.t('groups.member.already_in')
18
     }
18
     }
19
 
19
 
20
   # Create Participants for this Member for all the group's future activities, where the member isn't enrolled yet.
20
   # Create Participants for this Member for all the group's future activities, where the member isn't enrolled yet.

+ 1 - 1
app/models/participant.rb

21
   validates :person_id,
21
   validates :person_id,
22
     uniqueness: {
22
     uniqueness: {
23
       scope: :activity_id,
23
       scope: :activity_id,
24
-      message: "person already participates in this activity"
24
+      message: I18n.t('activities.errors.already_in')
25
     }
25
     }
26
 
26
 
27
   # TODO: Move to a more appropriate place
27
   # TODO: Move to a more appropriate place

+ 1 - 1
app/models/person.rb

72
   # Assert that the person's birth date, if any, lies in the past.
72
   # Assert that the person's birth date, if any, lies in the past.
73
   def birth_date_cannot_be_in_future
73
   def birth_date_cannot_be_in_future
74
     if self.birth_date && self.birth_date > Date.today
74
     if self.birth_date && self.birth_date > Date.today
75
-      errors.add(:birth_date, "can't be in the future.")
75
+      errors.add(:birth_date, I18n.t('person.errors.cannot_future'))
76
     end
76
     end
77
   end
77
   end
78
 
78
 

+ 1 - 1
app/models/user.rb

23
   # the associated Person.
23
   # the associated Person.
24
   def email_same_as_person
24
   def email_same_as_person
25
     if self.person and self.email != self.person.email
25
     if self.person and self.email != self.person.email
26
-      errors.add(:email, "must be the same as associated person's email")
26
+      errors.add(:email, I18n.t('authentication.user_person_mail_mismatch'))
27
     end
27
     end
28
   end
28
   end
29
 end
29
 end

+ 2 - 2
app/views/activities/_wide_presence_buttons.haml

5
         %i.fa.fa-check
5
         %i.fa.fa-check
6
       - else
6
       - else
7
         %i.fa.fa-check-circle
7
         %i.fa.fa-check-circle
8
-      = t 'activitites.state.present'
8
+      = t 'activities.state.present'
9
 
9
 
10
   .btn-group
10
   .btn-group
11
     %button.btn.btn-danger.btn-absent.btn-presence{data: {wide: 1, person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "absent"}}
11
     %button.btn.btn-danger.btn-absent.btn-presence{data: {wide: 1, person_id: person.id, activity_id: activity.id, group_id: activity.group.id, new_state: "absent"}}
13
         %i.fa.fa-times-circle
13
         %i.fa.fa-times-circle
14
       - else
14
       - else
15
         %i.fa.fa-times
15
         %i.fa.fa-times
16
-      = t 'activitites.state.absent'
16
+      = t 'activities.state.absent'

+ 3 - 3
app/views/activities/show.html.haml

54
             :notes,
54
             :notes,
55
             url: presence_group_activity_path(@activity.group, @activity, person_id: @ownparticipant.person_id),
55
             url: presence_group_activity_path(@activity.group, @activity, person_id: @ownparticipant.person_id),
56
             title: t('activities.participant.notes'),
56
             title: t('activities.participant.notes'),
57
-            value: "",
57
+            value: @ownparticipant.notes,
58
             emptytext: t('activities.participant.add_notes')
58
             emptytext: t('activities.participant.add_notes')
59
 
59
 
60
 .hidden-xs
60
 .hidden-xs
138
 
138
 
139
           %tr{data: {person_id: p.person_id, activity_id: @activity.id}}
139
           %tr{data: {person_id: p.person_id, activity_id: @activity.id}}
140
             %td{colspan: "2"}
140
             %td{colspan: "2"}
141
-              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activitites.participant.notes'), value: p.notes, emptytext: "--"
141
+              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"
142
 
142
 
143
   .panel.panel-default.panel-danger
143
   .panel.panel-default.panel-danger
144
     .panel-heading
144
     .panel-heading
169
 
169
 
170
           %tr{data: {person_id: p.person_id, activity_id: @activity.id}}
170
           %tr{data: {person_id: p.person_id, activity_id: @activity.id}}
171
             %td{colspan: "2"}
171
             %td{colspan: "2"}
172
-              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activitites.participant.notes'), value: p.notes, emptytext: "--"
172
+              = editable p, :notes, url: presence_group_activity_path(@activity.group, @activity, person_id: p.person_id), title: t('activities.participant.notes'), value: p.notes, emptytext: "--"

+ 8 - 8
app/views/groups/index.html.erb

1
-<h1>Groups</h1>
1
+<h1><%= t('activerecord.models.group.other') %></h1>
2
 
2
 
3
 <table class="table">
3
 <table class="table">
4
   <thead>
4
   <thead>
5
     <tr>
5
     <tr>
6
-      <th>Name</th>
6
+      <th><%= t 'activerecord.attributes.group.name' %></th>
7
-      <th>Members</th>
7
+      <th><%= t 'activerecord.attributes.group.members' %></th>
8
-      <th>Events</th>
8
+      <th><%= t 'activerecord.attributes.group.activities' %></th>
9
-      <th colspan="2">Actions</th>
9
+      <th colspan="2"><%= t :actions %></th>
10
     </tr>
10
     </tr>
11
   </thead>
11
   </thead>
12
 
12
 
16
         <td><%= link_to group.name, group %></td>
16
         <td><%= link_to group.name, group %></td>
17
         <td><%= link_to group.members.count, group_members_path(group) %></td>
17
         <td><%= link_to group.members.count, group_members_path(group) %></td>
18
         <td><%= link_to group.activities.count, group_activities_path(group) %></td>
18
         <td><%= link_to group.activities.count, group_activities_path(group) %></td>
19
-        <td><%= link_to 'Edit', edit_group_path(group) %></td>
19
+        <td><%= link_to t(:edit), edit_group_path(group) %></td>
20
-        <td><%= link_to 'Destroy', group, method: :delete, data: { confirm: 'Are you sure?' } %></td>
20
+        <td><%= link_to t(:destroy), group, method: :delete, data: { confirm: t(:areyousure)} %></td>
21
       </tr>
21
       </tr>
22
     <% end %>
22
     <% end %>
23
   </tbody>
23
   </tbody>
25
 
25
 
26
 <br>
26
 <br>
27
 
27
 
28
-<%= link_to 'New Group', new_group_path %>
28
+<%= link_to t('groups.new'), new_group_path %>

+ 2 - 2
app/views/groups/new.html.erb

1
-<h1>New Group</h1>
1
+<h1><%= t 'groups.new' %></h1>
2
 
2
 
3
 <%= render 'form', group: @group %>
3
 <%= render 'form', group: @group %>
4
 
4
 
5
-<%= link_to 'Back', groups_path %>
5
+<%= link_to t(:back), groups_path %>

+ 10 - 10
app/views/groups/show.html.haml

11
         .list-group
11
         .list-group
12
           = link_to group_members_path(@group), class: 'list-group-item' do
12
           = link_to group_members_path(@group), class: 'list-group-item' do
13
             = @group.members.count
13
             = @group.members.count
14
-            members
14
+            = t 'groups.member.plural'
15
 
15
 
16
           = link_to group_activities_path(@group), class: 'list-group-item' do
16
           = link_to group_activities_path(@group), class: 'list-group-item' do
17
             = @group.activities.count
17
             = @group.activities.count
18
-            activities
18
+            = t 'activities.plural'
19
 
19
 
20
           - if @group.is_leader?(current_person)
20
           - if @group.is_leader?(current_person)
21
             = link_to new_group_activity_path(@group), class: 'list-group-item' do
21
             = link_to new_group_activity_path(@group), class: 'list-group-item' do
22
-              New event
22
+              = t 'activities.new'
23
 
23
 
24
             = link_to edit_group_path(@group), class: 'list-group-item' do
24
             = link_to edit_group_path(@group), class: 'list-group-item' do
25
-              Edit group
25
+              = t 'groups.edit'
26
 
26
 
27
   - if @organized_activities && @organized_activities.count > 0
27
   - if @organized_activities && @organized_activities.count > 0
28
     .col-md-6
28
     .col-md-6
29
       .panel.panel-default
29
       .panel.panel-default
30
         .panel-heading
30
         .panel-heading
31
-          Upcoming activities organized by you
31
+          = t 'activities.upcoming_yours'
32
 
32
 
33
         .panel-body
33
         .panel-body
34
           %table.table
34
           %table.table
35
             %tr
35
             %tr
36
               %th
36
               %th
37
-                What
37
+                = t 'activities.attrs.name'
38
               %th
38
               %th
39
-                When
39
+                = t 'activities.attrs.when'
40
 
40
 
41
             - @organized_activities.each do |p|
41
             - @organized_activities.each do |p|
42
               - a = p.activity
42
               - a = p.activity
44
                 %td
44
                 %td
45
                   = link_to group_activity_path(@group, a) do
45
                   = link_to group_activity_path(@group, a) do
46
                     = a.name
46
                     = a.name
47
-                    = render partial: "activities/state_counts", locals: {counts: a.state_counts}
47
+                    = render partial: 'activities/state_counts', locals: {counts: a.state_counts}
48
                 %td
48
                 %td
49
                   = distance_of_time_in_words_to_now(a.start)
49
                   = distance_of_time_in_words_to_now(a.start)
50
 
50
 
52
   .col-md-12
52
   .col-md-12
53
     .panel.panel-default
53
     .panel.panel-default
54
       .panel-heading
54
       .panel-heading
55
-        Your activities
55
+        = t 'activities.yours'
56
 
56
 
57
       .panel-body
57
       .panel-body
58
         %table.table.table-striped
58
         %table.table.table-striped
67
                   %td
67
                   %td
68
                     = render partial: "activities/presence_buttons", locals: {activity: a, person: current_person, state: p.attending}
68
                     = render partial: "activities/presence_buttons", locals: {activity: a, person: current_person, state: p.attending}
69
                   %td
69
                   %td
70
-                    = editable p, :notes, url: presence_group_activity_path(a.group, a, person_id: current_person.id), title: "Notes", value: p.notes, emptytext: 'Notes'
70
+                    = editable p, :notes, url: presence_group_activity_path(a.group, a, person_id: current_person.id), title: t('activities.participant.notes'), value: p.notes, emptytext: t('activities.participant.notes')
71
               - else
71
               - else
72
                 %tr
72
                 %tr
73
                   %td
73
                   %td

+ 1 - 1
app/views/groups/user_groups.html.haml

1
 .container
1
 .container
2
   %h1
2
   %h1
3
-    My groups
3
+    = t 'groups.yours'
4
 
4
 
5
   %table.table.table-striped
5
   %table.table.table-striped
6
     %tbody
6
     %tbody

+ 1 - 1
app/views/members/_form.html.erb

13
 
13
 
14
   <div class="actions">
14
   <div class="actions">
15
     <%= f.collection_select(:person_id, @possible_members, :id, :full_name, prompt: true) %>
15
     <%= f.collection_select(:person_id, @possible_members, :id, :full_name, prompt: true) %>
16
-    <%= f.check_box :is_leader %> Beheerder
16
+    <%= f.check_box :is_leader %> <%= t 'groups.leader' %>
17
     <%= f.submit %>
17
     <%= f.submit %>
18
   </div>
18
   </div>
19
 <% end %>
19
 <% end %>

+ 3 - 3
app/views/members/edit.html.erb

1
-<h1>Editing Member</h1>
1
+<h1><%= t 'groups.member.edit' %></h1>
2
 
2
 
3
 <%= render 'form', member: @member %>
3
 <%= render 'form', member: @member %>
4
 
4
 
5
-<%= link_to 'Show', group_member_path(@group, @member) %> |
5
+<%= link_to t(:show), group_member_path(@group, @member) %> |
6
-<%= link_to 'Back', group_members_path(@group) %>
6
+<%= link_to t(:back), group_members_path(@group) %>

+ 7 - 7
app/views/members/index.html.erb

3
 <table class="table table-striped">
3
 <table class="table table-striped">
4
   <thead>
4
   <thead>
5
     <tr>
5
     <tr>
6
-      <th>Name</th>
6
+      <th><%= t 'activerecord.attributes.group.name' %></th>
7
       <% if @admin %>
7
       <% if @admin %>
8
-        <th colspan="2">Actions</th>
8
+        <th colspan="2"><%= t :actions %></th>
9
       <% end %>
9
       <% end %>
10
     </tr>
10
     </tr>
11
   </thead>
11
   </thead>
23
         <% if @admin and current_person != member.person %>
23
         <% if @admin and current_person != member.person %>
24
             <% if member.is_leader %>
24
             <% if member.is_leader %>
25
               <td>
25
               <td>
26
-                <%= link_to 'Demote', demote_group_member_path(@group, member), method: :post, data: { confirm: 'Are you sure?' } %>
26
+                <%= link_to t('groups.demote'), demote_group_member_path(@group, member), method: :post, data: { confirm: t(:areyousure)} %>
27
               </td>
27
               </td>
28
             <% else %>
28
             <% else %>
29
               <td>
29
               <td>
30
-                <%= link_to 'Promote', promote_group_member_path(@group, member), method: :post, data: { confirm: 'Are you sure?' } %>
30
+                <%= link_to t('groups.promote'), promote_group_member_path(@group, member), method: :post, data: { confirm: t(:areyousure)} %>
31
               </td>
31
               </td>
32
             <% end %>
32
             <% end %>
33
             <td>
33
             <td>
34
-              <%= link_to 'Remove', group_member_path(@group, member), method: :delete, data: { confirm: 'Are you sure?' } %>
34
+              <%= link_to t(:remove), group_member_path(@group, member), method: :delete, data: { confirm: t(:areyousure)} %>
35
             </td>
35
             </td>
36
           <% else %>
36
           <% else %>
37
             <td></td><td></td>
37
             <td></td><td></td>
43
 
43
 
44
 <br>
44
 <br>
45
 
45
 
46
-<%= link_to 'New Member', new_group_member_path(@group) %> |
46
+<%= link_to t('groups.member.add'), new_group_member_path(@group) %> |
47
-<%= link_to 'Invite Member', group_invite_path(@group) %>
47
+<%= link_to t('groups.member.invite'), group_invite_path(@group) %>

+ 2 - 2
app/views/members/invite.html.haml

1
 %h1
1
 %h1
2
-  Invite new person to Aardbei
2
+  = t 'groups.member.invite'
3
 
3
 
4
 = render 'people/form', person: @person, no_admin: true, destination: 'invite'
4
 = render 'people/form', person: @person, no_admin: true, destination: 'invite'
5
-= link_to 'Back', group_members_path(@group)
5
+= link_to t(:back), group_members_path(@group)

+ 2 - 2
app/views/members/new.html.erb

1
-<h1>Add member to <%= @group.name %></h1>
1
+<h1><%= t('groups.member.adding', name: @group.name) %></h1>
2
 
2
 
3
 <%= render 'form', member: @member %>
3
 <%= render 'form', member: @member %>
4
 
4
 
5
-<%= link_to 'Back', group_members_path(@group) %>
5
+<%= link_to t(:back), group_members_path(@group) %>

+ 3 - 3
app/views/members/show.html.erb

1
-<%= @member.person.full_name %> is lid van <%= @group.name %>.
1
+<%= t 'groups.member.ismember', group: @group.name, member: @member.person.full_name %>
2
-<%= link_to 'Edit', edit_group_member_path(@group, @member) %> |
2
+<%= link_to t(:edit), edit_group_member_path(@group, @member) %> |
3
-<%= link_to 'Back', group_members_path(@group) %>
3
+<%= link_to t(:back), group_members_path(@group) %>

+ 3 - 3
app/views/people/edit.html.erb

1
-<h1>Editing Person</h1>
1
+<h1><%= t 'person.editing' %></h1>
2
 
2
 
3
 <%= render 'form', person: @person %>
3
 <%= render 'form', person: @person %>
4
 
4
 
5
-<%= link_to 'Show', @person %> |
5
+<%= link_to t(:show), @person %> |
6
-<%= link_to 'Back', people_path %>
6
+<%= link_to t(:back), people_path %>

+ 5 - 5
app/views/people/index.html.erb

1
-<h1>People</h1>
1
+<h1><%= t 'activerecord.models.person.other' %></h1>
2
 
2
 
3
 <table class="table">
3
 <table class="table">
4
   <thead>
4
   <thead>
11
     <% @people.each do |person| %>
11
     <% @people.each do |person| %>
12
       <tr>
12
       <tr>
13
         <td><%= person.full_name %></td>
13
         <td><%= person.full_name %></td>
14
-        <td><%= link_to 'Show', person %></td>
14
+        <td><%= link_to t(:show), person %></td>
15
-        <td><%= link_to 'Edit', edit_person_path(person) %></td>
15
+        <td><%= link_to t(:edit), edit_person_path(person) %></td>
16
-        <td><%= link_to 'Destroy', person, method: :delete, data: { confirm: 'Are you sure?' } %></td>
16
+        <td><%= link_to t(:destroy), person, method: :delete, data: { confirm: t(:areyousure)} %></td>
17
       </tr>
17
       </tr>
18
     <% end %>
18
     <% end %>
19
   </tbody>
19
   </tbody>
21
 
21
 
22
 <br>
22
 <br>
23
 
23
 
24
-<%= link_to 'New Person', new_person_path %>
24
+<%= link_to t('person.new'), new_person_path %>

+ 2 - 2
app/views/people/new.html.erb

1
-<h1>New Person</h1>
1
+<h1><%= t 'person.new' %></h1>
2
 
2
 
3
 <%= render 'form', person: @person %>
3
 <%= render 'form', person: @person %>
4
 
4
 
5
-<%= link_to 'Back', people_path %>
5
+<%= link_to t(:back), people_path %>

+ 3 - 3
app/views/people/show.html.erb

1
-<h2><%= @person.reversed_name %></h2>
1
+<h2><%= @person.full_name %></h2>
2
 <ul>
2
 <ul>
3
   <li><%= @person.birth_date %></li>
3
   <li><%= @person.birth_date %></li>
4
   <li><%= @person.email %></li>
4
   <li><%= @person.email %></li>
5
 </ul>
5
 </ul>
6
-<%= link_to 'Edit', edit_person_path(@person) %> |
6
+<%= link_to t(:edit), edit_person_path(@person) %> |
7
-<%= link_to 'Back', people_path %>
7
+<%= link_to t(:back), people_path %>

+ 3 - 3
config/locales/actionview_nl.yml

51
 
51
 
52
     # Default translation keys for submit and button FormHelper
52
     # Default translation keys for submit and button FormHelper
53
     submit:
53
     submit:
54
-      create: '%{model} aanmaken'
54
+      create: "%{model} aanmaken"
55
-      update: '%{model} bijwerken'
55
+      update: "%{model} bijwerken"
56
-      submit: '%{model} opslaan'
56
+      submit: "%{model} opslaan"

+ 31 - 20
config/locales/activities/en.yml

1
 en:
1
 en:
2
   activities:
2
   activities:
3
-    singular: Activity
3
+    singular: "Activity"
4
-    plural: Activities
4
+    plural: "Activities"
5
 
5
 
6
-    new: Nieuwe activiteit
6
+    new: "New activity"
7
+    created: "Activity created."
8
+    updated: "Activity updated."
9
+    destroyed: "Activity destroyed."
10
+
11
+    upcoming_yours: "Upcoming activities organized by you"
12
+    yours: "Your activities"
13
+
14
+    errors:
15
+      must_be_before_start: "must be before start"
16
+      must_be_after_start: "must be after start"
17
+      already_in: "person already participates in activity"
7
 
18
 
8
     participant:
19
     participant:
9
-      singular: participant
20
+      singular: "participant"
10
-      plural: participants
21
+      plural: "participants"
11
-      notes: Notes
22
+      notes: "Notes"
12
-      add_notes: Add notes
23
+      add_notes: "Add notes"
13
-      yourresponse: Your response
24
+      yourresponse: "Your response"
14
 
25
 
15
     state:
26
     state:
16
-      need_response: Need response
27
+      need_response: "Need response"
17
-      present: Present
28
+      present: "Present"
18
-      absent: Absent
29
+      absent: "Absent"
19
-      unknown: Unknown
30
+      unknown: "Unknown"
20
 
31
 
21
     attrs:
32
     attrs:
22
-      name: Name
33
+      name: "Name"
23
-      group: Group
34
+      group: "Group"
24
-      when: When
35
+      when: "When"
25
-      where: Where
36
+      where: "Where"
26
-      actions: Actions
37
+      actions: "Actions"
27
-      organizers: Organizers
38
+      organizers: "Organizers"
28
-      description: Description
39
+      description: "Description"
29
-      deadline: Deadline
40
+      deadline: "Deadline"

+ 31 - 20
config/locales/activities/nl.yml

1
 nl:
1
 nl:
2
   activities:
2
   activities:
3
-    singular: Activiteit
3
+    singular: "Activiteit"
4
-    plural: Activiteiten
4
+    plural: "Activiteiten"
5
 
5
 
6
-    new: New activity
6
+    new: "Nieuwe activiteit"
7
+    created: "Activiteit aangemaakt."
8
+    updated: "Activiteit bijgewerkt."
9
+    destroyed: "Activiteit verwijderd."
10
+
11
+    upcoming_yours: "Aankomende activiteiten georganiseerd door jou"
12
+    yours: "Jouw activiteiten"
13
+
14
+    errors:
15
+      must_be_before_start: "moet voor start zijn"
16
+      must_be_after_start: "moet na start zijn"
17
+      already_in: "persoon doet al mee aan activiteit"
7
 
18
 
8
     participant:
19
     participant:
9
-      singular: deelnemer
20
+      singular: "deelnemer"
10
-      plural: deelnemers
21
+      plural: "deelnemers"
11
-      notes: Opmerkingen
22
+      notes: "Opmerkingen"
12
-      add_notes: Opmerkingen toevoegen
23
+      add_notes: "Opmerkingen toevoegen"
13
-      yourresponse: Jouw antwoord
24
+      yourresponse: "Jouw antwoord"
14
 
25
 
15
     state:
26
     state:
16
-      need_response: Nog geen reactie
27
+      need_response: "Nog geen reactie"
17
-      present: Aanwezig
28
+      present: "Aanwezig"
18
-      absent: Afwezig
29
+      absent: "Afwezig"
19
-      unknown: Onbekend
30
+      unknown: "Onbekend"
20
 
31
 
21
     attrs:
32
     attrs:
22
-      name: Naam
33
+      name: "Naam"
23
-      group: Groep
34
+      group: "Groep"
24
-      when: Wanneer
35
+      when: "Wanneer"
25
-      where: Waar
36
+      where: "Waar"
26
-      actions: Acties
37
+      actions: "Acties"
27
-      organizers: Organisatoren
38
+      organizers: "Organisatoren"
28
-      description: Omschrijving
39
+      description: "Omschrijving"
29
-      deadline: Deadline
40
+      deadline: "Deadline"

+ 31 - 15
config/locales/authentication/en.yml

1
 en:
1
 en:
2
   authentication:
2
   authentication:
3
-    confirm_account: Create password
3
+    confirm_account: "Create password"
4
-    forgot_password: Forgot password
4
+    forgot_password: "Forgot password"
5
-    reset_password: Reset password
5
+    reset_password: "Reset password"
6
-    create_account: Create account
6
+    create_account: "Create account"
7
 
7
 
8
-    please_sign_in: Please sign in
8
+    please_sign_in: "Please sign in"
9
-    remember_me: Remember me
9
+    remember_me: "Remember me"
10
 
10
 
11
-    new_password: New password
11
+    new_password: "New password"
12
-    new_password_confirm: Confirm new password
12
+    new_password_confirm: "Confirm new password"
13
 
13
 
14
-    need_introducer: Creating an account requires that you have been added to a group beforehand by an administrator. Contact someone if your email address is not recognized.
14
+    need_introducer: "Creating an account requires that you have been added to a group beforehand by an administrator. Contact someone if your email address is not recognized."
15
+
16
+    unknown_email: "Unknown email address."
17
+    invalid_token: "Invalid token!"
18
+    expired_token: "Your token has expired, please request another one."
19
+    invalid_user_or_pass: "Invalid username/password combination!"
20
+    login_required: "You need to be logged in to do that."
21
+    admin_required: "You need to be an administrator to do that."
22
+    activation_required: "Your account has not yet been activated, please confirm your account using the email you received."
23
+    already_activated: "Your account has already been activated, please use the 'Forgot password' form if you want to reset your password."
24
+    password_repeat_mismatch: "Password confirmation does not match your password!"
25
+    activation_complete: "Your account has been confirmed, you may now log in."
26
+    password_reset_complete: "Your password has been reset, you may now log in."
27
+    user_person_mail_mismatch: "must be the same as associated person's email"
15
 
28
 
16
     emails:
29
     emails:
17
-      greeting: Hello %{name},
30
+      sent: "An email has been sent, check your inbox!"
18
-      ending: Aardbei
31
+      greeting: "Hello %{name},"
19
-      link_expires: This link will expire %{expires}.
32
+      ending: "Aardbei"
33
+      link_expires: "This link will expire %{expires}."
20
 
34
 
21
       confirm:
35
       confirm:
22
-        click_this: Please confirm your account for Aardbei by clicking on the following link.
36
+        subject: "Confirm your Aardbei-account"
37
+        click_this: "Please confirm your account for Aardbei by clicking on the following link."
23
 
38
 
24
       forgot:
39
       forgot:
25
-        blurb: You (or someone pretending to be you) have requested to reset your password. If this was you, please open the following link.
40
+        subject: "Reset your Aardbei-password"
26
-        ignore_if_not_you: If you did not request this password reset, ignore this message.
41
+        blurb: "You (or someone pretending to be you) have requested to reset your password. If this was you, please open the following link."
42
+        ignore_if_not_you: "If you did not request this password reset, ignore this message."

+ 30 - 15
config/locales/authentication/nl.yml

1
 nl:
1
 nl:
2
   authentication:
2
   authentication:
3
-    confirm_account: Wachtwoord aanmaken
3
+    confirm_account: "Wachtwoord aanmaken"
4
-    forgot_password: Wachtwoord vergeten
4
+    forgot_password: "Wachtwoord vergeten"
5
-    reset_password: Wachtwoord veranderen
5
+    reset_password: "Wachtwoord veranderen"
6
-    create_account: Account aanmaken
6
+    create_account: "Account aanmaken"
7
 
7
 
8
-    please_sign_in: Log eerst in
8
+    please_sign_in: "Log eerst in"
9
-    remember_me: Onthouden
9
+    remember_me: "Onthouden"
10
 
10
 
11
-    new_password: Nieuw wachtwoord
11
+    new_password: "Nieuw wachtwoord"
12
-    new_password_confirm: Herhaal nieuw wachtwoord
12
+    new_password_confirm: "Herhaal nieuw wachtwoord"
13
 
13
 
14
-    need_introducer: Je kan alleen een account aanmaken wanneer je door een beheerder aan een groep bent toegevoegd. Neem contact op met iemand wanneer je emailadres niet wordt herkend.
14
+    need_introducer: "Je kan alleen een account aanmaken wanneer je door een beheerder aan een groep bent toegevoegd. Neem contact op met iemand wanneer je emailadres niet wordt herkend."
15
+
16
+    unknown_email: "Onbekend e-mailadres."
17
+    invalid_token: "Ongeldig token!"
18
+    expired_token: "Je token is verlopen, vraag een nieuwe aan."
19
+    invalid_user_or_pass: "Gebruikersnaam en/of wachtwoord onjuist."
20
+    login_required: "Je moet eerst inloggen."
21
+    admin_required: "Je moet een beheerder zijn om dat te doen."
22
+    activation_required: "Je account is nog niet geactiveerd! Bevestig je e-mailadres door op de link te klikken die je in je mail hebt gehad."
23
+    already_activated: "Je account is al geactiveerd! Gebruik het 'Wachtwoord vergeten'-formulier als je je wachtwoord opnieuw in wilt stellen."
24
+    password_repeat_mismatch: "Je hebt niet twee keer hetzelfde wachtwoord ingevuld!"
25
+    activation_complete: "Je account is geactiveerd, je kunt nu inloggen."
26
+    password_reset_complete: "Je wachtwoord is opnieuw ingesteld, je kunt nu inloggen."
27
+    user_person_mail_mismatch: "moet hetzelfde zijn als het emailadres van de verbonden persoon"
15
 
28
 
16
     emails:
29
     emails:
17
-      greeting: Hoi %{name},
30
+      sent: "Mail verstuurd!"
18
-      ending: Aardbei
31
+      greeting: "Hoi %{name},"
19
-      link_expires: Deze link is bruikbaar tot %{expires}.
32
+      ending: "Aardbei"
33
+      link_expires: "Deze link is bruikbaar tot %{expires}."
20
 
34
 
21
       confirm:
35
       confirm:
22
-        click_this: Bevestig je account voor Aardbei door te klikken op de volgende link.
36
+        subject: "Bevestig je Aardbei-account"
37
+        click_this: "Bevestig je account voor Aardbei door te klikken op de volgende link."
23
 
38
 
24
       forgot:
39
       forgot:
25
-        blurb: Jij (of iemand die doet alsof hij jou is) heeft een wachtwoordwijziging aangevraagd. Open de volgende link als je dit wilt.
40
+        blurb: "Jij (of iemand die doet alsof hij jou is) heeft een wachtwoordwijziging aangevraagd. Open de volgende link als je dit wilt:"
26
-        ignore_if_not_you: Als jij dit niet hebt aangevraagd kan je dit bericht negeren, en is je oude wachtwoord onveranderd.
41
+        ignore_if_not_you: "Als jij dit niet hebt aangevraagd kan je dit bericht negeren, en is je oude wachtwoord onveranderd."

+ 2 - 2
config/locales/dashboard/en.yml

1
 en:
1
 en:
2
   dashboard:
2
   dashboard:
3
-    participant_you: Your activities
3
+    participant_you: "Your activities"
4
-    organized_you: Organized by you
4
+    organized_you: "Organized by you"

+ 2 - 2
config/locales/dashboard/nl.yml

1
 nl:
1
 nl:
2
   dashboard:
2
   dashboard:
3
-    participant_you: Jouw activiteiten
3
+    participant_you: "Jouw activiteiten"
4
-    organized_you: Georganiseerd door jou
4
+    organized_you: "Georganiseerd door jou"

+ 55 - 10
config/locales/en.yml

21
 
21
 
22
 en:
22
 en:
23
   hello: "Hello world"
23
   hello: "Hello world"
24
+  greeting: "Hoi %{name}!"
24
 
25
 
25
-  collapse: Collapse
26
+  collapse: "Collapse"
26
 
27
 
27
-  log_out: Log out
28
+  log_out: "Log out"
28
-  log_in: Log in
29
+  log_in: "Log in"
29
 
30
 
30
-  cancel: Cancel
31
+  actions: "Acties"
31
-  back: Back
32
+  cancel: "Cancel"
32
-  show: Show
33
+  back: "Back"
33
-  edit: Edit
34
+  show: "Show"
34
-  destroy: Delete
35
+  edit: "Edit"
35
-  send_email: Send email
36
+  destroy: "Delete"
37
+  remove: "Remove"
38
+  send_email: "Send email"
36
 
39
 
37
-  areyousure: Are you sure?
40
+  areyousure: "Are you sure?"
41
+
42
+  value_required: "A required value was omitted."
43
+
44
+  invalid_csrf: "You submitted an invalid request! If you got here after clicking a link, it's possible that someone is doing something nasty!"
45
+
46
+  activerecord:
47
+    models:
48
+      person:
49
+        one: "Person"
50
+        other: "Persons"
51
+
52
+      group:
53
+        one: "Group"
54
+        other: "Groups"
55
+
56
+      activity:
57
+        one: "Activity"
58
+        other: "Activities"
59
+
60
+      member:
61
+        one: "Member"
62
+        other: "Members"
63
+
64
+    attributes:
65
+      person:
66
+        first_name: "First name"
67
+        infix: "Infix"
68
+        last_name: "Last name"
69
+        email: "Email address"
70
+        birth_date: "Date of birth"
71
+
72
+      group:
73
+        name: "Name"
74
+        members: "Members"
75
+        activities: "Activities"
76
+
77
+      activity:
78
+        name: "Name"
79
+        start: "Start"
80
+        end: "End"
81
+        description: "Description"
82
+        deadline: "Deadline"

+ 34 - 4
config/locales/groups/en.yml

1
 en:
1
 en:
2
   groups:
2
   groups:
3
-    singular: Group
3
+    singular: "Group"
4
-    plural: Groups
4
+    plural: "Groups"
5
-    all: All Groups
5
+    all: "All Groups"
6
+    yours: "Your groups"
7
+
8
+    new: "New group"
9
+    edit: "Edit group"
10
+    created: "Group created."
11
+    updated: "Group updated."
12
+    destroyed: "Group destroyed."
13
+
14
+    leader: "Group leader"
15
+    leader_added: "%{name} is now a group leader."
16
+    leader_removed: "%{name} is no longer a group leader."
17
+
18
+    demote: "Demote"
19
+    promote: "Promote"
20
+
21
+    member_added: "%{name} was added to the group."
22
+    member_updated: "Member updated."
23
+    member_removed: "%{name} was removed from the group."
24
+
25
+    member:
26
+      add: "New Member"
27
+      adding: "Add member to %{name}"
28
+      invite: "Invite a new person to Aardbei"
29
+      already_in: "is already a member of this group"
30
+      ismember: "%{person} is a member of %{group}."
31
+      plural: "members"
32
+      edit: "Edit Member"
33
+
34
+    membership_required: "You need to be a member of that group to do that."
35
+    leadership_required: "You need to be a group leader to do that."
6
 
36
 
7
     attrs:
37
     attrs:
8
-      name: Name
38
+      name: "Name"

+ 34 - 4
config/locales/groups/nl.yml

1
 nl:
1
 nl:
2
   groups:
2
   groups:
3
-    singular: Groep
3
+    singular: "Groep"
4
-    plural: Groepen
4
+    plural: "Groepen"
5
-    all: Alle Groepen
5
+    all: "Alle Groepen"
6
+    yours: "Jouw groepen"
7
+
8
+    new: "Nieuwe groep"
9
+    edit: "Groep bewerken"
10
+    created: "Groep aangemaakt."
11
+    updated: "Groep bijgewerkt."
12
+    destroyed: "Groep verwijderd."
13
+
14
+    leader: "Groepsleider"
15
+    leader_added: "%{name} is nu een groepsleider."
16
+    leader_removed: "%{name} is nu geen groepsleider meer."
17
+
18
+    demote: "Maak normaal"
19
+    promote: "Maak leider"
20
+
21
+    member_added: "%{name} is toegevoegd aan de groep."
22
+    member_updated: "Lid bijgewerkt."
23
+    member_removed: "%{name} is verwijderd uit de groep."
24
+
25
+    member:
26
+      add: "Lid toevoegen"
27
+      adding: "Lid toevoegen aan %{name}"
28
+      invite: "Nieuw persoon aan Aardbei toevoegen"
29
+      already_in: "zit al in deze groep"
30
+      ismember: "%{person} is lid van %{group}."
31
+      plural: "leden"
32
+      edit: "Lid bewerken"
33
+
34
+    membership_required: "Je moet een lid zijn van die groep om dat te doen."
35
+    leadership_required: "Je moet een groepsleider zijn om dat te doen."
6
 
36
 
7
     attrs:
37
     attrs:
8
-      name: Naam
38
+      name: "Naam"

+ 54 - 9
config/locales/nl.yml

1
 nl:
1
 nl:
2
   hello: "Hallo wereld"
2
   hello: "Hallo wereld"
3
+  greeting: "Hoi %{name}!"
3
 
4
 
4
   collapse: "Inklappen"
5
   collapse: "Inklappen"
5
 
6
 
6
-  log_out: Uitloggen
7
+  log_out: "Uitloggen"
7
-  log_in: Inloggen
8
+  log_in: "Inloggen"
8
 
9
 
9
-  cancel: Annuleren
10
+  actions: "Acties"
10
-  back: Terug
11
+  cancel: "Annuleren"
11
-  show: Weergeven
12
+  back: "Terug"
12
-  edit: Bewerken
13
+  show: "Weergeven"
13
-  destroy: Verwijderen
14
+  edit: "Bewerken"
14
-  send_email: Email versturen
15
+  destroy: "Verwijderen"
16
+  remove: "Verwijderen"
17
+  send_email: "Email versturen"
15
 
18
 
16
-  areyousure: Weet je het zeker?
19
+  areyousure: "Weet je het zeker?"
20
+
21
+  value_required: "Een verplichte vraag was leeg."
22
+
23
+  invalid_csrf: "Ongeldig authenticiteitstoken! Als je hier terecht bent gekomen na het klikken op een link is het mogelijk dat iemand iets naars probeerde!"
24
+
25
+  activerecord:
26
+    models:
27
+      person:
28
+        one: "Persoon"
29
+        other: "Personen"
30
+
31
+      group:
32
+        one: "Groep"
33
+        other: "Groepen"
34
+
35
+      activity:
36
+        one: "Activiteit"
37
+        other: "Activiteiten"
38
+
39
+      member:
40
+        one: "Lid"
41
+        other: "Leden"
42
+
43
+    attributes:
44
+      person:
45
+        first_name: "Voornaam"
46
+        infix: "Tussenvoegsel"
47
+        last_name: "Achternaam"
48
+        email: "Emailadres"
49
+        birth_date: "Geboortedatum"
50
+
51
+      group:
52
+        name: "Naam"
53
+        members: "Leden"
54
+        activities: "Activiteiten"
55
+
56
+      activity:
57
+        name: "Naam"
58
+        start: "Start"
59
+        end: "Eind"
60
+        description: "Beschrijving"
61
+        deadline: "Deadline"

+ 14 - 5
config/locales/person/en.yml

1
 en:
1
 en:
2
   person:
2
   person:
3
-    singular: Person
3
+    singular: "Person"
4
-    plural: People
4
+    plural: "People"
5
-    all: All persons
5
+    all: "All persons"
6
+
7
+    new: "New Person"
8
+    editing: "Editing Person"
9
+    created: "Person created."
10
+    updated: "Person updated."
11
+    destroyed: "Person destroyed."
12
+
13
+    errors:
14
+      cannot_future: "can't be in the future"
6
 
15
 
7
     attrs:
16
     attrs:
8
-      email: Email address
17
+      email: "Email address"
9
-      password: Password
18
+      password: "Password"

+ 13 - 5
config/locales/person/nl.yml

1
 nl:
1
 nl:
2
   person:
2
   person:
3
-    singular: Persoon
3
+    singular: "Persoon"
4
-    plural: Personen
4
+    plural: "Personen"
5
-    all: Alle personen
5
+    all: "Alle personen"
6
 
6
 
7
+    new: "Nieuwe Persoon"
8
+    editing: "Persoon bewerken"
9
+    created: "Persoon aangemaakt."
10
+    updated: "Persoon bijgewerkt."
11
+    destroyed: "Persoon verwijderd."
12
+
13
+    errors:
14
+      cannot_future: "kan niet in de toekomst zijn"
7
     attrs:
15
     attrs:
8
-      email: Emailadres
16
+      email: "Emailadres"
9
-      password: Wachtwoord
17
+      password: "Wachtwoord"