From 5296c9f9a094f9e29aef77ca071a64d3de55d4c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Duque?= Date: Thu, 21 Mar 2024 10:52:39 -0500 Subject: [PATCH] Add missing translation keys (#76) --- app/controllers/cars_controller.rb | 24 +-- app/controllers/rankings_controller.rb | 6 +- app/controllers/repositories_controller.rb | 6 +- app/controllers/seasons_controller.rb | 6 +- app/controllers/sessions_controller.rb | 16 +- app/controllers/stats_controller.rb | 12 +- app/controllers/teams_controller.rb | 8 +- app/controllers/tournaments_controller.rb | 6 +- app/controllers/tracks_controller.rb | 22 +-- app/controllers/users_controller.rb | 18 +- app/views/cars/advanced.haml | 4 +- app/views/cars/amateur.haml | 4 +- app/views/cars/clockwork.haml | 4 +- app/views/cars/edit.haml | 27 +-- app/views/cars/new.haml | 9 +- app/views/cars/pro.haml | 4 +- app/views/cars/rookie.haml | 4 +- app/views/cars/semipro.haml | 4 +- app/views/cars/show.haml | 6 +- app/views/cars/superpro.haml | 4 +- app/views/points/index.haml | 2 +- app/views/rankings/show.haml | 8 +- app/views/repositories/new.haml | 15 +- app/views/repositories/show.haml | 2 +- app/views/seasons/edit.haml | 13 +- app/views/seasons/index.haml | 2 +- app/views/seasons/new.haml | 11 +- app/views/sessions/_form.haml | 16 +- app/views/sessions/_teams_results_table.haml | 4 +- app/views/sessions/edit.haml | 3 +- app/views/sessions/new.haml | 13 +- app/views/stats/index.haml | 22 +-- app/views/teams/_form.haml | 16 +- app/views/teams/edit.haml | 21 +- app/views/teams/index.haml | 2 +- app/views/teams/new.haml | 3 +- app/views/teams/show.haml | 19 +- app/views/tournaments/_form.haml | 16 +- app/views/tournaments/edit.haml | 3 +- app/views/tournaments/index.haml | 4 +- app/views/tournaments/new.haml | 19 +- app/views/tracks/edit.haml | 23 +-- app/views/tracks/index.haml | 2 +- app/views/tracks/new.haml | 7 +- app/views/tracks/show.haml | 4 +- app/views/users/_badges.haml | 6 +- app/views/users/new.haml | 5 +- app/views/users/show.haml | 51 ++--- config/locales/en.yml | 193 ++++++++++++++++++- 49 files changed, 450 insertions(+), 249 deletions(-) diff --git a/app/controllers/cars_controller.rb b/app/controllers/cars_controller.rb index 231c1d12..da29eeeb 100644 --- a/app/controllers/cars_controller.rb +++ b/app/controllers/cars_controller.rb @@ -114,7 +114,7 @@ def create respond_to do |format| if @car.save! - format.html { redirect_to car_url(@car), :notice => 'Car was successfully created.' } + format.html { redirect_to car_url(@car), :notice => t("rva.cars.controller.create") } format.json { render :show, :status => :created, :location => @car, :layout => false } Rails.cache.delete(category_cache_key(params[:category])) @@ -129,7 +129,7 @@ def create def update respond_to do |format| if @car.update(car_params) - format.html { redirect_to car_url(@car), :notice => 'Car was successfully updated.' } + format.html { redirect_to car_url(@car), :notice => t("rva.cars.controller.update") } format.json { render :show, :status => :ok, :location => @car, :layout => false } else format.html { render :edit, :status => :unprocessable_entity } @@ -144,29 +144,29 @@ def import file = params[:file] if file.nil? respond_to do |format| - format.html { redirect_to new_car_path, :notice => 'You must select a CSV file.' } - format.json { render :json => 'You must select a CSV file.', :status => :bad_request, :layout => false } + format.html { redirect_to new_car_path, :notice => t("misc.controller.import.select") } + format.json { render :json => t("misc.controller.import.select"), :status => :bad_request, :layout => false } end and return end unless SYS::CSV_TYPES.include?(file.content_type) respond_to do |format| - format.html { redirect_to new_car_path, :notice => 'You may only upload CSV files.' } - format.json { render :json => 'You may only upload CSV files.', :status => :bad_request, :layout => false } + format.html { redirect_to new_car_path, :notice => t("misc.controller.import.upload") } + format.json { render :json => t("misc.controller.import.upload"), :status => :bad_request, :layout => false } end and return end if params[:season].nil? || params[:season].empty? respond_to do |format| - format.html { redirect_to new_car_path, :notice => 'You must select a Season.' } + format.html { redirect_to new_car_path, :notice => t("misc.controller.import.season") } format.json { render :json => 'You must select a Season.', :status => :bad_request, :layout => false } end and return end if params[:category].nil? || params[:category].empty? respond_to do |format| - format.html { redirect_to new_car_path, :notice => 'You must select a Category.' } - format.json { render :json => 'You must select a car Category.', :status => :bad_request, :layout => false } + format.html { redirect_to new_car_path, :notice => t("misc.controller.import.category") } + format.json { render :json => t("misc.controller.import.category"), :status => :bad_request, :layout => false } end and return end @@ -174,13 +174,13 @@ def import respond_to do |format| if @cars.empty? - format.html { redirect_to new_car_path, :notice => 'No cars were created. Maybe they already exist?' } + format.html { redirect_to new_car_path, :notice => t("rva.cars.controller.import.exists") } format.json { render :show, :status => :ok, :layout => false } end and return @cars.each do |car| if car.save! - format.html { redirect_to new_car_path, :notice => 'Cars successfully imported.' } + format.html { redirect_to new_car_path, :notice => t("rva.cars.controller.import.success") } format.json { render :show, :status => :created, :location => car, :layout => false } Rails.cache.delete(category_cache_key(params[:category].to_i)) @@ -197,7 +197,7 @@ def destroy @car.destroy respond_to do |format| - format.html { redirect_to cars_url, :notice => 'Car was successfully destroyed.' } + format.html { redirect_to cars_url, :notice => t("rva.cars.controller.destroy") } format.json { head :no_content } end end diff --git a/app/controllers/rankings_controller.rb b/app/controllers/rankings_controller.rb index 37e02250..25c82e6c 100644 --- a/app/controllers/rankings_controller.rb +++ b/app/controllers/rankings_controller.rb @@ -43,7 +43,7 @@ def create respond_to do |format| if @ranking.save - format.html { redirect_to ranking_url(@ranking), :notice => 'Ranking was successfully created.' } + format.html { redirect_to ranking_url(@ranking), :notice => t(".controller.create") } format.json { render :show, :status => :created, :location => @ranking, :layout => false } else format.html { render :new, :status => :unprocessable_entity } @@ -56,7 +56,7 @@ def create def update respond_to do |format| if @ranking.update(ranking_params) - format.html { redirect_to ranking_url(@ranking), :notice => 'Ranking was successfully updated.' } + format.html { redirect_to ranking_url(@ranking), :notice => t(".controller.update") } format.json { render :show, :status => :ok, :location => @ranking } else format.html { render :edit, :status => :unprocessable_entity } @@ -69,7 +69,7 @@ def update def destroy respond_to do |format| if @ranking.destroy! - format.html { redirect_to rankings_url, :notice => 'Ranking was successfully deleted.' } + format.html { redirect_to rankings_url, :notice => t(".controller.delete") } format.json { head :no_content } else format.html { render :edit, :status => :unprocessable_entity } diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0837f9d6..0333370c 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -45,7 +45,7 @@ def create respond_to do |format| if @repository.save - format.html { redirect_to repository_url(@repository), :notice => 'Repository was successfully created.' } + format.html { redirect_to repository_url(@repository), :notice => t(".controller.create") } format.json { render :show, :status => :created, :location => @repository } else format.html { render :new, :status => :unprocessable_entity } @@ -58,7 +58,7 @@ def create def update respond_to do |format| if @repository.update(repository_params) - format.html { redirect_to repository_url(@repository), :notice => 'Repository was successfully updated.' } + format.html { redirect_to repository_url(@repository), :notice => t(".controller.update") } format.json { render :show, :status => :ok, :location => @repository } else format.html { render :edit, :status => :unprocessable_entity } @@ -72,7 +72,7 @@ def destroy @repository.destroy! respond_to do |format| - format.html { redirect_to repositories_url, :notice => 'Repository was successfully destroyed.' } + format.html { redirect_to repositories_url, :notice => t(".controller.destroy") } format.json { head :no_content } end end diff --git a/app/controllers/seasons_controller.rb b/app/controllers/seasons_controller.rb index ecbb8a7d..42c690a2 100644 --- a/app/controllers/seasons_controller.rb +++ b/app/controllers/seasons_controller.rb @@ -45,7 +45,7 @@ def create @season.rankings << Ranking.new({ :number => n + 1, :season => @season }) end - format.html { redirect_to season_url(@season), :notice => 'Season was successfully created.' } + format.html { redirect_to season_url(@season), :notice => t(".controller.create") } format.json { render :show, :status => :created, :location => @season, :layout => false } Rails.cache.delete('current_season') @@ -60,7 +60,7 @@ def create def update respond_to do |format| if @season.update(season_params) - format.html { redirect_to season_url(@season), :notice => 'Season was successfully updated.' } + format.html { redirect_to season_url(@season), :notice => t(".controller.update") } format.json { render :show, :status => :ok, :location => @season, :layout => false } else format.html { render :edit, :status => :unprocessable_entity } @@ -99,7 +99,7 @@ def destroy respond_to do |format| if @season.destroy! - format.html { redirect_to seasons_url, :notice => 'Season was successfully deleted.' } + format.html { redirect_to seasons_url, :notice => t(".controller.destroy") } format.json { head :no_content } else format.html { render :edit, :status => :unprocessable_entity } diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 85817a53..ff68ec2b 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -43,7 +43,7 @@ def create respond_to do |format| if @session.save - format.html { redirect_to session_url(@session), :notice => 'Session was successfully created.' } + format.html { redirect_to session_url(@session), :notice => t("rankings.sessions.controller.create") } format.json { render :show, :status => :created, :location => @session, :layout => false } else format.html { render :new, :status => :unprocessable_entity } @@ -56,7 +56,7 @@ def create def update respond_to do |format| if @session.update(session_params) - format.html { redirect_to session_url(@session), :notice => 'Session was successfully updated.' } + format.html { redirect_to session_url(@session), :notice => t("rankings.sessions.controller.update") } format.json { render :show, :status => :ok, :location => @session, :layout => false } else format.html { render :edit, :status => :unprocessable_entity } @@ -81,7 +81,7 @@ def destroy respond_to do |format| if @session.destroy! - format.html { redirect_to sessions_url, :notice => 'Session was successfully deleted.' } + format.html { redirect_to sessions_url, :notice => t("rankings.sessions.controller.delete") } format.json { head :no_content } Rails.cache.delete("Session:#{@session.id}") @@ -109,15 +109,15 @@ def import if file.nil? respond_to do |format| - format.html { redirect_to new_session_path, :notice => 'You must select a CSV file.' } - format.json { render :json => 'You must select a CSV file.', :status => :bad_request, :layout => false } + format.html { redirect_to new_session_path, :notice => t("misc.controller.import.select") } + format.json { render :json => t("misc.controller.import.select"), :status => :bad_request, :layout => false } end and return end unless SYS::CSV_TYPES.include?(file.content_type) respond_to do |format| - format.html { redirect_to new_session_path, :note => 'You may only upload CSV files.' } - format.json { render :json => 'You may only upload CSV files.', :status => :bad_request, :layout => false } + format.html { redirect_to new_session_path, :note => t("misc.controller.import.upload") } + format.json { render :json => t("misc.controller.import.upload"), :status => :bad_request, :layout => false } end and return end @@ -126,7 +126,7 @@ def import respond_to do |format| if @session.save! - format.html { redirect_to session_url(@session), :notice => 'Session was successfully imported.' } + format.html { redirect_to session_url(@session), :notice => t("rankings.sessions.controller.import.success") } format.json { render :show, :status => :created, :location => @session, :layout => false } Rails.cache.delete('recent_sessions') diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index a509db0a..9b9b8720 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -10,12 +10,12 @@ def index @count = ((@users.current_page - 1) * @users.limit_value) + 1 @sorts = { - :race_wins => 'Wins', - :race_podiums => 'Podiums', - :race_win_rate => 'Win Ratio', - # average_position: 'Average Position', - :obtained_points => 'Obtained Points', - :official_score => 'Official Score' + :race_wins => I18n.t("rankings.stats.table.wins"), + :race_podiums => I18n.t("rankings.stats.table.podiums"), + :race_win_rate => I18n.t("rankings.stats.table.win-ratio"), + # average_position: I18n.t("rankings.stats.table.average-pos"), + :obtained_points => I18n.t("rankings.stats.table.obtained-points"), + :official_score => I18n.t("rankings.stats.table.official-score") } end end diff --git a/app/controllers/teams_controller.rb b/app/controllers/teams_controller.rb index 789de00e..07b36f4e 100644 --- a/app/controllers/teams_controller.rb +++ b/app/controllers/teams_controller.rb @@ -37,7 +37,7 @@ def create respond_to do |format| if @team.save - format.html { redirect_to teams_path, :notice => 'Team was successfully created.' } + format.html { redirect_to teams_path, :notice => t(".controller.create") } format.json { render :show, :status => :created, :location => @team, :layout => false } else format.html { render :new, :status => :unprocessable_entity } @@ -50,7 +50,7 @@ def create def update respond_to do |format| if @team.update(team_params) - format.html { redirect_to team_path(@team), :notice => 'Team was successfully updated.' } + format.html { redirect_to team_path(@team), :notice => t(".controller.update") } format.json { render :show, :status => :ok, :location => @team, :layout => false } else format.html { render :edit, :status => :unprocessable_entity } @@ -65,7 +65,7 @@ def add_member respond_to do |format| if @team.update! - format.html { redirect_to team_path(@team), :notice => "#{new_member.username} was successfully added to #{@team.name}" } + format.html { redirect_to team_path(@team), :notice => t(".controller.add-member", :member => new_member.username, :team => @team.name) } else format.html { redirect_to team_path(@team), :status => :unprocessable_entity } end @@ -90,7 +90,7 @@ def destroy @team.destroy respond_to do |format| - format.html { redirect_to teams_url, :notice => 'Team was successfully destroyed.' } + format.html { redirect_to teams_url, :notice => t(".controller.destroy") } format.json { head :no_content } end end diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 34250774..9989da20 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -35,7 +35,7 @@ def create respond_to do |format| if @tournament.save - format.html { redirect_to tournament_url(@tournament), :notice => 'Tournament was successfully created.' } + format.html { redirect_to tournament_url(@tournament), :notice => t(".controller.create") } format.json { render :show, :status => :created, :location => @tournament, :layout => false } else format.html { render :new, :status => :unprocessable_entity } @@ -48,7 +48,7 @@ def create def update respond_to do |format| if @tournament.update(tournament_params) - format.html { redirect_to tournament_url(@tournament), :notice => 'Tournament was successfully updated.' } + format.html { redirect_to tournament_url(@tournament), :notice => t(".controller.update") } format.json { render :show, :status => :ok, :location => @tournament, :layout => false } else format.html { render :edit, :status => :unprocessable_entity } @@ -62,7 +62,7 @@ def destroy @tournament.destroy respond_to do |format| - format.html { redirect_to tournaments_url, :notice => 'Tournament was successfully destroyed.' } + format.html { redirect_to tournaments_url, :notice => t(".controller.destroy") } format.json { head :no_content } end end diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb index bda4f5cc..2dd8e224 100644 --- a/app/controllers/tracks_controller.rb +++ b/app/controllers/tracks_controller.rb @@ -41,7 +41,7 @@ def create respond_to do |format| if @track.save - format.html { redirect_to track_url(@track), :notice => 'Track was successfully created.' } + format.html { redirect_to track_url(@track), :notice => t("rva.tracks.controller.create") } format.json { render :show, :status => :created, :location => @track, :layout => false } else format.html { render :new, :status => :unprocessable_entity } @@ -54,7 +54,7 @@ def create def update respond_to do |format| if @track.update(track_params) - format.html { redirect_to track_url(@track), :notice => 'Track was successfully updated.' } + format.html { redirect_to track_url(@track), :notice => t("rva.tracks.controller.update") } format.json { render :show, :status => :ok, :location => @track, :layout => false } else format.html { render :edit, :status => :unprocessable_entity } @@ -69,22 +69,22 @@ def import file = params[:file] if file.nil? respond_to do |format| - format.html { redirect_to new_track_path, :notice => 'You must select a CSV file.' } - format.json { render :json => 'You must select a CSV file.', :status => :bad_request, :layout => false } + format.html { redirect_to new_track_path, :notice => t("misc.controller.import.select") } + format.json { render :json => t("misc.controller.import.select"), :status => :bad_request, :layout => false } end and return end unless SYS::CSV_TYPES.include?(file.content_type) respond_to do |format| - format.html { redirect_to new_track_path, :notice => 'You may only upload CSV files.' } - format.json { render :json => 'You may only upload CSV files.', :status => :bad_request, :layout => false } + format.html { redirect_to new_track_path, :notice => t("misc.controller.import.upload") } + format.json { render :json => t("misc.controller.import.upload"), :status => :bad_request, :layout => false } end and return end if params[:season].nil? || params[:season].empty? respond_to do |format| - format.html { redirect_to new_track_path, :notice => 'You must select a Season.' } - format.json { render :json => 'You must select a Season.', :status => :bad_request, :layout => false } + format.html { redirect_to new_track_path, :notice => t("misc.controller.import.season") } + format.json { render :json => t("misc.controller.import.season"), :status => :bad_request, :layout => false } end and return end @@ -92,13 +92,13 @@ def import respond_to do |format| if @tracks.empty? - format.html { redirect_to new_track_path, :notice => 'No tracks were created. Maybe they already exist?' } + format.html { redirect_to new_track_path, :notice => t("rva.tracks.controller.import.exists") } format.json { render :show, :status => :ok, :layout => false } end and return @tracks.each do |track| if track.save! - format.html { redirect_to new_track_path, :notice => 'Tracks successfully imported.' } + format.html { redirect_to new_track_path, :notice => t("rva.tracks.controller.import.success") } format.json { render :show, :status => :created, :location => track, :layout => false } else format.html { render :new, :status => :unprocessable_entity } @@ -113,7 +113,7 @@ def destroy @track.destroy respond_to do |format| - format.html { redirect_to tracks_url, :notice => 'Track was successfully destroyed.' } + format.html { redirect_to tracks_url, :notice => t("rva.tracks.controller.destroy") } format.json { head :no_content } end end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 31bed0e9..5d82b3b0 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -59,7 +59,7 @@ def edit # If user is team leader, we cannot move them to a different team ... we abort if !team.nil? && !team.id.to_s.eql?(params[:user][attr]) respond_to do |format| - format.html { redirect_to user_path(user), :notice => "#{user.username} is the leader of #{team.name}, therefore they cannot be removed from it" } + format.html { redirect_to user_path(user), :notice => t(".controller.update.leader", :user => user.username, :team => team.name) } end and return end end @@ -76,7 +76,7 @@ def edit respond_to do |format| if user.update! - format.html { redirect_to user_path(user), :notice => 'User successfully updated.' } + format.html { redirect_to user_path(user), :notice => t(".controller.update.success") } else format.html { redirect_to user_path(user), :status => :unprocessable_entity } end @@ -91,7 +91,7 @@ def update_locale respond_to do |format| if current_user.update! - format.html { redirect_back fallback_location: root_path, :notice => "Language set to #{SYS::LOCALES_MAP.key(params[:locale].to_sym)}" } + format.html { redirect_back fallback_location: root_path, :notice => t(".controller.update.locale", locale:SYS::LOCALES_MAP.key(params[:locale].to_sym)) } else format.html { redirect_to root_path, :status => :unprocessable_entity } end @@ -110,15 +110,15 @@ def import file = params[:file] if file.nil? respond_to do |format| - format.html { redirect_to users_new_path, :notice => 'You must select a CSV file.' } - format.json { render :json => 'You must select a CSV file.', :status => :bad_request, :layout => false } + format.html { redirect_to users_new_path, :notice => t("misc.controller.import.select") } + format.json { render :json => t("misc.controller.import.select"), :status => :bad_request, :layout => false } end and return end unless SYS::CSV_TYPES.include?(file.content_type) respond_to do |format| - format.html { redirect_to users_new_path, :notice => 'You may only upload CSV files.' } - format.json { render :json => 'You may only upload CSV files.', :status => :bad_request, :layout => false } + format.html { redirect_to users_new_path, :notice => t("misc.controller.import.upload") } + format.json { render :json => t("misc.controller.import.upload"), :status => :bad_request, :layout => false } end and return end @@ -126,13 +126,13 @@ def import respond_to do |format| if @users.empty? - format.html { redirect_to users_new_path, :notice => 'No users were created. Maybe the file format is incorrect?' } + format.html { redirect_to users_new_path, :notice => t(".controller.import.exists") } format.json { render :show, :status => :ok, :layout => false } end and return @users.each do |user| if user.save! - format.html { redirect_to root_path, :notice => 'Users successfully imported.' } + format.html { redirect_to root_path, :notice => t(".controller.import.success") } format.json { render :show, :status => :created, :location => user, :layout => false } else format.html { render :new, :status => :unprocessable_entity } diff --git a/app/views/cars/advanced.haml b/app/views/cars/advanced.haml index f67dca00..f08ba89e 100644 --- a/app/views/cars/advanced.haml +++ b/app/views/cars/advanced.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/cars/amateur.haml b/app/views/cars/amateur.haml index 8c5567d9..5794ec8b 100644 --- a/app/views/cars/amateur.haml +++ b/app/views/cars/amateur.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/cars/clockwork.haml b/app/views/cars/clockwork.haml index 1e6d8e60..46f24323 100644 --- a/app/views/cars/clockwork.haml +++ b/app/views/cars/clockwork.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/cars/edit.haml b/app/views/cars/edit.haml index 4e44c978..df1f2abb 100644 --- a/app/views/cars/edit.haml +++ b/app/views/cars/edit.haml @@ -9,38 +9,39 @@ .row .col-md-5 .field.form-group - = f.label :season - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, :class => "form-control" + = f.label :season, t("rva.cars.edit.season") + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, :class => "form-control" .field.form-group - = f.label :category - = f.select :category, SYS::CATEGORY::RVGL_NUMBERS_MAP, {:prompt => "Select Category"}, :class => "form-control" + = f.label :category, t("rva.cars.features.category") + = f.select :category, SYS::CATEGORY::RVGL_NUMBERS_MAP, {:prompt => t("misc.prompt.category")}, :class => "form-control" .field.form-group - = f.label :name + = f.label :name, t("rva.cars.edit.name") = f.text_field :name, :class => "form-control" .field.form-group - = f.label :speed + = f.label :speed, t("rva.cars.features.speed") = f.text_field :speed, :class => "form-control" .field.form-group - = f.label :accel + = f.label :accel, t("rva.cars.features.acceleration") = f.text_field :accel, :class => "form-control" .field.form-group - = f.label :weight + = f.label :weight, t("rva.cars.features.weight") = f.text_field :weight, :class => "form-control" .field.form-group - = f.label :multiplier + = f.label :multiplier, t("rva.cars.features.multiplier") = f.text_field :multiplier, :class => "form-control" .field.form-group - = f.label :folder_name + = f.label :folder_name, t("rva.cars.edit.folder-name") = f.text_field :folder_name, :class => "form-control" .field.form-group - = f.label :stock + = f.label :stock, t("rva.cars.features.stock") = f.check_box :stock .actions - = f.button "Update", :type => "submit", :class => "btn mb-2" + = f.button t("rva.cars.edit.update"), :type => "submit", :class => "btn mb-2" .col-md-7 - if @car.errors.any? #error-explanation - %h5 Car could not be saved + %h5 + = t("rva.cars.edit.error") %ul - @car.errors.each do |error| %li diff --git a/app/views/cars/new.haml b/app/views/cars/new.haml index 5e3c9018..b37faa8f 100644 --- a/app/views/cars/new.haml +++ b/app/views/cars/new.haml @@ -1,4 +1,5 @@ -%h2.mb-4 Import Cars +%h2.mb-4 + = t("rva.cars.import.title") = form_with :url => import_cars_path, :method => :post do |f| .row @@ -7,8 +8,8 @@ = f.file_field :file, :accept => ".csv", :class => "form-control-file" .field.form-group - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, :class => "form-control" + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, :class => "form-control" .field.form-group - = f.select :category, SYS::CATEGORY::RVGL_NUMBERS_MAP, {:prompt => "Select Category"}, {:class => "form-control"} + = f.select :category, SYS::CATEGORY::RVGL_NUMBERS_MAP, {:prompt => t("misc.prompt.category")}, {:class => "form-control"} - = f.button "Import", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t("misc.submit.import"), :type => "submit", :"data-turbo" => false, :class => "btn" diff --git a/app/views/cars/pro.haml b/app/views/cars/pro.haml index a1481a11..b743bb84 100644 --- a/app/views/cars/pro.haml +++ b/app/views/cars/pro.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/cars/rookie.haml b/app/views/cars/rookie.haml index d814b662..05bb6159 100644 --- a/app/views/cars/rookie.haml +++ b/app/views/cars/rookie.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/cars/semipro.haml b/app/views/cars/semipro.haml index ae1cf308..9e78abf6 100644 --- a/app/views/cars/semipro.haml +++ b/app/views/cars/semipro.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/cars/show.haml b/app/views/cars/show.haml index b30f809f..7d06cfa9 100644 --- a/app/views/cars/show.haml +++ b/app/views/cars/show.haml @@ -38,9 +38,9 @@ %dd = category_name(@car.category) %dt{:style => "cursor: help;", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => t("rva.cars.features.stock-tooltip.tooltip")} - = t("rva.cars.features.stock") + = t("rva.shared.stock.title") %dd - = "#{@car.stock? ? "Yes" : "No"}" + = "#{@car.stock? ? t("misc.bool.true") : t("misc.bool.false")}" - if @car.season %i = t("rva.cars.features.featured-session", season:@car.season.name) #{@car.season.name} @@ -48,4 +48,4 @@ .col-md-6 %img.thumbnail.center-block.img-responsive{src: @car.thumbnail_url} - if user_is_admin? - = link_to 'Edit Car', edit_car_path(@car), :class => "btn mt-2" + = link_to t("rva.cars.edit.button"), edit_car_path(@car), :class => "btn mt-2" diff --git a/app/views/cars/superpro.haml b/app/views/cars/superpro.haml index c6a1386b..54abf813 100644 --- a/app/views/cars/superpro.haml +++ b/app/views/cars/superpro.haml @@ -12,13 +12,13 @@ .sticky-top.search-bar .row .col-xl-11.col-lg-10.col-md-10.col-xs-9.col-8.sticky-top - %input#input.form-control{placeholder: "Search...", type: "text"}/ + %input#input.form-control{placeholder: t("rva.cars.shared.placeholder"), type: "text"}/ .col-xl-1.col-lg-2.col-md-2.col-xs-3.col-4 = render :partial => "car_category_selector" - if @cars.none? %h5.text-center - = "No cars to display" + = t("rva.cars.shared.no-cars") - else .row - @cars.each do |car| diff --git a/app/views/points/index.haml b/app/views/points/index.haml index b5cb5175..b613b0d3 100644 --- a/app/views/points/index.haml +++ b/app/views/points/index.haml @@ -33,7 +33,7 @@ %br %h3 - = t("points.desktop-parser.titles") + = t("points.desktop-parser.title") %p = t("points.desktop-parser.description") diff --git a/app/views/rankings/show.haml b/app/views/rankings/show.haml index 6099aa91..68b5f03a 100644 --- a/app/views/rankings/show.haml +++ b/app/views/rankings/show.haml @@ -3,7 +3,7 @@ = render :partial => "application/subnav", :locals => { :season => @ranking.season, :rankings => @ranking.season.rankings, :ranking => @ranking } %h2.mt-4.text-center - = "Ranking #{@ranking.number}" + = t("rankings.title", number:@ranking.number) #recent .mt-4 @@ -40,9 +40,9 @@ %ul.nav.nav-tabs{role: "tablist"} %li.nav-item - %a#singles-tab.nav-link.active{"aria-controls" => "singles", "aria-selected" => "true", "data-toggle" => "tab", href: "#singles", role: "tab"} Singles + %a#singles-tab.nav-link.active{"aria-controls" => "singles", "aria-selected" => "true", "data-toggle" => "tab", href: "#singles", role: "tab"}= t("rankings.nav.singles") %li.nav-item - %a#teams-tab.nav-link{"aria-controls" => "teams", "aria-selected" => "false", "data-toggle" => "tab", href: "#teams", role: "tab"} Teams + %a#teams-tab.nav-link{"aria-controls" => "teams", "aria-selected" => "false", "data-toggle" => "tab", href: "#teams", role: "tab"}= t("rankings.nav.teams") .tab-content #singles.tab-pane.fade.show.active{:"aria-labelledby" => "singles-tab", role: "tabpanel"} @@ -84,7 +84,7 @@ #teams.tab-pane.fade.show{:"aria-labelledby" => "teams-tab", role: "tabpanel"} - if @team_entries.none? %h5.text-center.mt-2 - = "No team results to display" + = t("rankings.results.no-team-results") - else .table-responsive#teams-table %table.table.table-bordered.table-striped diff --git a/app/views/repositories/new.haml b/app/views/repositories/new.haml index 13dba616..67c1403a 100644 --- a/app/views/repositories/new.haml +++ b/app/views/repositories/new.haml @@ -1,24 +1,25 @@ - content_for :title, "Re-Volt America - New Repository" -%h2.mb-4 New Repository +%h2.mb-4 + = t("repositories.new.title") = form_with :model => @repository do |f| .row .col-md-5 .field.form-group - = f.text_field :title, :class => "form-control", :placeholder => "Title" + = f.text_field :title, :class => "form-control", :placeholder => t(".placeholder.title") .field.form-group - = f.text_field :description, :class => "form-control", :placeholder => "Description" + = f.text_field :description, :class => "form-control", :placeholder => t(".placeholder.description") .field.form-group - = f.text_field :namespace, :class => "form-control", :placeholder => "Namespace" + = f.text_field :namespace, :class => "form-control", :placeholder => t(".placeholder.namespace") .field.form-group - = f.text_field :repo, :class => "form-control", :placeholder => "Repository" + = f.text_field :repo, :class => "form-control", :placeholder => t("repositories.repository") .field.form-group - = f.text_field :branch, :class => "form-control", :placeholder => "branch" + = f.text_field :branch, :class => "form-control", :placeholder => t(".placeholder.branch") .field.form-group = f.select :provider, ['GitHub'], {}, {:class => 'form-control'} @@ -31,4 +32,4 @@ = f.check_box :visible = f.label :visible - = f.button "Create", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t(".create"), :type => "submit", :"data-turbo" => false, :class => "btn" diff --git a/app/views/repositories/show.haml b/app/views/repositories/show.haml index 80e495b7..ebd0cd94 100644 --- a/app/views/repositories/show.haml +++ b/app/views/repositories/show.haml @@ -53,6 +53,6 @@ = r.message %td = time_ago_in_words(r.date) - ago + = t("repositories.table.ago") = paginate @revs diff --git a/app/views/seasons/edit.haml b/app/views/seasons/edit.haml index fbb3770f..620f95d2 100644 --- a/app/views/seasons/edit.haml +++ b/app/views/seasons/edit.haml @@ -3,26 +3,27 @@ = render :partial => "application/subnav", :locals => { :season => @season, :rankings => @season.rankings } %h2 - = "Editing Season" + = t("seasons.edit.title") = form_with(model: @season) do |form| .row .col-md-5 .field.form-group - = form.label :name + = form.label :name, t(".name") = form.text_field :name, :class => "form-control" .field.form-group - = form.label :start_date + = form.label :start_date, t(".start-date") = form.date_field :start_date, :class => "form-control" .field.form-group - = form.label :end_date + = form.label :end_date, t(".end-date") = form.date_field :end_date, :class => "form-control" .actions - = form.button "Update", :type => "submit", :class => "btn mb-2" + = form.button t("misc.submit.update"), :type => "submit", :class => "btn mb-2" .col-md-7 - if @season.errors.any? #error-explanation - %h5 Season could not be saved + %h5 + = t(".error") %ul - @season.errors.each do |error| %li diff --git a/app/views/seasons/index.haml b/app/views/seasons/index.haml index 8b79fbd5..ebde0652 100644 --- a/app/views/seasons/index.haml +++ b/app/views/seasons/index.haml @@ -1,7 +1,7 @@ - content_for :title, "Re-Volt America - Seasons" %h2 - The RVA Seasons + = t("seasons.title") = render :partial => "application/subnav" diff --git a/app/views/seasons/new.haml b/app/views/seasons/new.haml index bc23ce3f..71047157 100644 --- a/app/views/seasons/new.haml +++ b/app/views/seasons/new.haml @@ -1,6 +1,7 @@ - content_for :title, "Re-Volt America - New Season" -%h2.mb-3 Create Season +%h2.mb-3 + = t("seasons.create.title") = form_with(model: @season) do |form| .row .col-md-5 @@ -8,15 +9,15 @@ #error-explanation %h2 = pluralize(@season.errors.count, "error") - prohibited this season from being saved: + = t("seasons.create.error") %ul - @season.errors.each do |error| %li= error.full_message .field.form-group - = form.label :name + = form.label :name, t("seasons.edit.name") = form.text_field :name, :class => "form-control" .field.form-group - = form.label :start_date + = form.label :start_date, t("seasons.edit.start-date") = form.date_field :start_date, :class => "form-control", :min => Date.new(2017, 01, 02), :max => Date.today + 1.year .actions - = form.button "Create Season", :type => "submit", :class => "btn mb-2" + = form.button t("seasons.create.title"), :type => "submit", :class => "btn mb-2" diff --git a/app/views/sessions/_form.haml b/app/views/sessions/_form.haml index 427e15c4..5c84553a 100644 --- a/app/views/sessions/_form.haml +++ b/app/views/sessions/_form.haml @@ -2,30 +2,30 @@ .row .col-md-5 .field.form-group - = form.label :host + = form.label :host, t("rankings.sessions.edit.host") = form.text_field :host, :class => "form-control" .field.form-group - = form.label :version + = form.label :version, t("rankings.sessions.edit.version") = form.text_field :version, :class => "form-control" .field.form-group - = form.label :physics + = form.label :physics, t("rankings.sessions.edit.physics") = form.text_field :physics, :class => "form-control" .field.form-group - = form.label :protocol + = form.label :protocol, t("rankings.sessions.edit.protocol") = form.text_field :protocol, :class => "form-control" .field.form-group - = form.label :number + = form.label :number, t("rankings.sessions.edit.number") = form.number_field :number, :class => "form-control" .field.form-group - = form.label :date + = form.label :date, t("rankings.sessions.edit.date") = form.date_field :date, :class => "form-control" .actions - = form.button "Update Session", :type => "submit", :"data-turbo" => false, :class => "btn" + = form.button t("rankings.sessions.edit.update"), :type => "submit", :"data-turbo" => false, :class => "btn" .col-md-7 - if session.errors.any? #error-explanation %h5 - = "Session could not be saved" + = t("rankings.sessions.edit.error") %ul - session.errors.each do |error| %li= error.full_message diff --git a/app/views/sessions/_teams_results_table.haml b/app/views/sessions/_teams_results_table.haml index 898f7138..e6937a99 100644 --- a/app/views/sessions/_teams_results_table.haml +++ b/app/views/sessions/_teams_results_table.haml @@ -22,7 +22,7 @@ %li = t("results.teams", teams:@session.teams? ? "Yes" : "No") #{@session.teams? ? "Yes" : "No"} %li - = link_to "Download Session Log", @session.session_log_url + = link_to t("results.download"), @session.session_log_url - if user_is_organizer? || user_is_admin? .col-xl-5.col-lg-5.col-md-12.col-xs-12 .session-details.mb-4 @@ -52,7 +52,7 @@ - if item.is_a?(Track) = link_to item.short_name, track_path(item) - else - %span{:"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Track not found"} + %span{:"data-toggle" => "tooltip", :"data-placement" => "top", :title => t("results.container.tracks.not-found")} = "?" %th.cc-header.text-center.align-middle{:width => "2%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => t("results.container.tooltips.race-count")} = t("rankings.table.cc") diff --git a/app/views/sessions/edit.haml b/app/views/sessions/edit.haml index 7f6ef9a1..45e05219 100644 --- a/app/views/sessions/edit.haml +++ b/app/views/sessions/edit.haml @@ -2,6 +2,7 @@ = render :partial => "application/subnav", :locals => { :season => @session.ranking.season, :rankings => @session.ranking.season.rankings, :ranking => @session.ranking, :session => @session } -%h1 Editing Session +%h1 + = t("rankings.sessions.edit.title") = render 'form', session: @session diff --git a/app/views/sessions/new.haml b/app/views/sessions/new.haml index 026fe255..87a74fdc 100644 --- a/app/views/sessions/new.haml +++ b/app/views/sessions/new.haml @@ -1,6 +1,7 @@ - content_for :title, "Re-Volt America - New Session" -%h2.mb-4 Upload Session +%h2.mb-4 + = t("rankings.sessions.upload.title") = form_with :url => import_sessions_path, :method => :post do |f| .row @@ -11,13 +12,13 @@ %div{:"data-controller" => "season"} .field.form-group - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, {:data => {:action => "change->season#change"}, :class => "form-control" } + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, {:data => {:action => "change->season#change"}, :class => "form-control" } .field.form-group - = f.select :ranking, [], {:prompt => "Select Ranking"}, {:data => {:"season_target" => "rankingSelect"}, :class => "form-control"} + = f.select :ranking, [], {:prompt => t("misc.prompt.ranking")}, {:data => {:"season_target" => "rankingSelect"}, :class => "form-control"} .field.form-group - = f.select :category, SYS::CATEGORY::RVA_NUMBERS_MAP, {:prompt => "Select Category"}, {:class => "form-control"} + = f.select :category, SYS::CATEGORY::RVA_NUMBERS_MAP, {:prompt => t("misc.prompt.category")}, {:class => "form-control"} .field.form-group = f.check_box :teams - = f.label :teams + = f.label :teams, t("misc.checkbox.teams") - = f.button "Import", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t("misc.submit.import"), :type => "submit", :"data-turbo" => false, :class => "btn" diff --git a/app/views/stats/index.haml b/app/views/stats/index.haml index 78d902e2..cd58d045 100644 --- a/app/views/stats/index.haml +++ b/app/views/stats/index.haml @@ -3,9 +3,9 @@ - meta :description, "Global statistics leaderboard for Re-Volt America's online sessions." %h1.mb-4 - Global Stats + = t("rankings.stats.title") -Sorted by: += t("rankings.stats.sorted") %select#sorter.form-control{style: "display: inline-block; width: 130px; cursor: pointer;"} - @sorts.each do |key, label| @@ -21,15 +21,15 @@ Sorted by: %thead %tr %th{width: "1%"} # - %th{width: "2%"} Country - %th{width: "15%"} Racer - %th{width: "2%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Race wins"} Wins - %th{width: "2%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Arrived 3rd or higher"} Podiums - %th{width: "12%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Wins divided by race count"} Win Ratio - %th{width: "15%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Average finish position"} Average Pos. - %th{width: "15%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Total amount of finished races"} Race Count - %th{width: "17%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Accumulated points"} Obtained Points - %th{width: "15%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Accumulated official score"} Official Score + %th{width: "2%"}= t("rankings.table.country") + %th{width: "15%"}= t("rankings.table.racer") + %th{width: "2%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Race wins"}= t("rankings.stats.table.wins") + %th{width: "2%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Arrived 3rd or higher"}= t("rankings.stats.table.podiums") + %th{width: "12%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Wins divided by race count"}= t("rankings.stats.table.win-ratio") + %th{width: "15%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Average finish position"}= t("rankings.stats.table.average-pos") + %th{width: "15%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Total amount of finished races"}= t("rankings.stats.table.race-count") + %th{width: "17%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Accumulated points"}= t("rankings.stats.table.obtained-points") + %th{width: "15%", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => "Accumulated official score"}= t("rankings.stats.table.official-score") %tbody - @users.each do |user| - @count += 1 diff --git a/app/views/teams/_form.haml b/app/views/teams/_form.haml index 7fa1d249..cbe1b5d9 100644 --- a/app/views/teams/_form.haml +++ b/app/views/teams/_form.haml @@ -2,28 +2,28 @@ .row .col-md-5 .field.form-group - = form.label :name + = form.label :name, t("teams.edit.name") = form.text_field :name, :class => "form-control" .field.form-group - = form.label :short_name + = form.label :short_name, t("teams.edit.short-name") = form.text_field :short_name, :class => "form-control" .field.form-group - = form.label :color + = form.label :color, t("teams.edit.color") = form.color_field :color, :class => "form-control" - = form.label :team_image + = form.label :team_image, t("teams.edit.team-img") .field.file-input-group = form.hidden_field :team_logo, :value => team.cached_team_logo_data, :id => nil = form.file_field :team_logo, :accept => "image/png, image/jpeg", :class => "form-control-file" .field.form-group - = form.label :leader - = form.select :leader, @no_team_users.sort_by { |u| u.username.downcase }.collect { |u| [u.username, u.id] }, { :prompt => "Select Leader" }, :class => "form-control" + = form.label :leader, t("teams.edit.leader") + = form.select :leader, @no_team_users.sort_by { |u| u.username.downcase }.collect { |u| [u.username, u.id] }, { :prompt => t("misc.prompt.leader")}, :class => "form-control" .actions - = form.button "Create Team", :type => "submit", :"data-turbo" => false, :class => "btn" + = form.button t("teams.edit.create"), :type => "submit", :"data-turbo" => false, :class => "btn" .col-md-7 - if team.errors.any? #error-explanation %h5 - = "Team could not be saved" + = t("teams.edit.error") %ul - team.errors.each do |error| %li= error.full_message diff --git a/app/views/teams/edit.haml b/app/views/teams/edit.haml index f244c58c..29a3fc28 100644 --- a/app/views/teams/edit.haml +++ b/app/views/teams/edit.haml @@ -1,34 +1,35 @@ - content_for :title, "Re-Volt America - Edit Team" -%h1 Editing Team +%h1 + = t("teams.edit.title") = form_with(:model => @team) do |form| .row .col-md-5 .field.form-group - = form.label :name + = form.label :name, t("teams.edit.name") = form.text_field :name, :class => "form-control" .field.form-group - = form.label :short_name + = form.label :short_name, t(".short-name") = form.text_field :short_name, :class => "form-control" .field.form-group - = form.label :color + = form.label :color, t(".color") = form.color_field :color, :class => "form-control" - = form.label :team_image + = form.label :team_image, t(".team-img") .field.file-input-group = form.hidden_field :team_logo, :value => @team.cached_team_logo_data, :id => nil = form.file_field :team_logo, :accept => "image/png, image/jpeg", :class => "form-control-file" .field.form-group - = form.label :leader - = form.select :leader, @sorted_members.collect { |u| [u.username, u.id] }, { :prompt => "Select Leader" }, :class => "form-control" + = form.label :leader, t(".leader") + = form.select :leader, @sorted_members.collect { |u| [u.username, u.id] }, { :prompt => t("misc.prompt.leader")}, :class => "form-control" .actions - = link_to 'Back', team_path(@team), :class => 'btn btn-sm' - = form.button "Update", :type => "submit", :"data-turbo" => false, :class => "btn btn-sm" + = link_to t("misc.button.back"), team_path(@team), :class => 'btn btn-sm' + = form.button t("misc.submit.update"), :type => "submit", :"data-turbo" => false, :class => "btn btn-sm" .col-md-7 - if @team.errors.any? #error-explanation %h5 - = "Team could not be saved" + = t(".error") %ul - @team.errors.each do |error| %li= error.full_message diff --git a/app/views/teams/index.haml b/app/views/teams/index.haml index c6ee4654..42300d16 100644 --- a/app/views/teams/index.haml +++ b/app/views/teams/index.haml @@ -61,4 +61,4 @@ - if user_is_admin? .text-center - = link_to "New", new_team_path, :class => "btn btn-sm" + = link_to t("misc.button.new"), new_team_path, :class => "btn btn-sm" diff --git a/app/views/teams/new.haml b/app/views/teams/new.haml index a37cc0d0..5f52d3b8 100644 --- a/app/views/teams/new.haml +++ b/app/views/teams/new.haml @@ -1,4 +1,5 @@ - content_for :title, "Re-Volt America - New Team" -%h1 New Team +%h1 + = t("teams.new.title") = render 'form', team: @team diff --git a/app/views/teams/show.haml b/app/views/teams/show.haml index b396d983..78cc7267 100644 --- a/app/views/teams/show.haml +++ b/app/views/teams/show.haml @@ -19,9 +19,12 @@ %table.table.table-bordered.table-striped %thead %tr - %th Name - %th Country - %th Role + %th + = t("teams.table.name") + %th + = t("teams.table.country") + %th + = t("teams.table.role.title") %tbody %tr %td @@ -29,7 +32,7 @@ %td = render :partial => 'users/country_flag', :locals => {:country => @leader.country} %td - Leader + = t("teams.table.role.leader") - @members.each do |m| %tr %td @@ -37,7 +40,7 @@ %td = render :partial => 'users/country_flag', :locals => {:country => m.country} %td - Member + = t("teams.table.role.member") - if user_is_admin? = form_with :url => add_member_teams_path, method: :put do |f| @@ -46,8 +49,8 @@ .input-group = f.select :member, @no_team_users.sort_by { |u| u.username.downcase }.collect { |u| [u.username, u.id] }, {}, :class => "custom-select form-control" .input-group-append - = f.button "Add Member", :type => "submit", :"data-turbo" => false, :class => "btn btn-outline-secondary" + = f.button t("teams.edit.add-member"), :type => "submit", :"data-turbo" => false, :class => "btn btn-outline-secondary" = f.hidden_field :id, :value => @team.id - = link_to 'Back', teams_path, :class => "btn btn-sm" - = link_to 'Edit Team', edit_team_path(@team), :class => "btn btn-sm" + = link_to t("misc.button.back"), teams_path, :class => "btn btn-sm" + = link_to t("teams.edit.edit-team"), edit_team_path(@team), :class => "btn btn-sm" diff --git a/app/views/tournaments/_form.haml b/app/views/tournaments/_form.haml index 4180695d..fa4a282a 100644 --- a/app/views/tournaments/_form.haml +++ b/app/views/tournaments/_form.haml @@ -2,29 +2,29 @@ .row .col-md-5 .field.form-group - = f.label :name + = f.label :name, t("tournaments.edit.name") = f.text_field :name, :class => "form-control" .field.form-group - = f.label :date + = f.label :date, t("tournaments.edit.date") = f.date_field :date, :class => "form-control", :min => Date.new(2017, 01, 02), :max => Date.today + 1.year .field.form-group - = f.label :season - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, :class => "form-control" - = f.label :tournament_banner + = f.label :season, t("tournaments.edit.season") + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, :class => "form-control" + = f.label :tournament_banner, t("tournaments.edit.banner") .field.file-input-group = f.hidden_field :tournament_banner, :value => tournament.cached_tournament_banner_data, :id => nil = f.file_field :tournament_banner, :accept => "image/png, image/jpeg", :class => "form-control-file" .field.form-group - = f.label :format + = f.label :format, t("tournaments.edit.format") = f.text_area :format, :class => "form-control" .actions - = f.button "Save Tournament", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t("tournaments.edit.save"), :type => "submit", :"data-turbo" => false, :class => "btn" .col-md-7 - if tournament.errors.any? #error-explanation %h2 = pluralize(tournament.errors.count, "error") - prohibited this tournament from being saved: + = t("tournaments.edit.error") %ul - tournament.errors.each do |error| %li= error.full_message diff --git a/app/views/tournaments/edit.haml b/app/views/tournaments/edit.haml index 86272745..21f09bd5 100644 --- a/app/views/tournaments/edit.haml +++ b/app/views/tournaments/edit.haml @@ -1,5 +1,6 @@ - content_for :title, "Re-Volt America - Edit Tournament" -%h1 Editing Tournament +%h1 + = t("tournaments.edit.title") = render 'form', tournament: @tournament diff --git a/app/views/tournaments/index.haml b/app/views/tournaments/index.haml index 48c8366a..afd10c51 100644 --- a/app/views/tournaments/index.haml +++ b/app/views/tournaments/index.haml @@ -6,7 +6,7 @@ - if @tournaments.none? %h5.text-center.mt-3 - = "No tournaments to display" + = t("tournaments.no-tournaments") - else - @tournaments.each do |tournament| .row @@ -16,4 +16,4 @@ - if user_is_staff? .text-center - = link_to t("tournaments.new"), new_tournament_path, :class => "btn btn-sm" + = link_to t("misc.button.new"), new_tournament_path, :class => "btn btn-sm" diff --git a/app/views/tournaments/new.haml b/app/views/tournaments/new.haml index cab8b764..e3f30f9b 100644 --- a/app/views/tournaments/new.haml +++ b/app/views/tournaments/new.haml @@ -1,34 +1,35 @@ - content_for :title, "Re-Volt America - New Tournament" -%h2.mb-4 New Tournament +%h2.mb-4 + = t("tournaments.new.title") = form_with(:model => @tournament) do |f| .row .col-md-5 .field.form-group - = f.label :name + = f.label :name, t("tournaments.edit.name") = f.text_field :name, :class => "form-control" .field.form-group - = f.label :date + = f.label :datem, t("tournaments.edit.date") = f.date_field :date, :class => "form-control", :min => Date.new(2017, 01, 02), :max => Date.today + 1.year - = f.label :tournament_banner + = f.label :tournament_banner, t("tournaments.edit.banner") .field.file-input-group = f.hidden_field :tournament_banner, :value => @tournament.cached_tournament_banner_data, :id => nil = f.file_field :tournament_banner, :accept => "image/png, image/jpeg", :class => "form-control-file" .field.form-group - = f.label :format + = f.label :format, t("tournaments.edit.format") = f.text_area :format, :class => "form-control" .field.form-group - = f.label :season - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, :class => "form-control" + = f.label :season, t("tournaments.edit.season") + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, :class => "form-control" .actions - = f.button "Create Tournament", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t("tournaments.new.button"), :type => "submit", :"data-turbo" => false, :class => "btn" .col-md-7 - if @tournament.errors.any? #error-explanation %h2 = pluralize(@tournament.errors.count, "error") - prohibited this tournament from being saved: + = t("tournaments.edit.error") %ul - @tournament.errors.each do |error| %li= error.full_message diff --git a/app/views/tracks/edit.haml b/app/views/tracks/edit.haml index a8531d27..9929d994 100644 --- a/app/views/tracks/edit.haml +++ b/app/views/tracks/edit.haml @@ -3,35 +3,36 @@ = render :partial => "application/subnav", :locals => {:track => @track} %h2 - = "Editing Track" + = t("rva.tracks.edit.title") = form_with(:model => @track) do |f| .row .col-md-5 .field.form-group - = f.label :season - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, :class => "form-control" + = f.label :season, t("rva.tracks.edit.season") + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, :class => "form-control" .field.form-group - = f.label :name + = f.label :name, t("rva.tracks.edit.name") = f.text_field :name, :class => "form-control" .field.form-group - = f.label :short_name + = f.label :short_name, t("rva.tracks.edit.short-name") = f.text_field :short_name, :class => "form-control" .field.form-group - = f.label :difficulty - = f.select :difficulty, SYS::TRACK::DIFFICULTIES, {:prompt => "Select Difficulty"}, :class => "form-control" + = f.label :difficulty, t("rva.tracks.edit.difficulty") + = f.select :difficulty, SYS::TRACK::DIFFICULTIES, {:prompt => t("misc.prompt.difficulty")}, :class => "form-control" .field.form-group - = f.label "Length (meters)" + = f.label t("rva.tracks.edit.length") = f.number_field :length, :class => "form-control" .field.form-group - = f.label :folder_name + = f.label :folder_name, t("rva.tracks.edit.folder-name") = f.text_field :folder_name, :class => "form-control" .actions - = f.button "Update", :type => "submit", :class => "btn mb-2" + = f.button t("misc.submit.update"), :type => "submit", :class => "btn mb-2" .col-md-7 - if @track.errors.any? #error-explanation - %h5 Track could not be saved + %h5 + = t("rva.tracks.edit.error") %ul - @track.errors.each do |error| %li diff --git a/app/views/tracks/index.haml b/app/views/tracks/index.haml index df5e2d6f..42e4a9e3 100644 --- a/app/views/tracks/index.haml +++ b/app/views/tracks/index.haml @@ -13,7 +13,7 @@ - if @tracks.none? %h5.text-center - = "No tracks to display" + = t("rva.tracks.no-tracks") - else .row.mt-4 - @tracks.each do |track| diff --git a/app/views/tracks/new.haml b/app/views/tracks/new.haml index 8ec4aefa..4ae540b8 100644 --- a/app/views/tracks/new.haml +++ b/app/views/tracks/new.haml @@ -1,6 +1,7 @@ - content_for :title, "Re-Volt America - Import Tracks" -%h2.mb-4 Import Tracks +%h2.mb-4 + = t("rva.tracks.import.title") = form_with :url => import_tracks_path, :method => :post do |f| .row @@ -9,6 +10,6 @@ = f.file_field :file, :accept => ".csv", :class => "form-control-file" .field.form-group - = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => "Select Season"}, :class => "form-control" + = f.select :season, Season.all.collect { |s| [s.name, s.id] }, {:prompt => t("misc.prompt.season")}, :class => "form-control" - = f.button "Import", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t("misc.submit.import"), :type => "submit", :"data-turbo" => false, :class => "btn" diff --git a/app/views/tracks/show.haml b/app/views/tracks/show.haml index 4d3ba498..fb155e02 100644 --- a/app/views/tracks/show.haml +++ b/app/views/tracks/show.haml @@ -30,11 +30,11 @@ %dd = t("rva.tracks.format.length.meters", length:@track.length) #{@track.length} %dt{:style => "cursor: help;", :"data-toggle" => "tooltip", :"data-placement" => "top", :title => t("rva.cars.features.stock-tooltip.tooltip")} - = t("rva.tracks.format.stock.title") + = t("rva.shared.stock.title") %dt %dd - = @track.stock ? t("rva.tracks.format.stock.true") : t("rva.tracks.format.stock.false") + = @track.stock ? t("misc.bool.true") : t("misc.bool.false") - if @track.season %i = t("rva.tracks.featured.description", season:@track.season.name) #{@track.season.name} diff --git a/app/views/users/_badges.haml b/app/views/users/_badges.haml index 5526202f..e7487bef 100644 --- a/app/views/users/_badges.haml +++ b/app/views/users/_badges.haml @@ -1,6 +1,6 @@ - if user.admin? - %a.label{:href => staff_path, :style => "background-color: #f89406; color: white;"} Administrator + %a.label{:href => staff_path, :style => "background-color: #f89406; color: white;"}= t(".admin") - if user.mod? - %a.label{:href => staff_path, :style => "background-color: #ff2200; color: white;"} Moderator + %a.label{:href => staff_path, :style => "background-color: #ff2200; color: white;"}= t(".mod") - if user.organizer? - %a.label{:href => staff_path, :style => "background-color: #36f971; color: white;"} Organizer + %a.label{:href => staff_path, :style => "background-color: #36f971; color: white;"}= t(".organizer") diff --git a/app/views/users/new.haml b/app/views/users/new.haml index c5274b02..39eb4b28 100644 --- a/app/views/users/new.haml +++ b/app/views/users/new.haml @@ -1,5 +1,6 @@ - content_for :title, "Re-Volt America - Import Users" -%h2.mb-4 Import Users +%h2.mb-4 + = t("users.import.title") = form_with :url => users_import_path, :method => :post do |f| .row @@ -7,4 +8,4 @@ .field.file-input-group = f.file_field :file, :accept => ".csv", :class => "form-control-file" - = f.button "Import", :type => "submit", :"data-turbo" => false, :class => "btn" + = f.button t("misc.submit.import"), :type => "submit", :"data-turbo" => false, :class => "btn" diff --git a/app/views/users/show.haml b/app/views/users/show.haml index 446e2d1f..6fce8ade 100644 --- a/app/views/users/show.haml +++ b/app/views/users/show.haml @@ -129,38 +129,38 @@ - if @user.profile.gender? .col-sm-6 %h6 - = t("registrations.edit.info.gender") + = t("devise.registrations.edit.profile.gender") %pre = @user.profile.gender - if @user.profile.location? .col-sm-6 %h6 - = t("registrations.edit.info.location") + = t("devise.registrations.edit.profile.location") %pre = @user.profile.location - if @user.profile.occupation? .col-sm-6 %h6 - = t("registrations.edit.info.occupation") + = t("devise.registrations.edit.profile.occupation") %pre = @user.profile.occupation - if @user.profile.interests? .col-sm-6 %h6 - = t("registrations.edit.info.interests") + = t("devise.registrations.edit.profile.interests") %pre = @user.profile.interests .row.info .col-md-12 .info %h6 - = t("registrations.edit.info.about", user: @user.username) + = t("devise.registrations.edit.profile.about", user: @user.username) - if @user.profile.about? %pre#about = render_safe(@user.profile.about) - else %pre - = t("registrations.edit.info.about-me.nothing") + = t("devise.registrations.edit.profile.about-me.nothing") #stats.tab-pane.fade{:"aria-labelledby" => "stats-tab", role: "tabpanel"} %h4.mt-4 = t("users.stats.race-stats.title") @@ -237,41 +237,42 @@ %br/ .field.form-group = f.check_box :admin - = f.label :admin + = f.label :admin, t("users.badges.admin") .field.form-group = f.check_box :mod - = f.label :mod + = f.label :mod, t("users.badges.mod") .field.form-group = f.check_box :organizer - = f.label :organizer + = f.label :organizer, t("users.badges.organizer") .field.form-group - = f.label :team + = f.label :team, t("results.team") = f.collection_select :team_id, Team.all, :id, :name, {:include_blank => true}, {:class => "form-control"} - %h6 Gender + %h6 + = t("devise.registrations.edit.profile.gender") .form-group - = profile.text_field :gender, :placeholder => 'Gender', :autocomplete => 'gender', :class => 'form-control' + = profile.text_field :gender, :placeholder => t("devise.registrations.edit.profile.gender"), :autocomplete => 'gender', :class => 'form-control' %h6 - Nationality + = t("devise.registrations.edit.profile.nationality.title") %small - (National flag) + = t("devise.registrations.edit.profile.nationality.small") .field.form-group = f.country_select :country, {:include_blank => true}, {:class => "form-control"} %h6 - = t("registrations.edit.info.location") + = t("devise.registrations.edit.profile.location") .form-group - = profile.text_field :location, :placeholder => t("registrations.edit.info.location"), :autocomplete => 'location', :class => 'form-control' + = profile.text_field :location, :placeholder => t("devise.registrations.edit.profile.location"), :autocomplete => 'location', :class => 'form-control' %h6 - = t("registrations.edit.info.occupation") + = t("devise.registrations.edit.profile.occupation") .form-group - = profile.text_field :occupation, :placeholder => t("registrations.edit.info.occupation"), :autocomplete => 'occupation', :class => 'form-control' + = profile.text_field :occupation, :placeholder => t("devise.registrations.edit.profile.occupation"), :autocomplete => 'occupation', :class => 'form-control' %h6 - = t("registrations.edit.info.interests") + = t("devise.registrations.edit.profile.interests") .form-group - = profile.text_field :interests, :placeholder => t("registrations.edit.info.interests"), :autocomplete => 'interests', :class => 'form-control' + = profile.text_field :interests, :placeholder => t("devise.registrations.edit.profile.interests"), :autocomplete => 'interests', :class => 'form-control' %h6 - = t("registrations.edit.info.public-email") + = t("devise.registrations.edit.profile.public-email") .form-group - = profile.text_field :public_email, :placeholder => t("registrations.edit.info.public-email"), :autocomplete => 'public_email', :class => 'form-control' + = profile.text_field :public_email, :placeholder => t("devise.registrations.edit.profile.public-email"), :autocomplete => 'public_email', :class => 'form-control' %h6 Discord .form-group = profile.text_field :discord, :placeholder => 'Discord', :autocomplete => 'discord', :class => 'form-control' @@ -301,10 +302,10 @@ .input-group-text steamcommunity.com/id/ = profile.text_field :steam, :autocomplete => 'steam', :class => 'form-control' %h6 - = t("registrations.edit.info.about-me.title") + = t("devise.registrations.edit.profile.about-me.title") .row .form-group - = profile.text_area :about, :placeholder => t("registrations.edit.info.about-me.placeholder"), :autocomplete => 'about_me', :class => 'form-control' + = profile.text_area :about, :placeholder => t("devise.registrations.edit.profile.about-me.placeholder"), :autocomplete => 'about_me', :class => 'form-control' .btn-toolbar .actions - = f.submit t("registrations.edit.update-admin", user: @user.username), :class => 'btn btn-sm' + = f.submit t("devise.registrations.edit.update-admin", user: @user.username), :class => 'btn btn-sm' diff --git a/config/locales/en.yml b/config/locales/en.yml index 07b59103..2d2e2432 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -290,6 +290,7 @@ en: all-tracks: "All Tracks" season: "Season" title: "The RVA Tracks" + no-tracks: "No tracks to display" format: title: "Format" short-name: @@ -307,16 +308,31 @@ en: long: "Long" extralong: "Extra Long" meters: "%{length} meters" - stock: - title: "Stock?" - true: "Yes" - false: "No" featured: description: "This track has been featured in RVA %{season}" rotation: title: "Re-Volt America Rotation" collection: title: "Re-Volt America Track Collection" + edit: + title: "Editing Track" + season: "Season" + name: "Name" + short-name: "Short name" + difficulty: "Difficulty" + length: "Length (meters)" + folder-name: "Folder name" + error: "Track could not be saved" + import: + title: "Import Tracks" + controller: + create: "Track was successfully created." + update: "Track was successfully updated." + destroy: "Track was successfully destroyed." + import: + exists: "No tracks were created. Maybe they already exist?" + success: "Tracks successfully imported." + cars: title: "The RVA Cars" ratings-link: "Car Ratings" @@ -332,6 +348,29 @@ en: featured-session: "This car has been featured in RVA %{season}" class-selector: title: "Classes" + shared: + placeholder: "Search..." + no-cars: "No cars to display" + edit: + title: "Editing Car" + button: "Edit Car" + season: "Season" + name: "Name" + folder-name: "Folder name" + update: "Update" + error: "Car could not be saved" + import: + title: "Import Cars" + controller: + create: "Car was successfully created." + update: "Car was successfully updated" + destroy: "Car was successfully destroyed." + import: + exists: "No cars were created. Maybe they already exist?" + success: "Cars successfully imported." + shared: + stock: + title: "Stock" # Assets page assets: @@ -375,6 +414,20 @@ en: bottom: title: "All Seasons" present: "Present" + edit: + title: "Editing season" + name: "Name" + start-date: "Start date" + end-date: "End date" + error: "Season could not be saved" + create: + title: "Create Season" + error: "prohibited this season from being saved" + controller: + create: "Season was successfully created." + update: "Season was successfully updated." + destroy: "Season was successfully deleted." + # Rankings page rankings: @@ -392,9 +445,45 @@ en: fj: "FJ" fp: "FP" sp: "SP" + stats: + title: "Global Stats" + sorted: "Sorted by:" + table: + wins: "Wins" + podiums: "Podiums" + win-ratio: "Win Ratio" + average-pos: "Average Pos" + race-count: "Race Count" + obtained-points: "Obtained Points" + official-score: "Official Score" + controller: + create: "Ranking was successfully created." + update: "Ranking was successfully updated." + delete: "Ranking was successfully deleted." + sessions: title: "Sessions" no-sessions: "No sessions to display :(" + edit: + title: "Editing Session" + host: "Host" + version: "Version" + physics: "Physics" + protocol: "Protocol" + number: "Number" + date: "Date" + update: "Update Session" + error: "Session could not be saved" + upload: + title: "Upload Session" + controller: + create: "Session was successfully created." + update: "Session was successfully updated." + delete: "'Session was successfully deleted." + import: + success: "Session was successfully imported." + + results: no-team-results: "No team results to disiplay" nav: @@ -424,6 +513,19 @@ en: author: "Author" description: "Description" when: "When" + ago: "ago" + new: + title: "New Repository" + placeholder: + title: "Title" + description: "Description" + namespace: "Namespace" + branch: "branch" + create: "Create" + controller: + create: "Repository was successfully created." + update: "Repository was successfully updated." + destroy: "Repository was successfully destroyed." # RVA results page results: @@ -467,6 +569,31 @@ en: team: leader: "Leader" members: "Members" + table: + name: "Name" + country: "Country" + role: + title: "Role" + leader: "Leader" + member: "Member" + edit: + title: "Editing Team" + name: "Name" + short-name: "Short name" + color: "Color" + team-img: "Team image" + leader: "Leader" + add-member: "Add Member" + edit-team: "Edit Team" + create: "Create Team" + error: "Team could not be saved" + new: + title: "New Team" + controller: + create: "Team was successfully created." + update: "Team was successfully updated." + destroy: "Team was successfully destroyed." + add-member: "%{member} was successfully added to %{team}" # User profile page users: @@ -506,11 +633,44 @@ en: title: "General" stats: "Stats" admin: "Admin" + badges: + admin: "Administrator" + mod: "Mod" + organizer: "Organizer" + import: + title: "Import users" + controller: + update: + leader: "%{user} is the leader of %{team}, therefore they cannot be removed from it" + locale: "Language set to %{locale}" + success: "User successfully updated." + import: + exists: "No users were created. Maybe the file format is incorrect?" + success: "Users successfully imported." + # Tournaments page tournaments: title: "Past Tournaments" - new: "New" + no-tournaments: "No tournaments to display" + notice: "notice" + edit: + title: "Editing Tournament" + name: "Name" + date: "Date" + season: "Season" + banner: "Tournament banner" + format: "Format" + save: "Save Tournament" + error: "prohibited this tournament from being saved:" + new: + title: "New Tournament" + button: "New Tournament" + controller: + create: "Tournament was successfully created." + update: "Tournament was successfully updated." + destroy: "Tournament was successfully destroyed." + # Re-Volt car classes classes: @@ -730,6 +890,29 @@ en: download: "Download" search: "Search" and: "&" + bool: + true: "Yes" + false: "No" + prompt: + season: "Select Season" + ranking: "Select Ranking" + category: "Select Category" + leader: "Select Leader" + difficulty: "Select Difficulty" + submit: + import: "Import" + update: "Update" + checkbox: + teams: "Teams" + button: + back: "Back" + new: "New" + controller: + import: + select: "You must select a CSV file." + upload: "You may only upload CSV files." + season: "You must select a Season." + category: "You must select a Category." # Kaminari helpers: