Skip to content

Translation and docs review #82

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

Merged
merged 3 commits into from
Mar 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions i18n/en-US/articles/context-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Context Page
description: The page object is a proxy in the framework store part of your context and gives you information about the document head metatags
---

The page object is a proxy in the framework store part of your context and gives you information about the document head metatags.
The `page` object is a proxy in the framework store part of your context and gives you information about the document head metatags.

This key is *readwrite* and available only in the *client* context.
This key is **readwrite** and available only in the **client** context.

Page keys will be used to generate metatags during [server-side rendering](/server-side-rendering) and must be assigned before [initiate](/full-stack-lifecycle) while this resolved.
`page` keys will be used to generate metatags during [server-side rendering](/server-side-rendering) and must be assigned before [`initiate`](/full-stack-lifecycle) while this resolved.

The following keys are available in the object:

Expand All @@ -22,13 +22,13 @@ The following keys are available in the object:
- **priority**: `number`
- **status**: `number`

When the title key is assigned on the client-side, the document title will be updated.
When the `title` key is assigned on the client-side, the document title will be updated.

Nullstack uses the *changes* and *priority* keys to generate the `sitemap.xml`
Nullstack uses the `changes` and `priority` keys to generate the **sitemap.xml**

The sitemap is generated automatically only when using [static site generation](/static-site-generation) and must be manually generated in [server-side rendered](/server-side-rendering) applications

The *changes* key represents the *changefreq* key in the `sitemap.xml` and if assigned must be one of the following values:
The `changes` key represents the `changefreq` key in the **sitemap.xml** and if assigned must be one of the following values:

- **always**
- **hourly**
Expand All @@ -38,11 +38,11 @@ The *changes* key represents the *changefreq* key in the `sitemap.xml` and if as
- **yearly**
- **never**

The *priority* key is a number between `0.0` and `1.0` that represents the *priority* key in the `sitemap.xml`
The `priority` key is a number between `0.0` and `1.0` that represents the `priority` key in the **sitemap.xml**.

Nullstack does not set a default priority, however, sitemaps assume a `0.5` priority when not explicitly set.

Besides *title* and *locale* all other keys have sensible defaults generated based on the application scope.
Besides `title` and `locale` all other keys have sensible defaults generated based on the application scope.

```jsx
import Nullstack from 'nullstack';
Expand Down Expand Up @@ -77,7 +77,7 @@ export default Page;

## Custom Events

Updating *page.title* will raise a custom event.
Updating `page.title` will raise a custom event.

```jsx
import Nullstack from 'nullstack';
Expand All @@ -97,13 +97,13 @@ export default Analytics;

## Error pages

If during the [server-side render](/server-side-rendering) process the *page.status* has any value besides 200, your application will receive another render pass that gives you the chance to adjust the interface according to the status.
If during the [server-side render](/server-side-rendering) process the `page.status` has any value besides `200`, your application will receive another render pass that gives you the chance to adjust the interface according to the status.

The status key will be raised with the HTTP response.

The page status will be modified to 500 and receive another render pass if the page raise an exception while rendering.
The page status will be modified to `500` and receive another render pass if the page raise an exception while rendering.

The status of [server functions](/server-functions) responses will be set to the *page.status*.
The status of [server functions](/server-functions) responses will be set to the `page.status`.

```jsx
import Nullstack from 'nullstack';
Expand Down Expand Up @@ -132,4 +132,4 @@ export default Application;

## Next step

⚔ Learn about the [context project](/context-project).
⚔ Learn about the [context `project`](/context-project).
60 changes: 30 additions & 30 deletions i18n/en-US/articles/context-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,48 @@ title: Context Project
description: The project object is a proxy in the framework store part of your context and gives you information about the app manifest and some metatags
---

The project object is a proxy in the framework store part of your context and gives you information about the app manifest and some metatags.
The `project` object is a proxy in the framework store part of your context and gives you information about the app manifest and some metatags.

This key is *readwrite* in the *server* context.
This key is **readwrite* in the **server* context.

This key is *readonly* in the *client* context.
This key is **readonly** in the **client** context.

Project keys will be used to generate metatags during server-side rendering and must be assigned before [initiate](/full-stack-lifecycle) is resolved.
`project` keys will be used to generate metatags during server-side rendering and must be assigned before [`initiate`](/full-stack-lifecycle) is resolved.

Project keys will be used to generate the app manifest and should be set during the [application startup](/application-startup).
`project` keys will be used to generate the app **manifest** and should be set during the [application startup](/application-startup).

The disallow key will be used to generate the robots.txt and should be set during the [application startup](/application-startup).
The `disallow` key will be used to generate the **robots.txt** and should be set during the [application startup](/application-startup).

Project keys are frozen after the [application startup](/application-startup).
`project` keys are frozen after the [application startup](/application-startup).

The following keys are available in the object:

- *domain*: string
- *name*: string
- *shortName*: string
- *color*: string
- *backgroundColor*: string
- *type*: string
- *display*: string
- *orientation*: string
- *scope*: string
- *root*: string
- *icons*: object
- *favicon*: string (relative or absolute url)
- *disallow*: string array (relative paths)
- *sitemap*: boolean or string (relative or absolute url)
- *cdn*: string (absolute url)
- *protocol* string (http or https)
- **domain**: `string`
- **name**: `string`
- **shortName**: `string`
- **color**: `string`
- **backgroundColor**: `string`
- **type**: `string`
- **display**: `string`
- **orientation**: `string`
- **scope**: `string`
- **root**: `string`
- **icons**: `object`
- **favicon**: `string` (relative or absolute url)
- **disallow**: `string array` (relative paths)
- **sitemap**: `boolean` or `string` (relative or absolute url)
- **cdn**: `string` (absolute url)
- **protocol**: `string` (http or https)

Besides *domain*, *name* and *color* all other keys have sensible defaults generated based on the application scope.
Besides `domain`, `name` and `color` all other keys have sensible defaults generated based on the application scope.

If you do not declare the *icons* key, Nullstack will scan any icons with the name following the pattern "icon-[WIDTH]x[HEIGHT].png" in your public folder.
If you do not declare the `icons` key, Nullstack will scan any icons with the name following the pattern "icon-[WIDTH]x[HEIGHT].png" in your public folder.

If the *sitemap* key is set to true your robots.txt file will point the sitemap to *https://${project.domain}/sitemap.xml*.
If the `sitemap` key is set to true your **robots.txt** file will point the sitemap to `https://${project.domain}/sitemap.xml`.

The *cdn* key will prefix your asset bundles and will be available in the context so you can manually prefix other assets.
The `cdn` key will prefix your asset bundles and will be available in the context so you can manually prefix other assets.

The *protocol* key is "http" in development mode and "https" in production mode by default
The `protocol` key is "http" in development mode and "https" in production mode by default

```jsx
import Nullstack from 'nullstack';
Expand Down Expand Up @@ -83,8 +83,8 @@ class Application extends Nullstack {
export default Application;
```

> 💡 You can override the automatically generated manifest.json and robots.txt by serving your own file from the public folder
> 💡 You can override the automatically generated **manifest.json** and **robots.txt** by serving your own file from the **public** folder

## Next step

⚔ Learn about the [context settings](/context-settings).
⚔ Learn about the [context `settings`](/context-settings).
32 changes: 16 additions & 16 deletions i18n/pt-BR/articles/contexto-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ title: Contexto Page
description: O objeto da página é um proxy armazenado da estrutura de seu contexto e fornece informações sobre as metatags do cabeçalho do documento
---

O objeto *page* é um proxy armazenado na estrutura de seu contexto e fornece informações sobre as metatags do cabeçalho do documento.
O objeto `page` é um proxy de parte do armazenamento do framework no seu contexto e fornece informações sobre as metatags do cabeçalho do documento.

Esta chave é de *leitura e escrita* e está disponível apenas no contexto *client-side*.
Esta chave é de **leitura e escrita** e está disponível apenas no contexto **client-side**.

Chaves da página serão usadas para gerar as metatags durante a [renderização no lado do servidor](/pt-br/renderizando-no-servidor) e devem ser atribuídas antes do ciclo de [inicialização](/pt-br/ciclo-de-vida-full-stack) ser resolvido.
Chaves de `page` serão usadas para gerar as metatags durante a [renderização no lado do servidor](/pt-br/renderizando-no-servidor) e devem ser atribuídas antes do ciclo [`initiate`](/pt-br/ciclo-de-vida-full-stack) ser resolvido.

As seguintes chaves estão disponíveis no objeto:

Expand All @@ -22,13 +22,13 @@ As seguintes chaves estão disponíveis no objeto:
- **priority**: `number`
- **status**: `number`

Quando a chave de título é atribuída no lado client-side, o título do documento será atualizado.
Quando a chave `title` é atribuída no lado do client, o título do documento será atualizado.

Nullstack utiliza as chaves *changes* e *priority* para gerar o `sitemap.xml`
Nullstack utiliza as chaves `changes` e `priority` para gerar o **sitemap.xml**.

O mapa do site é gerado automaticamente apenas ao utilizar a [geração de site estático](/pt-br/geracao-de-sites-estaticos) e deve ser gerado manualmente em aplicativos com a [renderização no lado do servidor](/pt-br/renderizando-no-servidor)
O mapa do site é gerado automaticamente apenas ao utilizar a [geração de site estático](/pt-br/geracao-de-sites-estaticos) e deve ser gerado manualmente em aplicativos com a [renderização no lado do servidor](/pt-br/renderizando-no-servidor).

A chave *changes* representa a chave *changefreq* no `sitemap.xml` e se for atribuída será um dos seguintes valores:
A chave `changes` representa a chave `changefreq` no **sitemap.xml** e se for atribuída deverá ser um dos seguintes valores:

- **always**
- **hourly**
Expand All @@ -38,11 +38,11 @@ A chave *changes* representa a chave *changefreq* no `sitemap.xml` e se for atri
- **yearly**
- **never**

A chave *priority* é um número entre `0.0` e `1.0` que representada no `sitemap.xml`
A chave `priority` é um número entre `0.0` e `1.0` que representa a chave `priority` no **sitemap.xml**.

Nullstack não define uma prioridade padrão, no entanto, os sitemap assumem uma prioridade `0.5` quando não são definidos explicitamente.
Nullstack não define uma prioridade padrão, no entanto, sitemaps assumem uma prioridade `0.5` quando não são definidas explicitamente.

Além de *title* e *locale*, todas as outras chaves tem padrões sensíveis e gerados com base no escopo do aplicativo.
Além de `title` e `locale`, todas as outras chaves tem padrões sensíveis e gerados com base no escopo do aplicativo.

```jsx
import Nullstack from 'nullstack';
Expand Down Expand Up @@ -77,7 +77,7 @@ export default Page;

## Eventos Personalizados

Atualizando *page.title* gerando um evento personalizado.
Atualizando `page.title` gerará um evento personalizado.

```jsx
import Nullstack from 'nullstack';
Expand All @@ -97,13 +97,13 @@ export default Analytics;

## Páginas de erro

Se durante o processo de [renderização no lado do servidor](/pt-br/renderizando-no-servidor) o *page.status* estiver com qualquer valor além de 200, seu aplicativo receberá outra passagem na renderização e lhe possibilitará ajustar a interface de acordo com o status retornado.
Se durante o processo de [renderização no lado do servidor](/pt-br/renderizando-no-servidor) o `page.status` estiver com qualquer valor além de `200`, seu aplicativo receberá outra passagem na renderização e lhe possibilitará ajustar a interface de acordo com o status retornado.

A chave de status será gerada na resposta HTTP.

O status da página será modificado para 500 e receberá outra passagem na renderização se a página gerar uma exceção enquanto renderiza.
O status da página será modificado para `500` e receberá outra passagem na renderização se a página gerar uma exceção enquanto renderiza.

O status das respostas de [funções do servidor](/pt-br/funcoes-de-servidor) será definido no *page.status*.
O status das respostas de [funções do servidor](/pt-br/funcoes-de-servidor) será definido no `page.status`.

```jsx
import Nullstack from 'nullstack';
Expand All @@ -130,6 +130,6 @@ export default Application;

> 🔥 A atribuição à chave de status durante o modo [aplicativo de página única](/pt-br/ciclo-de-vida-full-stack) não terá efeito.

## Próxima Etapa
## Próximo Passo

⚔ Aprenda sobre o [contexto do projeto](/pt-br/contexto-project).
⚔ Aprenda sobre o [contexto `project`](/pt-br/contexto-project).
68 changes: 35 additions & 33 deletions i18n/pt-BR/articles/contexto-project.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,50 @@
---
title: Contexto do Projeto
description: O objeto do projeto é um proxy na parte da loja de framework do seu contexto e te dá informações sobre o manifesto do app e alguns metatags
---
title: Contexto Project
description: O objeto project é um proxy de parte do armazenamento do framework no seu contexto e te dá informações sobre o manifest do app e algumas metatags
---

O objeto `project` é um proxy de parte do armazenamento do framework no seu contexto e te dá informações sobre o manifest do app e algumas metatags.

Essa chave é *readwrite* no contexto do *server*.
Essa chave é **readwrite** no contexto do **server**.

Essa chave é *readonly* no contexto do *client*.
Essa chave é **readonly** no contexto do **client**.

As chaves do projeto serão usadas para gerar metatags durante a renderização do lado do servidor e deve ser designado antes que [inicialize](/ciclo de vida full-stack) seja resolvido.
As chaves de `project` serão usadas para gerar metatags durante a renderização do lado do servidor e devem ser definidas antes que [`initiate`](/pt-br/ciclo-de-vida-full-stack) seja resolvido.

As chaves do projeto serão usadas para gerar o manifesto do app e devem ser definidos durante a [inicialização do aplicativo](/inicialização do aplicativo).
As chaves de `project` serão usadas para gerar o **manifest** do app e devem ser definidas durante a [inicialização da aplicação](/pt-br/inicializacao-da-aplicacao).

A chave disallow será usada para gerar o robots.txt e deverá ser definida durante a [inicialização do aplicativo](/inicialização do aplicativo).
A chave `disallow` será usada para gerar o **robots.txt** e deverá ser definida durante a [inicialização da aplicação](/pt-br/inicializacao-da-aplicacao).

As chaves do projeto serão congeladas após a [inicialização do aplicativo](/inicialização do aplicativo).
As chaves de `project` serão congeladas após a [inicialização da aplicação](/pt-br/inicializacao-da-aplicacao).

As chaves a seguir estão disponíveis no objeto:

- *domain*: string
- *name*: string
- *shortName*: string
- *color*: string
- *backgroundColor*: string
- *type*: string
- *display*: string
- *orientation*: string
- *scope*: string
- *root*: string
- *icons*: object
- *favicon*: string (url relativo ou absoluto)
- *disallow*: string array (caminhos relativos)
- *sitemap*: boolean or string (url relativo ou absoluto)
- *cdn*: string (url absoluto)
- *protocol* string (http or https)
- **domain**: `string`
- **name**: `string`
- **shortName**: `string`
- **color**: `string`
- **backgroundColor**: `string`
- **type**: `string`
- **display**: `string`
- **orientation**: `string`
- **scope**: `string`
- **root**: `string`
- **icons**: `object`
- **favicon**: `string` (url relativo ou absoluto)
- **disallow**: `array` de `string` (caminhos relativos)
- **sitemap**: `boolean` ou `string` (url relativo ou absoluto)
- **cdn**: `string` (url absoluto)
- **protocol**: `string` (http or https)

Além de *domain*, *name* and *color* todas as outras chaves tem padrões sensíveis gerados com base no escopo do aplicativo.
Além de `domain`, `name` and `color` todas as outras chaves tem padrões sensíveis gerados com base no escopo do aplicativo.

Se você não declarar a chave *icons*, Nullstack irá escanear quaisquer ícones com o nome seguindo o padrão "icon-[WIDTH]x[HEIGHT].png" na sua pasta pública.
Se você não declarar a chave `icons`, Nullstack irá escanear quaisquer ícones com o nome seguindo o padrão "icon-[LARGURA]x[ALTURA].png" na sua pasta **public**.

Se a chave *sitemap* estiver definada como verdadeira o seu arquivo robots.txt wirá apontar o sitemap para *https://${project.domain}/sitemap.xml*.
Se a chave `sitemap` estiver definida como `true` o seu arquivo **robots.txt** irá apontar o sitemap para `https://${project.domain}/sitemap.xml`.

A chave *cdn* irá prefixar seu pacote de ativos e ficará disponível no contexto para que você possa manualmente prefixar outros ativos.
A chave `cdn` irá prefixar seu pacote de assets e ficará disponível no contexto para que você possa manualmente prefixar outros ativos.

A chave *protocol* é "http" no modo de desenvolvimento e "https" e no modo produção por predefinição
A chave `protocol` é "http" no modo de desenvolvimento e "https" e no modo produção por predefinição.

```jsx
import Nullstack from 'nullstack';
Expand Down Expand Up @@ -81,8 +83,8 @@ class Application extends Nullstack {
export default Application;
```

> 💡 Você pode substituir o manifest.json gerado automaticamente e robots.txt inserindo o seu próprio arquivo da pasta pública
> 💡 Você pode substituir o **manifest.json** gerado automaticamente e **robots.txt** inserindo o seu próprio arquivo na pasta **public**

## Próximo passo
## Próximo Passo

⚔ Aprenda sobre as [configurações de contexto](/configurações de contexto).
⚔ Aprenda sobre o [contexto `settings`](/pt-br/contexto-settings).
8 changes: 8 additions & 0 deletions src/Article.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ article {

}

li,
& > p {
& code:not(.language-jsx) {
font-size: 1.1rem;
vertical-align: text-bottom;
}
}

}

@media (max-width: 768px) {
Expand Down