-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 4099 add a preference for the preferred locale for a user. #1866
Changes from 30 commits
c6668cc
756b9c7
89d8037
da94fdf
34fe64d
4367bd5
8be49cf
fdecc60
29347a2
1c09f7e
753b43f
ad92811
fb64249
b68ac08
9277259
26bbffd
f7ebf13
d1453a3
6ffc135
d04cac4
c21c43b
3e6d0f0
6e8c6db
2c6788f
9c26565
4056207
07080f2
81d76a7
066f36d
ccfd466
f6cecc3
e5754af
9e4509c
d45b418
cbc201e
f72f979
a38edb4
4f9b118
826804a
8e6c0c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<%= form_for(@locale, html: { class: 'post' }) do |f| %> | ||
<p class="required notice">* <%= t('.required_notice', :default => "Required information") %></p> | ||
|
||
<fieldset> | ||
<legend><%= t('.locale_legend', :default => "Locale") %></legend> | ||
<h3 class="landmark heading"><%= t('.locale_heading', :default => "Locale") %></h3> | ||
<dl> | ||
<dt class="required"><%= f.label :name, t('.name', :default => "Name") + '*' %></dt> | ||
<dd class="required"><%= f.text_field :name %></dd> | ||
|
||
<dt class="required"><%= f.label :iso, t('.iso', :default => "ISO code") + '*' %></dt> | ||
<dd class="required"><%= f.text_field :iso %></dd> | ||
|
||
<dt class="required"><%= f.label :language_id, t('.language', :default => "Language") + '*' %></dt> | ||
<dd class="required"><%= f.select(:language_id, @languages.collect { |language| [ language.name, language.id ] }) %></dd> | ||
|
||
<dt><%= f.check_box :email_enabled %></dt> | ||
<dd><%= f.label :email_enabled, t('.enable_email', :default => "Use this locale to send email") %></dd> | ||
|
||
<dt><%= f.check_box :interface_enabled %></dt> | ||
<dd><%= f.label :interface_enabled, t('.enable_interface', :default => "Use this locale for the interface") %></dd> | ||
|
||
</dl> | ||
</fieldset> | ||
<fieldset> | ||
<legend><%= t('.actions_legend', :default => "Actions") %></legend> | ||
<h3 class="landmark heading"><%= t('.actions_heading', :default => "Actions") %></h3> | ||
<p class="submit actions"> | ||
<%= f.submit @locale.new_record? ? t('.create_button', :default => "Create Locale") : t('.edit_button', :default => "Update Locale") %> | ||
</p> | ||
</fieldset> | ||
<% end %> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ul class="navigation actions" role="navigation"> | ||
<li><%= span_if_current t('.link_to_index', :default => 'Locales'), locales_path %></li> | ||
<li><%= span_if_current t('.link_to_new', :default => 'New Locale'), new_locale_path %></li> | ||
</ul> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,13 @@ | ||
<!--Descriptive page name, messages and instructions--> | ||
<h2 class="heading"><%= t('.edit_locale', :default => 'Edit a locale:') %></h2> | ||
<h2 class="heading"><%= t('.edit_locale', :default => 'Edit Locale') %></h2> | ||
<%= error_messages_for :locale %> | ||
<!--/descriptions--> | ||
|
||
<!--subnav--> | ||
<%= render 'navigation' %> | ||
<!--/subnav--> | ||
|
||
<!--main content--> | ||
<%= form_for(@locale) do |f| %> | ||
<dl> | ||
<dt><%= f.label :language_id, t('.language', :default => "Language:") %></dt> | ||
<dd><%= f.select(:language_id, @languages.collect {|l| [ l.name, l.id ] }) %></dd> | ||
<dt><%= f.label :name, t('.name', :default => "Name:") %></dt> | ||
<dd><%= f.text_field :name %></dd> | ||
<dt><%= f.label :iso, t('.iso', :default => "Iso:") %></dt> | ||
<dd><%= f.text_field :iso %></dd> | ||
</dl> | ||
<p class="submit actions"><%= f.submit t('.forms.submit', :default => "Submit") %></p> | ||
<% end %> | ||
<%= render 'locale_form' %> | ||
<!--/content--> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
<!--Descriptive page name, messages and instructions--> | ||
<h2 class="heading"><%= t('.add_new_locale', :default => 'Add a new locale:') %></h2> | ||
<h2 class="heading"><%= t('.add_new_locale', :default => 'New Locale') %></h2> | ||
<%= error_messages_for :locale %> | ||
<!--/descriptions--> | ||
|
||
<!--subnav--> | ||
<%= render 'navigation' %> | ||
<!--/subnav--> | ||
|
||
<!--main content--> | ||
<%= form_for(@locale) do |f| %> | ||
<dl> | ||
<dt><%= f.label :language_id, t('.language', :default => "Language:") %></dt> | ||
<dd><%= f.select(:language_id, @languages.collect {|l| [ l.name, l.id ] }) %></dd> | ||
|
||
<dt><%= f.label :name, t('.name', :default => "Name:") %></dt> | ||
<dd><%= f.text_field :name %></dd> | ||
|
||
<dt><%= f.label :iso, t('.iso', :default => "Iso:") %></dt> | ||
<dd><%= f.text_field :iso %></dd> | ||
</dl> | ||
<p class="submit actions"><%= f.submit t('.forms.submit', :default => "Submit") %></p> | ||
<% end %> | ||
<%= render 'locale_form' %> | ||
<!--/content--> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddInterfaceEnabledToLocale < ActiveRecord::Migration | ||
def change | ||
add_column :locales, :interface_enabled, :boolean, default: false, null: false | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddEmailEnabledToLocale < ActiveRecord::Migration | ||
def change | ||
add_column :locales, :email_enabled, :boolean, default: false, null: false | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class AddLocaleToPreferences < ActiveRecord::Migration | ||
def change | ||
add_column :preferences, :preferred_locale, :integer, default: 1, null: false | ||
end | ||
end |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<h4>Locale Preferences</h4> | ||
|
||
<dl id="help"> | ||
<dt>Set preferred locale</dt> | ||
<dd> | ||
This preference allows you to select your prefered language for email messages that the Archive sends to you. The templates for these messages are currently being updated and translated by our volunteers. This is a work in progress; not all messages will be available in languages other than English at this time. If the template for that email has not yet been translated to your language, it will be sent in English. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be "preferred." Also, a couple little phrasing tweaks: "This option allows you to select your preferred language for email messages the Archive sends you." and "If the template for an email has not yet been translated" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. One last "prefered" snuck in here. |
||
</dd> | ||
</dl> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a remaining ts() in a file that seems to otherwise use t()