1
0
Fork 0

I don't know what is there. I'm just drunk, dammit.

This commit is contained in:
magnolia-fan 2011-09-13 01:35:46 +04:00
parent 79f57959a8
commit 6c8831618e
8 changed files with 95 additions and 29 deletions

View File

@ -1,2 +1,2 @@
.alert-message.error .alert-message.error
%p Something very bad happened, sorry :( %p= I18n.t 'search.fail'

View File

@ -1,6 +1,6 @@
- if @loading - if @loading
.alert-message.warning .alert-message.warning
%p Artist info is loading for the first time. Please, be patient! :) %p= I18n.t 'search.loading'
.row.artist-info .row.artist-info
.span4.columns.pic .span4.columns.pic
= image_tag @artist[:artist][:pic] unless @artist[:artist][:pic].nil? = image_tag @artist[:artist][:pic] unless @artist[:artist][:pic].nil?
@ -14,7 +14,7 @@
.span4.columns.art .span4.columns.art
%img{ :src => album[:pic] } %img{ :src => album[:pic] }
.button-container .button-container
%a.btn Add to playlist %a.btn= I18n.t 'player.add'
.span7.columns.tracks .span7.columns.tracks
%h3= album[:name] + " (" + album[:year].to_s + ")" %h3= album[:name] + " (" + album[:year].to_s + ")"
%table.zebra-striped.tracklist %table.zebra-striped.tracklist

View File

@ -1,5 +1,5 @@
.alert-message.warning .alert-message.warning
%p Made a typo? %p= I18n.t 'search.typo'
%ul.suggestions %ul.suggestions
- @suggestions.each do |artist| - @suggestions.each do |artist|

View File

@ -18,11 +18,11 @@
%a{ :href => "#/" } BeatHaven %a{ :href => "#/" } BeatHaven
%ul.nav %ul.nav
%li %li
%a{ :href => "http://blog.beathaven.org/", :"data-ls" => "NEWS" } Blog %a{ :href => "http://blog.beathaven.org/" }= I18n.t 'global.news'
%li %li
%a.about{ :href => "#/about/" } About %a.about{ :href => "#/about/" }= I18n.t 'global.about'
%form#search-form{ :action => "" } %form#search-form{ :action => "" }
%input#search{ :type => "text", :placeholder => "Search" } %input#search{ :type => "text", :placeholder => I18n.t('global.search') }
#artist-load-spinner #artist-load-spinner
= image_tag "artist_loader.gif" = image_tag "artist_loader.gif"
%ul.nav.secondary-nav %ul.nav.secondary-nav
@ -30,10 +30,10 @@
%a.dropdown-toggle#username{ :href => "#" } %username% %a.dropdown-toggle#username{ :href => "#" } %username%
%ul.dropdown-menu %ul.dropdown-menu
%li %li
%a#preferences{ :href => "#" } Preferences %a#preferences{ :href => "#" }= I18n.t 'global.settings'
%li.divider %li.divider
%li %li
%a#logout{ :href => "#" } Logout %a#logout{ :href => "#" }= I18n.t 'global.logout'
.popover-wrapper .popover-wrapper
.popover.below#autocomplete-container .popover.below#autocomplete-container

View File

@ -1,63 +1,63 @@
%h1 Settings %h1 Settings
%ul.tabs#settings-tabs %ul.tabs#settings-tabs
%li.active %li.active
%a{ :href => "#", :'data-tab' => 'account' } Account %a{ :href => "#", :'data-tab' => 'account' }= I18n.t 'settings.tab.account'
%li %li
%a{ :href => "#", :'data-tab' => 'site' } Site %a{ :href => "#", :'data-tab' => 'site' }= I18n.t 'settings.tab.site'
%li %li
%a{ :href => "#", :'data-tab' => 'music' } Music %a{ :href => "#", :'data-tab' => 'music' }= I18n.t 'settings.tab.music'
%li %li
%a{ :href => "#", :'data-tab' => 'lastfm' } Last.fm %a{ :href => "#", :'data-tab' => 'lastfm' }= I18n.t 'settings.tab.lastfm'
.forms#settings-forms .forms#settings-forms
.form.account .form.account
%form %form
%fieldset %fieldset
.clearfix .clearfix
%label{ :for => "name" } Username %label{ :for => "name" }= I18n.t 'settings.username'
.input .input
%input.xlarge#name{ :name => "name", :size => 30, :type => "text", :value => @user.name } %input.xlarge#name{ :name => "name", :size => 30, :type => "text", :value => @user.name }
.clearfix .clearfix
%label{ :for => "email" } Email %label{ :for => "email" }= I18n.t 'settings.email'
.input .input
%input.xlarge#email{ :name => "email", :size => 30, :type => "text", :value => @user.email } %input.xlarge#email{ :name => "email", :size => 30, :type => "text", :value => @user.email }
.form.site .form.site
%form %form
%fieldset %fieldset
.clearfix .clearfix
%label{ :for => "lang" } Language %label{ :for => "lang" }= I18n.t 'settings.lang.title'
.input .input
%select.medium#lang{ :name => "lang" } %select.medium#lang{ :name => "lang" }
%option{ :value => "en", :selected => (@user.lang == 'en') } English %option{ :value => "en", :selected => (@user.lang == 'en') }= I18n.t 'settings.lang.en'
%option{ :value => "ru", :selected => (@user.lang == 'ru') } Русский %option{ :value => "ru", :selected => (@user.lang == 'ru') }= I18n.t 'settings.lang.ru'
.form.music .form.music
%form %form
%fieldset %fieldset
.clearfix .clearfix
%label{ :for => "album_types" } Show %label{ :for => "album_types" }= I18n.t 'settings.show'
.input .input
%ul.inputs-list %ul.inputs-list
%li %li
%label.disabled %label.disabled
%input{ :name => "show_album", :type => "checkbox", :checked => "checked", :disabled => "disabled" } %input{ :name => "show_album", :type => "checkbox", :checked => "checked", :disabled => "disabled" }
%span Albums %span= I18n.t 'settings.music.albums'
%li %li
%label %label
%input{ :name => "show_single", :type => "checkbox", :disabled => "disabled" } %input{ :name => "show_single", :type => "checkbox", :disabled => "disabled" }
%span Singles %span= I18n.t 'settings.music.singles'
%li %li
%label %label
%input{ :name => "show_live", :type => "checkbox", :disabled => "disabled" } %input{ :name => "show_live", :type => "checkbox", :disabled => "disabled" }
%span Live shows %span= I18n.t 'settings.music.live'
%li %li
%label %label
%input{ :name => "show_bootleg", :type => "checkbox", :disabled => "disabled" } %input{ :name => "show_bootleg", :type => "checkbox", :disabled => "disabled" }
%span Bootlegs %span= I18n.t 'settings.music.bootlegs'
.form.lastfm .form.lastfm
%form %form
%fieldset %fieldset
.clearfix .clearfix
%label{ :for => "lastfm_username" } Username %label{ :for => "lastfm_username" }= I18n.t 'settings.username'
.input .input
.input-append .input-append
%input#lastfm_username{ :name => "lastfm_username", :type => "text", :disabled => "disabled", :value => @user.lastfm_username } %input#lastfm_username{ :name => "lastfm_username", :type => "text", :disabled => "disabled", :value => @user.lastfm_username }

View File

@ -31,7 +31,7 @@ module Beathaven
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # 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.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de config.i18n.default_locale = :ru
# Configure the default encoding used in templates for Ruby 1.9. # Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8" config.encoding = "utf-8"

View File

@ -1,5 +1,39 @@
# Sample localization file for English. Add more files in this directory for other locales.
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
en: en:
hello: "Hello world" global:
search: "Search"
news: "News"
about: "About"
login: "Log in"
logout: "Log out"
do_add: "Add some music to playlist"
do_login: "Don't forget to log in, please. It's simple."
repeat: "Repeat"
shuffle: "Shuffle"
do_empty: "Empty playlist"
hello: "Hi there"
settings: "Settings"
search:
fail: "Something very bad happened while we tried out to load some info about this artist. How about some other one?"
loading: "Artist info is loading for the first time now. Usually it takes less than a minute, please wait a bit."
typo: "Misspelled?"
settings:
tab:
account: "Account"
site: "Site"
music: "Music"
lastfm: "Last.fm"
music:
albums: "Albums"
username: "Username"
email: "Email"
lang:
title: "Language"
en: "English"
ru: "Russian"
save: "Hello, my name is Useless Button"
not_connected: "Not connected"
connect: "Connect"
reload_alert: "To change application language it is needed to reload page. Your current playlist will be emptied and music will stop. Do you really wish to continue?"
player:
add: "Add to Now Playing"

32
config/locales/ru.yml Normal file
View File

@ -0,0 +1,32 @@
ru:
global:
search: "Поиск"
news: "Новости"
about: "О проекте"
login: "Войти"
logout: "Выйти"
do_add: "Добавьте музыку в плей-лист"
do_login: "Авторизуйтесь, пожалуйста. Это действительно просто."
repeat: "Повторять"
shuffle: "Перемешать"
do_empty: "Очистить"
hello: "Привет"
settings: "Настройки"
search:
fail: "Что-то ужасное произошло пока мы собирали информацию об этом исполнителе. Может пока поищем другого?"
loading: "Прямо сейчас мы собираем всю возможною информацию об этом исполнителе в первый раз. Обычно это занимает меньше минуты."
typo: "Опечатались?"
settings:
account: "Аккаунт"
lastfm: "Last.fm"
username: "Имя"
email: "Почта"
lang: "Язык"
not_connected: "Не подключен"
do_connect: "Подключить"
reload_alert: "Чтобы изменить язык приложения, необходимо перезагрузить страницу. Ваш текущий плей-лист будет очищен и музыка остановится. Вы действительно хотите продолжить?"
player:
do_add: "Добавить в плей-лист"