虽然仅支持中文，但是我觉得引入i18n.t 是个好习惯，并且也很大程度避免了项目代码中，散落各地的字符串。

另外，我个人觉得，测试是应该补齐的。

On Jun 28, 2013, at 7:24 PM, Andy Wang <notifications@github.com> wrote:

> In app/controllers/users/omniauth_callbacks_controller.rb:
> 
> > +    @user = User.find_for_github_oauth(request.env["omniauth.auth"], current_user)
> > +
> > +    if @user.persisted?
> > +      show_flash_notice
> > +      sign_in_and_redirect @user, :event => :authentication #this will throw if @user is not activated
> > +    else
> > +      session["devise.github_data"] = env["omniauth.auth"].except("extra")
> > +      show_flash_notice
> > +      redirect_to new_user_registration_url
> > +    end
> > +  end
> > +
> > +  private
> > +
> > +    def show_flash_notice
> > +      flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => "GitHub" if is_navigational_format?
> 需要用I18n.t吗？我们只需要支持中文即可
> 
> —
> Reply to this email directly or view it on GitHub.
>