Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

changed to form generator, namespaced locales, changes locale scopes

  • Loading branch information...
commit 0f05993f5fd04356bba24acb7108e259fb3c17ec 1 parent f4b3a8a
Garrett Heinlen authored November 22, 2011 parndt committed November 23, 2011
10  core/lib/generators/refinery/form/templates/app/views/admin/plural_name/_submenu.html.erb
@@ -9,22 +9,22 @@
9 9
       </li>
10 10
     <%% end %>
11 11
     <li <%%= "class='selected'" if params[:action] == "index" %>>
12  
-      <%%= link_to t('.inbox'), admin_<%= plural_name %>_url, :class => "email_icon" %>
  12
+      <%%= link_to t('.inbox', :scope => 'refinery'), admin_<%= plural_name %>_url, :class => "email_icon" %>
13 13
     </li><% if @includes_spam %>
14 14
     <li <%%= "class='selected'" if params[:action] == "spam" %>>
15 15
       <%% if @spam_count.any?  %>
16  
-        <%%= link_to "#{t('.spam')} (#{@spam_count})", spam_admin_<%= plural_name %>_url, :class => "spam_icon" %>
  16
+        <%%= link_to "#{t('.spam'), :scope=> 'refinery'} (#{@spam_count})", spam_admin_<%= plural_name %>_url, :class => "spam_icon" %>
17 17
       <%% else %>
18  
-        <%%= link_to t('.spam'), spam_admin_<%= plural_name %>_url, :class => "spam_empty_icon" %>
  18
+        <%%= link_to t('.spam', :scope => 'refinery'), spam_admin_<%= plural_name %>_url, :class => "spam_empty_icon" %>
19 19
       <%% end %>
20 20
     </li><% end %>
21 21
     <li>
22  
-      <%%= link_to t('.update_notified'),
  22
+      <%%= link_to t('.update_notified', :scope => 'refinery'),
23 23
                     edit_admin_<%= singular_name %>_setting_url(:<%= singular_name %>_notification_recipients, :dialog => true, :height => 300),
24 24
                     :class => "user_comment_icon" %>
25 25
     </li>
26 26
     <li>
27  
-      <%%= link_to t('.edit_confirmation_email'),
  27
+      <%%= link_to t('.edit_confirmation_email', :scope => 'refinery'),
28 28
                   edit_admin_<%= singular_name %>_setting_url(:<%= singular_name %>_confirmation_body, :dialog => true),
29 29
                   :class => "edit_email_icon" %>
30 30
     </li>
8  core/lib/generators/refinery/form/templates/app/views/plural_name/new.html.erb
... ...
@@ -1,9 +1,9 @@
1 1
 <%% content_for :body_content_left do %>
2 2
   <div class='<%= plural_name %>'>
3  
-    <%%=raw @page[Page.default_parts.first.to_sym] %>
  3
+    <%%=raw @page.content_for(Page.default_parts.first.to_sym) %>
4 4
 
5 5
     <%%= form_for @<%= singular_name %> do |f| %>
6  
-      <%%= render :partial => "/shared/admin/error_messages",
  6
+      <%%= render :partial => "/refinery/admin/error_messages",
7 7
                  :locals => {
8 8
                    :object => @<%= singular_name %>,
9 9
                    :include_object_name => true
@@ -30,9 +30,9 @@
30 30
       </div>
31 31
       <% end %>
32 32
       <div class='actions'>
33  
-        <%%= f.submit t('.send') %>
  33
+        <%%= f.submit t('.send', :scope => 'refinery') %>
34 34
       </div>
35 35
     <%% end %>
36 36
   </div>
37 37
 <%% end %>
38  
-<%%= render :partial => "/shared/content_page" %>
  38
+<%%= render :partial => "/refinery/content_page" %>
151  core/lib/generators/refinery/form/templates/config/locales/en.yml
@@ -4,78 +4,79 @@ en:
4 4
     formats:
5 5
       short: "%A, %d %B %Y"
6 6
 <% end -%>
7  
-  plugins:
8  
-    <%= class_name.pluralize.underscore.downcase %>:
9  
-      title: <%= plural_name.titleize %>
10  
-      description: Provides a contact form and stores <%= plural_name.humanize.downcase %>
11  
-  <%= plural_name %>:
12  
-    new:
13  
-      send: Send message
14  
-      privacy_policy: We value your privacy
15  
-  admin:
16  
-    <%= plural_name %>:
17  
-      delete: Remove this <%= singular_name.humanize.downcase %> forever
18  
-      <%= singular_name %>:
19  
-        read_<%= singular_name %>: Read the <%= singular_name.humanize.downcase %>
20  
-        said: said
21  
-        mark_as_spam: Mark as spam
22  
-        mark_as_ham: Move to inbox
23  
-      submenu:
24  
-        inbox: Inbox
25  
-        spam: Spam
26  
-        update_notified: Update who gets notified
27  
-        edit_confirmation_email: Edit confirmation email
28  
-      index:
29  
-        no_<%= plural_name %>: You have not received any <%= plural_name.humanize.downcase %> yet.
30  
-      spam:
31  
-        no_spam: Hooray! You don't have any spam.
32  
-      show:
33  
-        details: Details
34  
-        age: Age
35  
-        actions: Actions
36  
-        back_to_all_<%= plural_name %>: Back to all <%= plural_name.humanize.downcase %>
37  
-        spam: Spam
38  
-        spam_yes: 'yes'
39  
-        <%= singular_name %>: <%= class_name.underscore.titleize %>
40  
-        to: To
41  
-        from: From
42  
-        click_to_email: Click to email this address
43  
-        phone: Phone
44  
-        date: Date
45  
-        message: Message
46  
-    <%= singular_name %>_settings:
47  
-      notification_recipients_form:
48  
-        <%= singular_name %>_settings_value_name: Send notifications to
49  
-        explanation: Every time someone contacts you on your website, Refinery sends out an email to say there is a new <%= singular_name.humanize.downcase %>.
50  
-        hint: When a new <%= singular_name.humanize.downcase %> is submitted, Refinery will send an email notification to you.
51  
-        example: "Enter your email address(es) like: jack@work.com, jill@office.com"
52  
-      confirmation_email_form:
53  
-        to: To
54  
-        from: From
55  
-        subject: Subject
56  
-        click_to_edit_subject: Click here to edit the subject
57  
-        explanation: Every time someone contacts you on your website, Refinery sends out an email to confirm the <%= singular_name.humanize.downcase %> with the person who made it.
58  
-        below_edit_email_sent: Below you can edit the email that is sent out.
59  
-        the_customer_making_<%= singular_name %>: The customer making the <%= singular_name.humanize.downcase %>
60  
-        message: Message
61  
-        note: "Note: place the text %name% where you'd like the customer's name to appear in the email"
62  
-  <%= singular_name %>_mailer:
63  
-    notification:
64  
-      greeting: Hi there
65  
-      you_recieved_new_<%= singular_name %>: You just received a new <%= singular_name.humanize.downcase %> on your website.
66  
-      <%= singular_name %>_starts: --- <%= singular_name.humanize.downcase %> starts ---
67  
-      <%= singular_name %>_ends: --- <%= singular_name.humanize.downcase %> ends ---
68  
-      from: From
69  
-      email: Email
70  
-      phone: Phone
71  
-      message: Message
72  
-      closing_line: Kind Regards
73  
-      ps_html: P.S. All your <%= plural_name.humanize.downcase %> are stored in the "<%= plural_name.titleize %>" section of Refinery should you ever want to view it later there.
74  
-  activerecord:
75  
-    models:
76  
-      <%= singular_name %>: <%= class_name.underscore.titleize %>
77  
-    attributes:
78  
-      <%= singular_name %>:
79  
-<% attributes.each do |a| -%>
80  
-        <%= a.name %>: <%= a.name.humanize %>
81  
-<% end -%>
  7
+  refinery:
  8
+      plugins:
  9
+        <%= class_name.pluralize.underscore.downcase %>:
  10
+          title: <%= plural_name.titleize %>
  11
+          description: Provides a contact form and stores <%= plural_name.humanize.downcase %>
  12
+      <%= plural_name %>:
  13
+        new:
  14
+          send: Send message
  15
+          privacy_policy: We value your privacy
  16
+      admin:
  17
+        <%= plural_name %>:
  18
+          delete: Remove this <%= singular_name.humanize.downcase %> forever
  19
+          <%= singular_name %>:
  20
+            read_<%= singular_name %>: Read the <%= singular_name.humanize.downcase %>
  21
+            said: said
  22
+            mark_as_spam: Mark as spam
  23
+            mark_as_ham: Move to inbox
  24
+          submenu:
  25
+            inbox: Inbox
  26
+            spam: Spam
  27
+            update_notified: Update who gets notified
  28
+            edit_confirmation_email: Edit confirmation email
  29
+          index:
  30
+            no_<%= plural_name %>: You have not received any <%= plural_name.humanize.downcase %> yet.
  31
+          spam:
  32
+            no_spam: Hooray! You don't have any spam.
  33
+          show:
  34
+            details: Details
  35
+            age: Age
  36
+            actions: Actions
  37
+            back_to_all_<%= plural_name %>: Back to all <%= plural_name.humanize.downcase %>
  38
+            spam: Spam
  39
+            spam_yes: 'yes'
  40
+            <%= singular_name %>: <%= class_name.underscore.titleize %>
  41
+            to: To
  42
+            from: From
  43
+            click_to_email: Click to email this address
  44
+            phone: Phone
  45
+            date: Date
  46
+            message: Message
  47
+        <%= singular_name %>_settings:
  48
+          notification_recipients_form:
  49
+            <%= singular_name %>_settings_value_name: Send notifications to
  50
+            explanation: Every time someone contacts you on your website, Refinery sends out an email to say there is a new <%= singular_name.humanize.downcase %>.
  51
+            hint: When a new <%= singular_name.humanize.downcase %> is submitted, Refinery will send an email notification to you.
  52
+            example: "Enter your email address(es) like: jack@work.com, jill@office.com"
  53
+          confirmation_email_form:
  54
+            to: To
  55
+            from: From
  56
+            subject: Subject
  57
+            click_to_edit_subject: Click here to edit the subject
  58
+            explanation: Every time someone contacts you on your website, Refinery sends out an email to confirm the <%= singular_name.humanize.downcase %> with the person who made it.
  59
+            below_edit_email_sent: Below you can edit the email that is sent out.
  60
+            the_customer_making_<%= singular_name %>: The customer making the <%= singular_name.humanize.downcase %>
  61
+            message: Message
  62
+            note: "Note: place the text %name% where you'd like the customer's name to appear in the email"
  63
+      <%= singular_name %>_mailer:
  64
+        notification:
  65
+          greeting: Hi there
  66
+          you_recieved_new_<%= singular_name %>: You just received a new <%= singular_name.humanize.downcase %> on your website.
  67
+          <%= singular_name %>_starts: --- <%= singular_name.humanize.downcase %> starts ---
  68
+          <%= singular_name %>_ends: --- <%= singular_name.humanize.downcase %> ends ---
  69
+          from: From
  70
+          email: Email
  71
+          phone: Phone
  72
+          message: Message
  73
+          closing_line: Kind Regards
  74
+          ps_html: P.S. All your <%= plural_name.humanize.downcase %> are stored in the "<%= plural_name.titleize %>" section of Refinery should you ever want to view it later there.
  75
+      activerecord:
  76
+        models:
  77
+          <%= singular_name %>: <%= class_name.underscore.titleize %>
  78
+        attributes:
  79
+          <%= singular_name %>:
  80
+    <% attributes.each do |a| -%>
  81
+            <%= a.name %>: <%= a.name.humanize %>
  82
+    <% end -%>

0 notes on commit 0f05993

Please sign in to comment.
Something went wrong with that request. Please try again.