Maarten van den Berg 7 anni fa
parent
commit
54606b0a40

+ 13 - 13
app/views/dashboard/home.html.haml

@@ -4,29 +4,29 @@
4 4
       .col-md-12
5 5
         .panel.panel-default
6 6
           .panel-heading
7
-            Need response
7
+            = t 'activities.state.need_response'
8 8
 
9 9
           .panel-body
10 10
             %table.table.table-bordered
11 11
               %thead
12 12
                 %tr
13 13
                   %th
14
-                    Name
14
+                    = t 'activities.attrs.name'
15 15
                   %th
16
-                    Group
16
+                    = t 'activities.attrs.group'
17 17
                   %th
18
-                    When
18
+                    = t 'activities.attrs.when'
19 19
                   %th
20
-                    Where
20
+                    = t 'activities.attrs.where'
21 21
                   %th
22
-                    Actions
22
+                    = t 'activities.attrs.actions'
23 23
 
24 24
               %tbody
25 25
                 - @need_response.each do |p|
26 26
                   - e = p.activity
27 27
                   %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
28 28
                     %td
29
-                      = e.public_name
29
+                      = e.name
30 30
                     %td
31 31
                       = e.group.name
32 32
                     %td
@@ -39,7 +39,7 @@
39 39
     .col-md-6
40 40
       .panel.panel-default
41 41
         .panel-heading
42
-          Groups
42
+          = t 'groups.singular'
43 43
 
44 44
         .panel-body
45 45
           %table.table.table-bordered
@@ -53,7 +53,7 @@
53 53
     .col-md-6
54 54
       .panel.panel-default
55 55
         .panel-heading
56
-          Organized by you
56
+          = t 'dashboard.organized_you'
57 57
 
58 58
         .panel-body
59 59
           %table.table.table-striped.table-bordered
@@ -63,14 +63,14 @@
63 63
                 %tr
64 64
                   %td
65 65
                     = link_to group_activity_url(a.group, a) do
66
-                      = a.public_name
66
+                      = a.name
67 67
                       = render partial: "activities/state_counts", locals: {counts: a.state_counts}
68 68
 
69 69
   .row
70 70
     .col-md-12
71 71
       .panel.panel-default
72 72
         .panel-heading
73
-          Your activities
73
+          = t 'dashboard.participant_you'
74 74
 
75 75
         .panel-body
76 76
           %table.table.table-striped
@@ -79,8 +79,8 @@
79 79
                 - e = p.activity
80 80
                 %tr{class: p.row_class, data: {activity_id: e.id, person_id: current_person.id}}
81 81
                   %td
82
-                    = e.public_name
82
+                    = e.name
83 83
                   %td
84 84
                     = render partial: "activities/presence_buttons", locals: {activity: e, person: current_person, state: p.attending}
85 85
                   %td
86
-                    = editable p, :notes, url: presence_group_activity_path(e.group, e, person_id: current_person.id), title: "Notes", value: p.notes, emptytext: 'Notes'
86
+                    = editable p, :notes, url: presence_group_activity_path(e.group, e, person_id: current_person.id), title: t('activities.participant.notes'), value: p.notes, emptytext: t('activities.participant.add_notes')

+ 5 - 5
app/views/shared/_menu.html.haml

@@ -3,7 +3,7 @@
3 3
     .navbar-header
4 4
       %button.navbar-toggle.collapsed{type: 'button', data: {toggle: 'collapse', target: '#navbar'}, 'aria-expanded': false, 'aria-controls': 'navbar'}
5 5
         .sr-only
6
-          inklappen enzo
6
+          = t 'collapse'
7 7
         .icon-bar
8 8
         .icon-bar
9 9
         .icon-bar
@@ -20,18 +20,18 @@
20 20
         %li
21 21
           = link_to user_groups_path do
22 22
             %i.fa.fa-users{'aria-hidden': true}
23
-            Groups
23
+            = t 'groups.plural'
24 24
 
25 25
         - if current_person.is_admin?
26 26
           %li
27 27
             = link_to people_path do
28 28
               %i.fa.fa-user{'aria-hidden': true}
29
-              People
29
+              = t 'person.plural'
30 30
 
31 31
           %li
32 32
             = link_to groups_path do
33 33
               %i.fa.fa-users{'aria-hidden': true}
34
-              All groups
34
+              = t 'groups.all'
35 35
 
36 36
       %ul.nav.navbar-nav.navbar-right
37 37
         %li
@@ -40,4 +40,4 @@
40 40
         %li
41 41
           = link_to logout_path, confirm: "Really log out?", method: :delete do
42 42
             %i.fa.fa-sign-out{'aria-hidden': true}
43
-            Log out
43
+            = t 'log_out'

+ 3 - 0
config/application.rb

@@ -14,5 +14,8 @@ module Aardbei
14 14
     default_url_options[:host] = ENV['AARDBEI_HOSTNAME']
15 15
 
16 16
     config.time_zone = 'Amsterdam'
17
+
18
+    config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
19
+    config.i18n.default_locale = :nl
17 20
   end
18 21
 end

+ 21 - 0
config/locales/activities/en.yml

@@ -0,0 +1,21 @@
1
+en:
2
+  activities:
3
+    singular: Activity
4
+    plural: Activities
5
+
6
+    participant:
7
+      notes: Notes
8
+      add_notes: Add notes
9
+
10
+    state:
11
+      need_response: Need response
12
+      present: Present
13
+      absent: Absent
14
+      unknown: Unknown
15
+
16
+    attrs:
17
+      name: Name
18
+      group: Group
19
+      when: When
20
+      where: Where
21
+      actions: Actions

+ 21 - 0
config/locales/activities/nl.yml

@@ -0,0 +1,21 @@
1
+nl:
2
+  activities:
3
+    singular: Activiteit
4
+    plural: Activiteiten
5
+
6
+    participant:
7
+      notes: Opmerkingen
8
+      add_notes: Opmerkingen toevoegen
9
+
10
+    state:
11
+      need_response: Niet gereageerd
12
+      present: Aanwezig
13
+      absent: Afwezig
14
+      unknown: Onbekend
15
+
16
+    attrs:
17
+      name: Naam
18
+      group: Groep
19
+      when: Wanneer
20
+      where: Waar
21
+      actions: Acties

+ 4 - 0
config/locales/dashboard/en.yml

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

+ 4 - 0
config/locales/dashboard/nl.yml

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

+ 5 - 0
config/locales/en.yml

@@ -21,3 +21,8 @@
21 21
 
22 22
 en:
23 23
   hello: "Hello world"
24
+
25
+  collapse: Collapse
26
+
27
+  log_out: Log out
28
+  log_in: Log in

+ 8 - 0
config/locales/groups/en.yml

@@ -0,0 +1,8 @@
1
+en:
2
+  groups:
3
+    singular: Group
4
+    plural: Groups
5
+    all: All Groups
6
+
7
+    attrs:
8
+      name: Name

+ 8 - 0
config/locales/groups/nl.yml

@@ -0,0 +1,8 @@
1
+nl:
2
+  groups:
3
+    singular: Groep
4
+    plural: Groepen
5
+    all: Alle Groepen
6
+
7
+    attrs:
8
+      name: Naam

+ 6 - 0
config/locales/nl.yml

@@ -0,0 +1,6 @@
1
+nl:
2
+  hello: "Hallo wereld"
3
+  collapse: "Inklappen"
4
+
5
+  log_out: Uitloggen
6
+  log_in: Inloggen

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

@@ -0,0 +1,5 @@
1
+en:
2
+  person:
3
+    singular: Person
4
+    plural: People
5
+    all: All persons

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

@@ -0,0 +1,5 @@
1
+nl:
2
+  person:
3
+    singular: Persoon
4
+    plural: Personen
5
+    all: Alle personen