Commit e028ed7163b0a4cf43360f795d011cc9c133da91
Committed by
Rafael Manzo
1 parent
6519a117
Exists in
colab
and in
4 other branches
Project internationalization complete
Daniel Miranda <danielkza2@gmail.com>
Showing
9 changed files
with
38 additions
and
19 deletions
Show diff stats
app/views/kalibro_configurations/index.html.erb
... | ... | @@ -9,8 +9,8 @@ |
9 | 9 | <%else%> |
10 | 10 | <p class="alert alert-warning alert-dismissable"> |
11 | 11 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
12 | - <%= t('unauthenticated', action: "#{t('create').downcase} #{KalibroConfiguration.model_name.human(count: 2).downcase}") %>. | |
12 | + <%= t('unauthenticated', action: "#{t('create', model: KalibroConfiguration.model_name.human(count: 2)).downcase}") %>. | |
13 | 13 | </p> |
14 | 14 | <% end %> |
15 | 15 | |
16 | -<%= render partial: 'list', locals: {configurations: @configurations} %> | |
17 | 16 | \ No newline at end of file |
17 | +<%= render partial: 'list', locals: {configurations: @configurations} %> | ... | ... |
app/views/projects/index.html.erb
1 | 1 | <div class="page-header"> |
2 | - <h1><%= t("projects") %></h1> | |
2 | + <h1><%= "#{Project.model_name.human(count: 2)}" %></h1> | |
3 | 3 | </div> |
4 | 4 | |
5 | 5 | <% if user_signed_in? %> |
6 | 6 | <p> |
7 | - <%= link_to t('new_project'), new_project_path, class: 'btn btn-primary' %> | |
7 | + <%= link_to t('create', model: Project.model_name.human), new_project_path, class: 'btn btn-primary' %> | |
8 | 8 | </p> |
9 | 9 | <%else%> |
10 | 10 | <p class="alert alert-warning alert-dismissable"> |
11 | 11 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
12 | - <%= t('must_logged_create_projects') %> | |
12 | + <%= "#{t('unauthenticated', action: t("create", model: Project.model_name.human(count: 2)).downcase)}" %> | |
13 | 13 | </p> |
14 | 14 | <% end %> |
15 | 15 | ... | ... |
app/views/projects/new.html.erb
app/views/projects/show.html.erb
1 | - | |
2 | 1 | <div class="page-header"> |
3 | 2 | <div class="row"> |
4 | 3 | <div class="col-md-2"> |
... | ... | @@ -22,7 +21,7 @@ |
22 | 21 | |
23 | 22 | <hr /> |
24 | 23 | |
25 | -<h2><%= t("repositories") %></h2> | |
24 | +<h2><%= Repository.model_name.human(count: 2) %></h2> | |
26 | 25 | |
27 | 26 | <% if project_owner? @project.id %><%= link_to t('new_repository'), new_project_repository_path(@project,), class: 'btn btn-primary' %><% end %> |
28 | 27 | ... | ... |
config/locales/views/en.yml
config/locales/views/projects/en.yml
1 | 1 | en: |
2 | 2 | activemodel: |
3 | 3 | models: |
4 | - project: "Project" | |
4 | + project: | |
5 | + one: "Project" | |
6 | + other: "Projects" | |
5 | 7 | attributes: |
6 | - name: "Name" | |
7 | - description: "Description" | |
8 | - project: "Project" | |
9 | - projects: "Projects" | |
8 | + project: | |
9 | + name: "Name" | |
10 | + description: "Description" | |
10 | 11 | new_project: "New Project" |
11 | - must_logged_create_projects: "You must be logged in to create new Projects." | |
12 | 12 | edit_project: "Edit Project" |
13 | 13 | your_projects: "Your projects" |
14 | 14 | new_project: "New Project" |
... | ... | @@ -16,3 +16,4 @@ en: |
16 | 16 | want_destroy_project: "Are you sure that you want to destroy this Project?" |
17 | 17 | image_url: "Image URL" |
18 | 18 | all_projects: "All Projects" |
19 | + no_repositories: "There are no Repositories yet!" | ... | ... |
config/locales/views/projects/pt.yml
... | ... | @@ -0,0 +1,19 @@ |
1 | +pt: | |
2 | + activemodel: | |
3 | + models: | |
4 | + project: | |
5 | + one: "Projeto" | |
6 | + other: "Projetos" | |
7 | + attributes: | |
8 | + project: | |
9 | + name: "Nome" | |
10 | + description: "Descrição" | |
11 | + new_project: "Criar Projeto" | |
12 | + edit_project: "Editar Projeto" | |
13 | + your_projects: "Seus projetos" | |
14 | + new_project: "Novo Projeto" | |
15 | + destroy_project: "Destruir Projeto" | |
16 | + want_destroy_project: "Você tem certeza de que quer destruir este projeto?" | |
17 | + image_url: "URL da imagem" | |
18 | + all_projects: "Todos os Projetos" | |
19 | + no_repositories: "Não há repositórios ainda!" | ... | ... |
features/project/create.feature
... | ... | @@ -5,7 +5,7 @@ Feature: Project Creation |
5 | 5 | |
6 | 6 | Scenario: Should not create project without login |
7 | 7 | Given I am at the All Projects page |
8 | - Then I should not see "New Project" | |
8 | + Then I should not see "Create Project" | |
9 | 9 | |
10 | 10 | @kalibro_processor_restart |
11 | 11 | Scenario: project creation |
... | ... | @@ -44,7 +44,7 @@ Feature: Project Creation |
44 | 44 | And I am at the homepage |
45 | 45 | And I click the Your projects link |
46 | 46 | When I click the New Project link |
47 | - Then I should see "New Project" | |
47 | + Then I should see "Create Project" | |
48 | 48 | |
49 | 49 | @kalibro_processor_restart |
50 | 50 | Scenario: Choosing a name with whitespaces on the beginning and end | ... | ... |
features/project/listing.feature
... | ... | @@ -9,7 +9,7 @@ Feature: Project listing |
9 | 9 | Then I should see "Projects" |
10 | 10 | And I should see "Name" |
11 | 11 | And I should see "Description" |
12 | - And I should see "You must be logged in to create new Projects." | |
12 | + And I should see "You must be logged in to create projects" | |
13 | 13 | |
14 | 14 | @kalibro_processor_restart |
15 | 15 | Scenario: Should list the existing projects |
... | ... | @@ -28,4 +28,4 @@ Feature: Project listing |
28 | 28 | And I have sample project_attributes |
29 | 29 | And I am at the All Projects page |
30 | 30 | When I click the Show link |
31 | - Then the sample project should be there | |
32 | 31 | \ No newline at end of file |
32 | + Then the sample project should be there | ... | ... |