end
def unauthorized(exception)
- error = I18n.t('auth.unauthorized')
+ error = I18n.t('achievement.unauthorized')
respond_to do |format|
format.html { redirect_to({ :action => 'index' }, :alert => error) }
format.json { render :status => 401, :json => { :error => error } }
- if user_signed_in? and current_user.teacher
%div
- %p My lectures
%ul
- current_user.teacher.lectures.each do |lecture|
%li= link_to lecture.name, lecture_path(lecture)
%ul
- @lecture.tasks.each do |task|
%li= task.name
- = link_to 'Add new task', new_lecture_task_path(@lecture)
+ = link_to I18n.t('task.new_path'), new_lecture_task_path(@lecture)
-%h1 Users#profile
+%h1 Profile
%div
%ul
- [:email, :student_number, :authentication_token].each do |attr|
- %li= "#{attr}: #{current_user.send attr}"
+ %li= "#{User.human_attribute_name attr}: #{current_user.send attr}"
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
- # config.i18n.default_locale = :de
+ config.i18n.default_locale = :ja
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
home:
see_profile: "See profile"
see_achievement: "See achievement"
- auth:
+ achievement:
unauthorized: "Unauthorized"
lecture:
created: "Lecture was successfully created"
success: "Task was successfully created"
unauthorized: "You don't have permission to create a task of this lecture"
noapk: file can't be blank
+ new_path: Add new task
helpers:
label:
--- /dev/null
+ja:
+ devise:
+ sign_in: サインイン
+ sign_out: サインアウト
+ edit: profile を編集する
+ sessions:
+ user:
+ signed_in: サインインしました
+ signed_out: サインアウトしました
+ registrations:
+ user:
+ signed_up: サインアップしました
+ failure:
+ already_authenticated: ログイン済みです
+ home:
+ see_profile: profile を見る
+ see_achievement: 実績を見る
+ achievement:
+ unauthorized: この実績を見ることはできません
+ lecture:
+ created: 講義が追加されました
+ new_path: 講義を追加する
+ teacher:
+ not: 教師のみがこの操作を行えます
+ task:
+ create:
+ success: 課題が作成されました
+ unauthorized: この講義の課題を作成することはできません
+ noapk: が空です
+ new_path: 課題を追加する
+
+ helpers:
+ label:
+ task:
+ name: 課題名
+ apk:
+ name: クラス名
+ revision: リビジョン
+ apkfile:
+ file: apk フアイル
+
+ activerecord:
+ attributes:
+ user:
+ email: メールアドレス
+ password: パスワード
+ password_confirmation: パスワード (再入力)
+ student_number: 学籍番号
+ authentication_token: 認証トークン
+ remember_me: 次回から自動ログイン
+ lecture:
+ name: 講義名
+ task:
+ name: 課題名
+ apk:
+ name: クラス名
+ revision: リビジョン
+ apk: apk ファイル
+ errors:
+ messages:
+ blank: が空です
+
+ errors:
+ format: "%{attribute}%{message}"