Refactor courses
This commit is contained in:
@@ -51,7 +51,7 @@ module WikiUFC
|
||||
|
||||
["#900", "#c00", "#444", "#888"],
|
||||
|
||||
# Aqua
|
||||
# Aqua
|
||||
["#7b7", "#455", "#899", "#abb"],
|
||||
["#005B9A", "#455", "#899", "#abb"],
|
||||
["#8D009A", "#455", "#899", "#abb"],
|
||||
@@ -76,6 +76,8 @@ module WikiUFC
|
||||
# Templates
|
||||
config.initial_wiki_pages = ['Ementa', 'Notas de Aula']
|
||||
config.initial_wiki_page_content = 'Página em branco.'
|
||||
|
||||
config.i18n.default_locale = 'pt-BR'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -85,4 +87,3 @@ require "haml"
|
||||
require "haml/template"
|
||||
Haml::Template.options[:escape_attrs] = false
|
||||
Haml::Template.options[:escape_html] = false
|
||||
|
||||
|
||||
11
config/database.yml
Normal file
11
config/database.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
development:
|
||||
adapter: sqlite3
|
||||
database: db/wiki.sqlite3
|
||||
|
||||
test:
|
||||
adapter: sqlite3
|
||||
database: db/test.sqlite3
|
||||
|
||||
production:
|
||||
adapter: sqlite3
|
||||
database: db/wiki.sqlite3
|
||||
@@ -1,5 +1,3 @@
|
||||
#require 'brI18n'
|
||||
|
||||
WikiUFC::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#require 'brI18n'
|
||||
|
||||
WikiUFC::Application.configure do
|
||||
# Settings specified here will take precedence over those in config/application.rb
|
||||
|
||||
@@ -67,4 +65,3 @@ WikiUFC::Application.configure do
|
||||
# with SQLite, MySQL, and PostgreSQL)
|
||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
||||
end
|
||||
|
||||
|
||||
@@ -34,4 +34,6 @@ WikiUFC::Application.configure do
|
||||
|
||||
# Print deprecation notices to the stderr
|
||||
config.active_support.deprecation = :stderr
|
||||
|
||||
config.i18n.default_locale = 'en'
|
||||
end
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
require 'ostruct'
|
||||
::App = OpenStruct.new
|
||||
|
||||
# Define os campos essenciais
|
||||
required_fields = %w(
|
||||
title
|
||||
language
|
||||
max_upload_file_size
|
||||
default_color
|
||||
)
|
||||
|
||||
# Carrega as configuracoes personalizadas
|
||||
require "#{RAILS_ROOT}/config/application.rb"
|
||||
|
||||
# Verifica se todas os campos essenciais foram instanciados
|
||||
required_fields.each do |field|
|
||||
raise "Required configuration not found: App.#{field}" unless App.respond_to?(field)
|
||||
end
|
||||
|
||||
# Internacionalizacao
|
||||
#Gibberish.current_language = App.language if RAILS_ENV != 'test'
|
||||
@@ -1,21 +0,0 @@
|
||||
#TzTime.zone = TZInfo::Timezone.new("America/Fortaleza")
|
||||
|
||||
class Time
|
||||
alias :strftime_nolocale :strftime
|
||||
|
||||
def strftime(format)
|
||||
format = format.dup
|
||||
format.gsub!(/%a/, Date::ABBR_DAYNAMES[self.wday])
|
||||
format.gsub!(/%A/, Date::DAYNAMES[self.wday])
|
||||
format.gsub!(/%b/, Date::ABBR_MONTHNAMES[self.mon])
|
||||
format.gsub!(/%B/, Date::MONTHNAMES[self.mon])
|
||||
self.strftime_nolocale(format)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!(
|
||||
:default => '%d/%m/%Y %H:%M',
|
||||
:date_time12 => "%d/%m/%Y %I:%M%p",
|
||||
:date_time24 => "%d/%m/%Y %H:%M"
|
||||
)
|
||||
@@ -1,19 +0,0 @@
|
||||
# Be sure to restart your server when you modify this file.
|
||||
|
||||
# These settings change the behavior of Rails 2 apps and will be defaults
|
||||
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
||||
|
||||
if defined?(ActiveRecord)
|
||||
# Include Active Record class name as root for JSON serialized output.
|
||||
ActiveRecord::Base.include_root_in_json = true
|
||||
|
||||
# Store the full class name (including module namespace) in STI type column.
|
||||
ActiveRecord::Base.store_full_sti_class = true
|
||||
end
|
||||
|
||||
# Use ISO 8601 format for JSON serialized times and dates.
|
||||
ActiveSupport.use_standard_json_time_format = true
|
||||
|
||||
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
||||
# if you're including raw json in an HTML page.
|
||||
ActiveSupport.escape_html_entities_in_json = false
|
||||
@@ -4,6 +4,8 @@ pt-BR:
|
||||
course_created: Disciplina cadastrada
|
||||
course_updated: Disciplina editada
|
||||
course_removed: Disciplina excluída
|
||||
edit_course: Editar disciplina
|
||||
new_course: Cadastrar disciplina
|
||||
|
||||
event: evento
|
||||
events: eventos
|
||||
@@ -29,22 +31,32 @@ pt-BR:
|
||||
attachment_updated: Arquivo editado
|
||||
attachment_removed: Arquivo excluído
|
||||
attachment_restored: Arquivo restaurado
|
||||
create_attachment: Adicionar arquivo
|
||||
see_all_attachments: Ver todos os arquivos
|
||||
no_attachments: Nenhum arquivo
|
||||
repository: Repositório de Arquivos
|
||||
|
||||
wiki_page: Página wiki
|
||||
wiki_pages: Páginas wiki
|
||||
wiki_page_created: Página wiki criada
|
||||
wiki_page_removed: Página wiki removida
|
||||
wiki_page_updated: Página wiki atualizada
|
||||
wiki_page_restored: Página wiki restaurada
|
||||
create_wiki_page: Adicionar página wiki
|
||||
see_all_wiki_pages: Ver todas as páginas wiki
|
||||
no_wiki_pages: Nenhuma página wiki
|
||||
|
||||
recent_changes: Mudanças recentes
|
||||
log_about: Mudanças recentes em {disciplina}
|
||||
|
||||
undo: Desfazer
|
||||
login_failed: Não foi possível fazer login
|
||||
login_required: É necessário fazer login para acessar esta área do site
|
||||
login_success: Olá, {u}!
|
||||
logout_success: Você fez logout
|
||||
|
||||
move_up: Mover para cima
|
||||
move_down: Mover para baixo
|
||||
|
||||
navigation: navegação
|
||||
forums: fórums
|
||||
|
||||
@@ -55,6 +67,9 @@ pt-BR:
|
||||
is_too_large: é grande demais
|
||||
is_needed: é requerido
|
||||
|
||||
undo: Desfazer
|
||||
create: Cadastrar
|
||||
|
||||
body: conteúdo
|
||||
code: código
|
||||
content: conteúdo
|
||||
@@ -70,22 +85,21 @@ pt-BR:
|
||||
short_name: nome abreviado
|
||||
time: horário
|
||||
title: título
|
||||
edit: Editar
|
||||
|
||||
logged_in_as: Identificado como %{u}
|
||||
logged_in_as: Bem vindo %{u}
|
||||
member_since: Membro desde %{c}
|
||||
last_seen: Última visita há %{c}
|
||||
welcome_back: Bem vindo %{u}
|
||||
dashboard: Dashboard
|
||||
|
||||
number:
|
||||
human:
|
||||
storage_units:
|
||||
format: "%n %u"
|
||||
units:
|
||||
byte:
|
||||
one: "Byte"
|
||||
other: "Bytes"
|
||||
kb: "KB"
|
||||
mb: "MB"
|
||||
gb: "GB"
|
||||
tb: "TB"
|
||||
activerecord:
|
||||
attributes:
|
||||
course:
|
||||
short_name: Nome abreviado
|
||||
full_name: Nome completo
|
||||
description: Descrição
|
||||
code: Código
|
||||
grade: Semestre
|
||||
period: Data
|
||||
hidden: Oculto
|
||||
|
||||
Reference in New Issue
Block a user