Commit 939584b5 by Mykhailo Makohin

start ti translete active admin

parent f4a37c54
class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
before_action :set_locale
def set_locale
I18n.locale = params[:locale] || I18n.default_locale
......
class HomeController < ApplicationController
def index
puts current_user.present?
end
end
\ No newline at end of file
......@@ -26,7 +26,7 @@
%link{:href => "favicons/apple-touch-icon180.png", :rel => "apple-touch-icon", :sizes => "180x180"}
%body
= render 'partials/modal'
- if current_page?(root_path)
- if current_page?('/') || current_page?('/en') || current_page?('/uk')
= render 'partials/black_header'
- else
= render 'partials/white_header'
......
......@@ -34,7 +34,7 @@
%li.active
%a{"data-toggle" => "tab", :href => "#1"}= t 'header.people'
%li
%a{"data-toggle" => "tab", :href => "#2"} Бізнеси
%a{"data-toggle" => "tab", :href => "#2"}= t 'header.businesses'
.show_tip
Ознайомтесь з дружніми бізнесами
які допомагають формувати
......@@ -55,12 +55,12 @@
%ul.dropdown-menu{"aria-labelledby" => "dropdownMenu1"}
- if current_user.admin?
%li
%a{:href => "/admin"} Адмін панель
%a{:href => "/admin"}= t 'header.admin'
%li
%a{:href => "#"} Профіль
%a{:href => "#"}= t 'header.profile'
%li
= link_to('Вийти', destroy_user_session_path, method: :delete)
= link_to("#{t 'header.log_out'}", destroy_user_session_path, method: :delete)
.search_block
%input#search_field.search_field{:placeholder => "Пошук за іменем... ", :type => "text"}/
%input#search_field.search_field{placeholder: "#{t 'header.find_by_name'}", :type => "text"}/
%button.search_btn
%i.icon.icon_search
\ No newline at end of file
......@@ -11,5 +11,7 @@ Bundler.require(*Rails.groups)
module WarmCity
class Application < Rails::Application
config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
I18n.available_locales = [:uk, :en]
config.i18n.default_locale = :uk
end
end
en:
activerecord:
models:
comment:
one: "Comment"
other: "Comments"
active_admin/comment:
one: "Comment"
other: "Comments"
attributes:
active_admin/comment:
author_type: "Author type"
body: "Body"
created_at: "Created"
namespace: "Namespace"
resource_type: "Resource type"
updated_at: "Updated"
active_admin:
dashboard: "Dashboard"
dashboard_welcome:
welcome: "Welcome to Active Admin. This is the default dashboard page."
call_to_action: "To add dashboard sections, checkout 'app/admin/dashboard.rb'"
view: "View"
edit: "Edit"
delete: "Delete"
delete_confirmation: "Are you sure you want to delete this?"
create_another: "Create another %{model}"
new_model: "New %{model}"
edit_model: "Edit %{model}"
delete_model: "Delete %{model}"
details: "%{model} Details"
cancel: "Cancel"
empty: "Empty"
previous: "Previous"
next: "Next"
download: "Download:"
has_many_new: "Add New %{model}"
has_many_delete: "Delete"
has_many_remove: "Remove"
move: "Move"
filters:
buttons:
filter: "Filter"
clear: "Clear Filters"
predicates:
contains: "Contains"
equals: "Equals"
starts_with: "Starts with"
ends_with: "Ends with"
greater_than: "Greater than"
less_than: "Less than"
gteq_datetime: "Greater or equal to"
lteq_datetime: "Lesser or equal to"
from: "From"
to: "To"
scopes:
all: "All"
search_status:
headline: "Search status:"
current_scope: "Scope:"
current_filters: "Current filters:"
no_current_filters: "None"
status_tag:
"yes": "Yes"
"no": "No"
"unset": "No"
main_content: "Please implement %{model}#main_content to display content."
logout: "Logout"
powered_by: "Powered by %{active_admin} %{version}"
sidebars:
filters: "Filters"
search_status: "Search Status"
pagination:
empty: "No %{model} found"
one: "Displaying <b>1</b> %{model}"
one_page: "Displaying <b>all %{n}</b> %{model}"
multiple: "Displaying %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> of <b>%{total}</b> in total"
multiple_without_total: "Displaying %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
per_page: "Per page: "
entry:
one: "entry"
other: "entries"
any: "Any"
blank_slate:
content: "There are no %{resource_name} yet."
link: "Create one"
dropdown_actions:
button_label: "Actions"
batch_actions:
button_label: "Batch Actions"
default_confirmation: "Are you sure you want to do this?"
delete_confirmation: "Are you sure you want to delete these %{plural_model}?"
succesfully_destroyed:
one: "Successfully destroyed 1 %{model}"
other: "Successfully destroyed %{count} %{plural_model}"
selection_toggle_explanation: "(Toggle Selection)"
action_label: "%{title} Selected"
labels:
destroy: "Delete"
comments:
created_at: "Created"
resource_type: "Resource Type"
author_type: "Author Type"
body: "Body"
author: "Author"
add: "Add Comment"
delete: "Delete Comment"
delete_confirmation: "Are you sure you want to delete these comment?"
resource: "Resource"
no_comments_yet: "No comments yet."
author_missing: "Anonymous"
title_content: "Comments (%{count})"
errors:
empty_text: "Comment wasn't saved, text was empty."
devise:
username:
title: "Username"
email:
title: "Email"
subdomain:
title: "Subdomain"
password:
title: "Password"
password_confirmation:
title: "Confirm Password"
sign_up:
title: "Sign up"
submit: "Sign up"
login:
title: "Login"
remember_me: "Remember me"
submit: "Login"
reset_password:
title: "Forgot your password?"
submit: "Reset My Password"
change_password:
title: "Change your password"
submit: "Change my password"
unlock:
title: "Resend unlock instructions"
submit: "Resend unlock instructions"
resend_confirmation_instructions:
title: "Resend confirmation instructions"
submit: "Resend confirmation instructions"
links:
sign_up: "Sign up"
sign_in: "Sign in"
forgot_your_password: "Forgot your password?"
sign_in_with_omniauth_provider: "Sign in with %{provider}"
resend_unlock_instructions: "Resend unlock instructions"
resend_confirmation_instructions: "Resend confirmation instructions"
unsupported_browser:
headline: "Please note that ActiveAdmin no longer supports Internet Explorer versions 8 or less."
recommendation: "We recommend that you <a href=\"http://browsehappy.com/\">upgrade your browser</a> to improve your experience."
turn_off_compatibility_view: "If you are using IE 9 or later, make sure you <a href=\"https://support.microsoft.com/en-us/help/17471\">turn off \"Compatibility View\"</a>."
access_denied:
message: "You are not authorized to perform this action."
index_list:
table: "Table"
block: "List"
grid: "Grid"
blog: "Blog"
\ No newline at end of file
uk:
active_admin:
dashboard: "Панель керування"
dashboard_welcome:
welcome: "Ласкаво просимо до Active Admin. Це стандартна сторінка керування сайтом."
call_to_action: "Щоб додати сюди що-небудь, зазирніть у 'app/admin/dashboard.rb'"
view: "Переглянути"
edit: "Змінити"
delete: "Видалити"
delete_confirmation: "Ви впевнені, що хочете це видалити?"
new_model: "Створити %{model}"
edit_model: "Змінити %{model}"
delete_model: "Видалити %{model}"
details: "%{model} детальніше"
cancel: "Скасувати"
empty: "Пусто"
previous: "Поперед."
next: "Наст."
download: "Завантаження:"
has_many_new: "Додати %{model}"
has_many_delete: "Прибрати"
has_many_remove: "Видалити"
filters:
buttons:
filter: "Фільтрувати"
clear: "Очистити"
predicates:
contains: "Містить"
equals: "="
starts_with: "Починається з"
ends_with: "Закінчується"
greater_than: "більше"
less_than: "менше"
from: "від"
to: "до"
search_status:
headline: "Статус пошуку:"
current_scope: "Область:"
current_filters: "Поточний фільтр:"
no_current_filters: "Жоден"
status_tag:
"yes": "Так"
"no": "Ні"
"unset": "Ні"
main_content: "Створіть %{model}#main_content для відображення вмісту."
logout: "Вийти"
powered_by: "Powered by %{active_admin} %{version}"
sidebars:
filters: "Фільтри"
search_status: "Статус пошуку"
pagination:
empty: "%{model} не знайдено"
one: "Результат: <b>1</b> %{model}"
one_page: "Результат: <b>%{n}</b> %{model}"
multiple: "Результат: %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b> з <b>%{total}</b>"
multiple_without_total: "Результат: %{model} <b>%{from}&nbsp;-&nbsp;%{to}</b>"
entry:
one: "запис"
few: "записи"
many: "записів"
other: "записів"
any: "Будь-який"
blank_slate:
content: "Поки-що немає %{resource_name}."
link: "Створити"
dropdown_actions:
button_label: "Oперації"
batch_actions:
button_label: "Групові операції"
default_confirmation: "Ви справді бажаєте це зробити?"
delete_confirmation: "Ви впевнені, що хочете видалити %{plural_model}?"
succesfully_destroyed:
one: "Успішно видалено: 1 %{model}"
few: "Успішно видалено: %{count} %{plural_model}"
many: "Успішно видалено: %{count} %{plural_model}"
other: "Успішно видалено: %{count} %{plural_model}"
selection_toggle_explanation: "(Скасувати все / Зняти виділення)"
action_label: "%{title} вибране"
labels:
destroy: "Видалити"
comments:
resource_type: "Тип ресурса"
author_type: "Тип автора"
body: "Текст"
author: "Автор"
add: "Додати Коментар"
resource: "Ресурс"
no_comments_yet: "Поки-що немає коментарів."
author_missing: "Анонім"
title_content: "Коментарі (%{count})"
errors:
empty_text: "Коментар не збережено, текст не повинен бути пустим."
devise:
username:
title: "Ім'я користувача"
email:
title: "Електронна пошта"
subdomain:
title: "Піддомен"
password:
title: "Пароль"
sign_up:
title: "Зареєструватися"
submit: "Зареєструватися"
login:
title: "Вхід"
remember_me: "Запам'ятати мене"
submit: "Увійти"
reset_password:
title: "Забули пароль?"
submit: "Скинути пароль"
change_password:
title: "Зміна паролю"
submit: "Змінити пароль"
unlock:
title: "Відправити повторно інструкції з розблокування"
submit: "Відправити повторно інструкції з розблокування"
resend_confirmation_instructions:
title: "Відправити повторно листа з активацією"
submit: "Відправити повторно листа з активацією"
links:
sign_up: "Зареєструватись"
sign_in: "Увійти"
forgot_your_password: "Забули пароль?"
sign_in_with_omniauth_provider: "Увійти з допомогою %{provider}"
resend_unlock_instructions: "Повторна відправка інструкцій розблокування"
resend_confirmation_instructions: "Повторна відправка інструкцій підтвердження"
unsupported_browser:
headline: "Зверніть, будь-ласка, увагу, що ActiveAdmin більше не підтримує Internet Explorer 8 версії і нижче"
recommendation: "Ми рекомендуємо оновити версію вашого браузеру (<a href=\"http://windows.microsoft.com/ie\">Internet Explorer</a>, <a href=\"https://chrome.google.com/\">Google Chrome</a>, або <a href=\"https://mozilla.org/firefox/\">Firefox</a>)."
turn_off_compatibility_view: "Якщо ви використовуєте IE 9 і вище, переконайтесь, що <a href=\"https://support.microsoft.com/uk-ua/help/17471\">ви вимкнули опцію \"Перегляд в режимі сумісності\"</a>."
access_denied:
message: "Ви не авторизовані для виконання даної дії."
index_list:
table: "Таблиця"
block: "Список"
grid: "Сітка"
blog: "Блог"
\ No newline at end of file
en:
header:
platfform: 'about platform'
grants: 'grants'
projects: 'projects'
partners: 'partners'
digital: 'digital workshop'
about_us: 'about us'
news: 'news'
reports: 'reports'
people: 'People'
businesses: 'Businesses'
\ No newline at end of file
uk:
header:
platfform: 'про платформу'
grants: 'Ґранти'
projects: 'Проекти'
partners: 'Партнери'
digital: 'DIGITAL WORKSHOP'
about_us: 'Про нас'
news: 'Новини'
reports: 'Звіти'
people: 'Люди'
businesses: 'Бізнеси'
uk:
header:
platfform: 'про платформу'
en:
header:
platfform: 'about platform'
\ No newline at end of file
en:
header:
platfform: 'about platform'
grants: 'grants'
projects: 'projects'
partners: 'partners'
digital: 'digital workshop'
about_us: 'about us'
news: 'news'
reports: 'reports'
people: 'People'
businesses: 'Businesses'
find_by_name: 'Find by name'
profile: 'Profile'
admin: 'Admin panel'
log_out: 'Log out'
\ No newline at end of file
uk:
header:
platfform: 'про платформу'
grants: 'Ґранти'
projects: 'Проекти'
partners: 'Партнери'
digital: 'DIGITAL WORKSHOP'
about_us: 'Про нас'
news: 'Новини'
reports: 'Звіти'
people: 'Люди'
businesses: 'Бізнеси'
find_by_name: 'Пошук за іменем...'
profile: 'Профіль'
admin: 'Адмін панель'
log_out: 'Вихід'
\ No newline at end of file
en:
header:
platfform: 'about platform'
grants: 'grants'
projects: 'projects'
partners: 'partners'
digital: 'digital workshop'
about_us: 'about us'
news: 'news'
reports: 'reports'
find_by_name: 'Find by name'
\ No newline at end of file
uk:
header:
platfform: 'про платформу'
grants: 'Ґранти'
projects: 'Проекти'
partners: 'Партнери'
digital: 'DIGITAL WORKSHOP'
about_us: 'Про нас'
news: 'Новини'
reports: 'Звіти'
find_by_name: 'Пошук за іменем...'
uk:
header:
platfform: 'про платформу'
Rails.application.routes.draw do
ActiveAdmin.routes(self)
devise_for :users, controllers: {omniauth_callbacks: "users/omniauth_callbacks",
registrations: "users"}
scope "(:locale)", locale: /en|uk/ do
root 'home#index'
resources :users
end
root 'home#index'
resources :users
ActiveAdmin.routes(self)
end
devise_for :users, controllers: {omniauth_callbacks: "users/omniauth_callbacks",
registrations: "users"}
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment