Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translating /source/pt-br/api/generator.md to pt-br #12

Merged
merged 1 commit into from
Nov 20, 2017

Conversation

pedrorezende
Copy link
Collaborator

This fixes #4

@pedrorezende pedrorezende changed the title [UPDATE] Translating /source/pt-br/api/generator.md to pt-br Translating /source/pt-br/api/generator.md to pt-br Aug 9, 2017
@ramonsantos ramonsantos self-requested a review August 9, 2017 14:24

``` js
hexo.extend.generator.register(name, function(locals){
// ...
});
```

A `locals` argument will get passed into the function, containing the [site variables](../docs/variables.html#Site-Variables). You should use this argument to get the website data, thereby avoiding having to access the database directly.
Um argumento `locals` será passado para dentro da função contendo as [variáveis do site](../docs/variables.html#Site-Variables). Você deve utilizar esse argumento para obter os dados do site, evitando, assim, acessar a base de dados diretamente.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Primeira frase: "...será passado para dentro da função, contendo as..."

Segunda frase: "...argumento para obter os dados do site, evitando assim, acessar a base..."


When the source files are updated, Hexo will execute all generators and rebuild the routes. **Please return the data and do not access the router directly.**
Quando os arquivos fonte são atualizados, Hexo executará todos os geradores e recriará as rotas. **Atenção: Retornar os dados em vez de acessar o roteador diretamente!**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adicionar um artigo antes de "Hexo" na primeira frase. Ficando assim: "...fonte são atualizados, o Hexo executará todos os geradores..."

Na segunda frase, podemos usar "router" no lugar de "roteador", pois "router" é um componente do Hexo.


### Archive Page
### Páginas de Arquivo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traduzir "Archive" por "Arquivos" ficou complicado mesmo. Alguém tem uma sugestão melhor?

Pois esse "Archive" se trata de um lista de post exibidos em uma página no site. Tipo uma categoria.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creio que não existe outra opção melhor, se utilizarmos a palavra "Arquivo" em todos os locais a lógica se mantém para leitores normais.


Create an archive page at `archives/index.html`. We pass all posts as data to the templates. This data is equivalent to the `page` variable in templates.
Crie uma página de arquivo em `archives/index.html`. Iremos passar uma lista com todos os posts como `data` para os templates. Assim, `data` é equivalente à variável `page` nos templates.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aqui cai o mesmo problema da tradução de "Archive". Temos que rever esse paragrafo.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sugestão: "Arquivo" com letra maiúscula (?)

@@ -56,9 +58,10 @@ hexo.extend.generator.register('archive', function(locals){
});
```

### Archive Page with Pagination
### Páginas de Arquivo com Paginação
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O "Archive" novamente.

@@ -56,9 +58,10 @@ hexo.extend.generator.register('archive', function(locals){
});
```

### Archive Page with Pagination
### Páginas de Arquivo com Paginação

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retirar essa linha em branco.

### Archive Page with Pagination
### Páginas de Arquivo com Paginação

Você pode utilizar uma ótima ferramenta oficial chamada [hexo-pagination] para criar facilmente uma página de arquivos com paginação.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sugestão: Substituir "...uma ótima ferramenta oficial chamada..." por "...a ferramenta oficial chamada..."

"Archive" aqui também.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Para manter a lógica creio que o ideal será manter Arquivos com letra maiúscula invés de minuscula.


Iterate over all posts in `locals.posts` and create routes for all the posts.
Percorra a lista de posts em `locals.posts` e crie rotas para cada um.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Substituir a frase por: "Percorre a lista de posts em locals.posts e cria rotas para cada um deles."


``` js
var fs = require('hexo-fs');

hexo.extend.generator.register('asset', function(locals){
hexo.extend.generator.register ('asset', function(locals){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Retirar espaço em branco.


### Archive Page
### Páginas de Arquivo
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Creio que não existe outra opção melhor, se utilizarmos a palavra "Arquivo" em todos os locais a lógica se mantém para leitores normais.

### Archive Page with Pagination
### Páginas de Arquivo com Paginação

Você pode utilizar uma ótima ferramenta oficial chamada [hexo-pagination] para criar facilmente uma página de arquivos com paginação.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Para manter a lógica creio que o ideal será manter Arquivos com letra maiúscula invés de minuscula.


Create an archive page at `archives/index.html`. We pass all posts as data to the templates. This data is equivalent to the `page` variable in templates.
Crie uma página de arquivo em `archives/index.html`. Iremos passar uma lista com todos os posts como `data` para os templates. Assim, `data` é equivalente à variável `page` nos templates.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sugestão: "Arquivo" com letra maiúscula (?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[API] generator.md
4 participants