From 8cb2753158dc17cbb72691ef77fc1fb10034bbd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Geonizeli?= Date: Wed, 27 Jul 2022 21:36:08 -0300 Subject: [PATCH] add i18n to models --- app/admin/questions.rb | 29 ++++++++++ .../pt-BR.yml} | 0 config/locales/defaults/pt-BR.yml | 4 ++ .../locales/{devise.en.yml => devise/en.yml} | 0 config/locales/models/axis/pt-BR.yml | 9 ++++ config/locales/models/category/pt-BR.yml | 9 ++++ config/locales/models/question/pt-BR.yml | 53 +++++++++++++++++++ config/locales/models/subject/pt-BR.yml | 11 ++++ config/locales/models/user/pt-BR.yml | 19 +++++++ 9 files changed, 134 insertions(+) create mode 100644 app/admin/questions.rb rename config/locales/{activeadmin.pt-BR.yml => activeadmin/pt-BR.yml} (100%) create mode 100644 config/locales/defaults/pt-BR.yml rename config/locales/{devise.en.yml => devise/en.yml} (100%) create mode 100644 config/locales/models/axis/pt-BR.yml create mode 100644 config/locales/models/category/pt-BR.yml create mode 100644 config/locales/models/question/pt-BR.yml create mode 100644 config/locales/models/subject/pt-BR.yml create mode 100644 config/locales/models/user/pt-BR.yml diff --git a/app/admin/questions.rb b/app/admin/questions.rb new file mode 100644 index 0000000..48d11a3 --- /dev/null +++ b/app/admin/questions.rb @@ -0,0 +1,29 @@ +ActiveAdmin.register Question do + permit_params :authorship, :authorship_year, :check_type, :difficulty, :status, :subject_id + + index do + selectable_column + id_column + column :user + column :subject + column :bloom_taxonomy + column :check_type + column :difficulty + column :status + column :created_at + column :updated_at + actions + end + + form do |f| + f.inputs do + f.input :authorship + f.input :authorship_year + f.input :check_type + f.input :difficulty + f.input :status + f.input :subject + end + f.actions + end +end diff --git a/config/locales/activeadmin.pt-BR.yml b/config/locales/activeadmin/pt-BR.yml similarity index 100% rename from config/locales/activeadmin.pt-BR.yml rename to config/locales/activeadmin/pt-BR.yml diff --git a/config/locales/defaults/pt-BR.yml b/config/locales/defaults/pt-BR.yml new file mode 100644 index 0000000..f7a71d0 --- /dev/null +++ b/config/locales/defaults/pt-BR.yml @@ -0,0 +1,4 @@ +pt-BR: + attributes: + created_at: Criado em + updated_at: Atualizado em \ No newline at end of file diff --git a/config/locales/devise.en.yml b/config/locales/devise/en.yml similarity index 100% rename from config/locales/devise.en.yml rename to config/locales/devise/en.yml diff --git a/config/locales/models/axis/pt-BR.yml b/config/locales/models/axis/pt-BR.yml new file mode 100644 index 0000000..60b158c --- /dev/null +++ b/config/locales/models/axis/pt-BR.yml @@ -0,0 +1,9 @@ +pt-BR: + activerecord: + models: + axis: + one: Eixo + other: Eixos + attributes: + axis: + name: Nome diff --git a/config/locales/models/category/pt-BR.yml b/config/locales/models/category/pt-BR.yml new file mode 100644 index 0000000..7f6d232 --- /dev/null +++ b/config/locales/models/category/pt-BR.yml @@ -0,0 +1,9 @@ +pt-BR: + activerecord: + models: + category: + one: Categoria + other: Categorias + attributes: + category: + name: Nome diff --git a/config/locales/models/question/pt-BR.yml b/config/locales/models/question/pt-BR.yml new file mode 100644 index 0000000..10ce6ac --- /dev/null +++ b/config/locales/models/question/pt-BR.yml @@ -0,0 +1,53 @@ +pt-BR: + activerecord: + models: + question: + one: Questão + other: Questões + attributes: + question: + user: Usuário + subject: Assunto + alternatives: Alternativas + authorship: Autoria + authorship_year: Ano de Autoria + bloom_taxonomy: Taxonomia de Bloom + body: Corpo + check_type: Tipo de Marcação + difficulty: Dificuldade + explanation: Explicação + instruction: Instrução + intention: Intenção + references: Referências + status: Status + support: Suporte + enumerize: + question: + check_type: + unique_answer: Resposta Única + incomplete_affirmation: Afirmação Incompleta + multiple_answer: Resposta Múltipla + negative_focus: Foco Negativo + assertion_and_reason: Asserção e Razão + gap: Lacuna + interpretation: Interpretação + association: Associação + ordering_or_ranking: Ordenação ou Seriação + constant_alternatives: Alternativas Constantes + difficulty: + easy: Fácil + medium: Média + hard: Difícil + bloom_taxonomy: + remember: Recordar + understand: Compreender + apply: Aplicar + analyze: Analisar + evaluate: Avaliar + create: Criar + status: + draft: Rascunhos + waiting_review: Aguardando Revisão + with_requested_changes: Com Alterações Solicitadas + approved: Aprovada + registered: Registrada \ No newline at end of file diff --git a/config/locales/models/subject/pt-BR.yml b/config/locales/models/subject/pt-BR.yml new file mode 100644 index 0000000..44685fc --- /dev/null +++ b/config/locales/models/subject/pt-BR.yml @@ -0,0 +1,11 @@ +pt-BR: + activerecord: + models: + subject: + one: Assunto + other: Assuntos + attributes: + subject: + axis: Eixo + category: Categoria + name: Nome diff --git a/config/locales/models/user/pt-BR.yml b/config/locales/models/user/pt-BR.yml new file mode 100644 index 0000000..78e5eb6 --- /dev/null +++ b/config/locales/models/user/pt-BR.yml @@ -0,0 +1,19 @@ +pt-BR: + activerecord: + models: + user: + one: Usuário + other: Usuários + attributes: + user: + name: Nome + + enumerize: + user: + roles: + admin: Administrador + nde: NDE + coordinator: Coordenador + center_director: Diretor de Centro + pro_rector: Pró-Reitor + teacher: Professor \ No newline at end of file