Skip to content
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

Merged
merged 40 commits into from
May 11, 2015

Conversation

zz9pzza
Copy link
Contributor

@zz9pzza zz9pzza commented Oct 4, 2014

This adds the preferred locale user preference, currently the ability to edit this preference is controlled by roll out.

https://code.google.com/p/otwarchive/issues/detail?id=4099

@coveralls
Copy link

Coverage Status

Coverage increased (+0.17%) when pulling 4367bd5 on zz9pzza:issue_4099 into a97eeff on otwcode:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+2.77%) when pulling fdecc60 on zz9pzza:issue_4099 into fc2934d on otwcode:master.

@@ -119,7 +119,11 @@ def set_locale
if params[:language_id] && session[:language_id] != params[:language_id]
session[:language_id] = params[:language_id]
end
@i18n_locale = session[:language_id] || I18n.default_locale
if current_user.present? && $rollout.active?(:set_locale_preference, current_user) then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is then something special required for rollout? If not, it should probably come out -- it's not standard syntax for us.

@sarken
Copy link
Member

sarken commented Nov 17, 2014

There were quite a few interface, code, and accessibility issues with the locale views, so rather than go through and leave a million comments, I made the changes myself. You might want to pull them in: https://github.com/sarken/otwarchive/tree/issue_4099 But if you don't, we can make a separate issue and pull request for them.

</dl>
</fieldset>
</fieldset>
</ul>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This </ul> shouldn't be here.

@sarken
Copy link
Member

sarken commented Nov 19, 2014

Just two little things that got overlooked! (I commented on them.) Then someone else can give this a once-over from a backend POV.

(The test failure is for importing and seems to be unrelated.)

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.28%) to 72.47% when pulling ccfd466 on zz9pzza:issue_4099 into 30d7f56 on otwcode:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.07%) to 73.82% when pulling ccfd466 on zz9pzza:issue_4099 into 30d7f56 on otwcode:master.

<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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last "prefered" snuck in here.

@sarken
Copy link
Member

sarken commented May 7, 2015

I think the test failures we're seeing might actually be related to this: Mysql2::Error: Unknown column 'locales.email_enabled' in 'where clause': SELECT locales.* FROM locales WHERE locales.email_enabled = 1 (ActionView::Template::Error)

@coveralls
Copy link

Coverage Status

Coverage decreased (-5.69%) to 68.12% when pulling 4f9b118 on zz9pzza:issue_4099 into 6fc124f on otwcode:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-5.69%) to 68.12% when pulling 4f9b118 on zz9pzza:issue_4099 into 6fc124f on otwcode:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.27%) to 72.54% when pulling 8e6c0c8 on zz9pzza:issue_4099 into 6fc124f on otwcode:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.27%) to 72.54% when pulling 8e6c0c8 on zz9pzza:issue_4099 into 6fc124f on otwcode:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.27%) to 72.54% when pulling 8e6c0c8 on zz9pzza:issue_4099 into 6fc124f on otwcode:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 73.83% when pulling 8e6c0c8 on zz9pzza:issue_4099 into 6fc124f on otwcode:master.

<td><%= locale.interface_enabled %></td>
<td><%= locale.updated_at %></td>
<td class="actions">
<%= link_to ts('Edit'), {controller: :locales, action: :edit, id: locale.iso} %>
Copy link
Contributor

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()

ariana-paris added a commit that referenced this pull request May 11, 2015
Issue 4099 add a preference for the preferred locale for a user.
@ariana-paris ariana-paris merged commit b0c5942 into otwcode:master May 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants