chore(i18n,docs): processed translations (#46723)

This commit is contained in:
camperbot
2022-06-30 17:22:34 +02:00
committed by GitHub
parent fe1aa0644c
commit 0e5aec6923
9 changed files with 80 additions and 80 deletions
@@ -13,13 +13,13 @@ First, visit the `config/i18n/all-langs.ts` file to add the language to the avai
- `availableLangs`: For both the `client` and `curriculum` arrays, add the text name of the language. This is the value that will be used in the `.env` file later.
- `auditedCerts`: Add the text name of the language as the _key_, and add an array of `SuperBlocks.{cert}` variables as the _value_. This tells the client which certifications are fully translated.
- `i18nextCodes`: These are the ISO language codes for each language. You will need to add the appropriate ISO code for the language you are enabling. These do need to be unique for each language.
- `langDisplayNames`: These are the display names for the language selector in the navigation menu.
- `langCodes`: These are the language codes used for formatting dates and numbers. These should be Unicode CLDR codes instead of ISO codes.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. These should be Unicode CLDR codes instead of ISO codes.
As an example, if you wanted to enable Dothraki as a language, your `all-langs.js` objects should look like this:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(簡體字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
Next, open the `client/src/utils/algolia-locale-setup.ts` file. This data is used for the search bar that loads `/news` articles. While it is unlikely that you are going to test this functionality, missing the data for your language can lead to errors when attempting to build the codebase locally.
Add an object for your language to the `algoliaIndices` object. You should use the values for the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
Add an object for your language to the `algoliaIndices` object. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] If we have already deployed an instance of news in your target language, you can update the values to reflect the live instance. Otherwise, use the English values.
@@ -130,8 +130,8 @@ const algoliaIndices = {
Finally, in your `.env` file, set `CLIENT_LOCALE` and `CURRICULUM_LOCALE` to your new language (use the `availableLangs` value.)
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Releasing a Superblock
@@ -13,13 +13,13 @@ First, visit the `config/i18n/all-langs.ts` file to add the language to the avai
- `availableLangs`: For both the `client` and `curriculum` arrays, add the text name of the language. This is the value that will be used in the `.env` file later.
- `auditedCerts`: Add the text name of the language as the _key_, and add an array of `SuperBlocks.{cert}` variables as the _value_. This tells the client which certifications are fully translated.
- `i18nextCodes`: These are the ISO language codes for each language. You will need to add the appropriate ISO code for the language you are enabling. These do need to be unique for each language.
- `langDisplayNames`: These are the display names for the language selector in the navigation menu.
- `langCodes`: These are the language codes used for formatting dates and numbers. These should be Unicode CLDR codes instead of ISO codes.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. These should be Unicode CLDR codes instead of ISO codes.
As an example, if you wanted to enable Dothraki as a language, your `all-langs.js` objects should look like this:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
Next, open the `client/src/utils/algolia-locale-setup.ts` file. This data is used for the search bar that loads `/news` articles. While it is unlikely that you are going to test this functionality, missing the data for your language can lead to errors when attempting to build the codebase locally.
Add an object for your language to the `algoliaIndices` object. You should use the values for the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
Add an object for your language to the `algoliaIndices` object. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] If we have already deployed an instance of news in your target language, you can update the values to reflect the live instance. Otherwise, use the English values.
@@ -130,8 +130,8 @@ const algoliaIndices = {
Finally, in your `.env` file, set `CLIENT_LOCALE` and `CURRICULUM_LOCALE` to your new language (use the `availableLangs` value.)
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Releasing a Superblock
@@ -13,13 +13,13 @@ Primero, visita el archivo `config/i18n/all-langs.ts` para agregar el idioma a l
- `avaliableLangs`: Tanto para el arreglo `client` como para el arreglo `curriculum`, añade el nombre en texto del lenguaje. Este es el valor que se utilizará en el archivo `.env` más tarde.
- `auditedCerts`: Agrega el nombre del texto como la _clave_, y añade un arreglo de variables de `SuperBlocks.{cert}` como el _value_. Esto le dice al cliente qué certificaciones están totalmente traducidas.
- `i18nextCodes`: Estos son los codigos de idioma ISO para cada lenguaje. Necesitarás añadir el código ISO apropiado para el idioma que estás activando. Estos deben ser únicos para cada lenguaje.
- `langDisplayNames`: Estos son los nombres que se muestran en el selector de idioma en el menú de navegación.
- `langCodes`: Estos son los códigos de idioma utilizados para el formateo de fechas y números. Estos deben ser códigos CLDR Unicode en lugar de códigos ISO.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. Estos deben ser códigos CLDR Unicode en lugar de códigos ISO.
Por ejemplo, si quisieras habilitar Dothraki como un lenguaje, tus objetos `all-langs.js` deberían verse así:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
A continuación, abre el archivo `client/src/utils/algolia-locale-setup.ts` file. Estos datos son utilizados por la barra de búsqueda que carga artículos de `/news` (noticias). Si bien es poco probable que pruebe esta funcionalidad, la falta de datos para su idioma puede provocar errores al intentar crear la base de código localmente.
Agregue un objeto para su idioma al objeto `algoliaIndices`. Debes usar los valores del objeto `english` para las pruebas locales, reemplazando la clave `english` con el valor `availableLangs` de tu idioma.
Agregue un objeto para su idioma al objeto `algoliaIndices`. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] Si ya hemos desplegado una instancia de noticias en tu idioma de destino, puedes actualizar los valores para reflejar la instancia real. De lo contrario, utiliza los valores en inglés.
@@ -125,8 +125,8 @@ const algoliaIndices = {
Finalmente, en tu archivo `.env`, configura `CLIENT_LOCALE` y `CURRICULUM_LOCALE` a tu nuevo lenguaje (usa el valor `availableLangs`)
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Releasing a Superblock
@@ -13,13 +13,13 @@ Gehe zuerst in die Datei `config/i18n/all-langs.ts`, um die Sprache zur Liste de
- `availableLangs`: Füge sowohl für den `client` als auch für das Studienplan(`curriculum`)-Array den Textnamen der Sprache hinzu. Dies ist der Wert, der später in der `.env`-Datei verwendet wird.
- `auditedCerts`: Füge den Textnamen der Sprache als _Schlüssel_ und ein Array von `SuperBlocks.{cert}`-Variablen als _Wert_ hinzu. So erfährt der Client, welche Zertifikate vollständig übersetzt sind.
- `i18nextCodes`: Das sind die ISO-Sprachcodes für jede Sprache. Du musst den entsprechenden ISO-Code für die Sprache hinzufügen, die du aktivieren willst. Diese müssen für jede Sprache einzigartig sein.
- `langDisplayNames`: Dies sind die Anzeigenamen für den Sprachauswahlschalter im Navigationsmenü.
- `langCodes`: Dies sind die Sprachcodes, die für die Formatierung von Daten und Zahlen verwendet werden. Dies sollten Unicode CLDR-Codes statt ISO-Codes sein.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. Dies sollten Unicode CLDR-Codes statt ISO-Codes sein.
Wenn du zum Beispiel Dothraki als Sprache aktivieren möchtest, sollten deine `all-langs.js`-Objekte wie folgt aussehen:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
Als nächstes öffnest du die Datei `client/src/utils/algolia-locale-setup.ts`. Diese Daten werden für die Suchleiste verwendet, die `/news `-Artikel lädt. Es ist zwar unwahrscheinlich, dass du diese Funktion testen wirst, aber das Fehlen der Daten für deine Sprache kann zu Fehlern führen, wenn du versuchst, die Codebasis lokal zu erstellen.
Füge ein Objekt für deine Sprache zum `algoliaIndices`-Objekt hinzu. Du solltest die Werte für das `english`-Objekt für lokale Tests verwenden, indem du den Schlüssel `english` durch den Wert für deine Sprache `availableLangs` ersetzt.
Füge ein Objekt für deine Sprache zum `algoliaIndices`-Objekt hinzu. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] Wenn wir bereits eine Instanz von news in deiner Zielsprache bereitgestellt haben, kannst du die Werte aktualisieren, damit sie die Live-Instanz widerspiegeln. Andernfalls verwendest du die englischen Werte.
@@ -130,8 +130,8 @@ const algoliaIndices = {
Schließlich stellst du in deiner `.env`-Datei `CLIENT_LOCALE` und `CURRICULUM_LOCALE` auf deine neue Sprache ein (verwende den `availableLangs` Wert).
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Releasing a Superblock
@@ -26,16 +26,16 @@ Facoltativamente, puoi fare il push direttamente a `upstream/main`, ma aprire un
3. Crea una nuova GitHub Release usando la GitHub UI:
- Implementa correttamente il numero di versione, quando crei una nuova tag.
- Upload the `.vsix` file with the release.
- Publish the release, and confirm the action succeeded.
- Fai l'upload del file `.vsix` con la nuova release.
- Pubblica la release, e conferma che l'azione ha avuto successo.
> [!NOTE] Creating a release requires write access to the `freeCodeCamp/courses-vscode-extension` repository.
> [!NOTE] Creare una release richiede permessi di scrittura sul repository `freeCodeCamp/courses-vscode-extension`.
## Pubblicare l'estensione manualmente
A manual upload to the Visual Studio Marketplace can be achieved, by following these steps:
Un upload manuale al Visual Studio Marketplace può essere fatto, seguendo questi step:
1. Visit https://marketplace.visualstudio.com/ and sign in
2. Navigate to the [freeCodeCamp Publisher page](https://marketplace.visualstudio.com/manage/publishers/freecodecamp)
3. Select the relevant extension, and select `Update`
4. Upload the file from your local files
1. Visita https://marketplace.visualstudio.com/ e fai log in
2. Naviga alla [pagina freeCodeCamp Publisher](https://marketplace.visualstudio.com/manage/publishers/freecodecamp)
3. Seleziona l'estensione rilevante, e seleziona `Update`
4. Carica il file dai tuoi file locali
@@ -13,13 +13,13 @@ Prima, visita il file `config/i18n/all-langs.ts` per aggiungere la lingua alle l
- `availableLangs`: Aggiungi il nome testuale della lingua agli array `client` e `curriculum`. Questo è il valore che sarà usato nel file `.env` più tardi.
- `auditedCerts`: Aggiungi il nome testuale della lingua come _chiave_, e aggiungi un array di variabili `SuperBlocks.{cert}` come _valori_. Questo dice al client quali certificazioni sono completamente tradotte.
- `i18nextCodes`: questi sono i codici ISO per le varie lingue. Dovrai aggiungere il codice ISO appropriato per la lingua che stai attivando. Questi devono essere unici per ogni lingua.
- `langDisplayNames`: Questi sono i nomi delle lingue visualizzati nel menù di navigazione.
- `langCodes`: Questi sono i codici delle lingue usati per formattare date e numeri. Questi devono essere codici Unicode CLDR invece di codici ISO.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. Questi devono essere codici Unicode CLDR invece di codici ISO.
Per esempio, se vuoi attivare la lingua Dothraki, il tuo oggetto `all-langs.js` dovrebbe essere come segue:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
Poi, apri il file `client/src/utils/algolia-locale-setup.ts`. Questi dati sono usati dalla barra di ricerca che carica gli articoli in `/news`. Anche se è poco probabile che tu stia testando questa funzione, se questi dati mancano per la tua lingua possono esserci degli errori nel costruire il codebase localmente.
Aggiungi un oggetto per la tua lingua all'oggetto `algoliaIndices`. Dovresti usare i valori dell'oggetto `english` per testare in locale, sostituiendo la chiave `english` con il valore della tua lingua in `availableLangs`.
Aggiungi un oggetto per la tua lingua all'oggetto `algoliaIndices`. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] Se abbiamo già distribuito un'istanza della pubblicazione nella tua lingua target, puoi aggironare i valori per riflettere le istanze live. Altrimenti, usa i valori della pubblicazione inglese.
@@ -130,8 +130,8 @@ const algoliaIndices = {
Infinine, nel file `.env`, dai a `CLIENT_LOCALE` e `CURRICULUM_LOCALE` il valore della tua nuova lingua (usando il valore in `availableLangs`.)
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### RIlasciare un superblocco
@@ -13,13 +13,13 @@
- `availableLangs`: `client` と `curriculum` 両方の配列で、言語のテキスト名を追加します。 これは `.env` ファイルで使用される値です。
- `auditedCerts`: 言語のテキスト名を _key_ として追加し、`SuperBlocks.{cert}` 変数の配列を _value_ として追加します。 これは、クライアントにどの認定講座の翻訳が完了しているのかを伝えます。
- `i18nextCodes`: これらは各言語の ISO の言語コードです。 有効にしようとしている言語に適切な ISO コードを追加する必要があります。 言語コードは、各言語に固有のものである必要があります。
- `langDisplayNames`: これらはナビゲーションメニューの言語セレクターで使用する表示名です。
- `langCodes`: これらは日付と数字の書式設定に使用する言語コードです。 ISO コードではなく、Unicode CLDR コードである必要があります。
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. ISO コードではなく、Unicode CLDR コードである必要があります。
一例を挙げると、Dothraki という言語を有効にしたい場合、`all-langs.js` の各オブジェクトは次のようになります。
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
次に、`client/src/utils/algolia-locale-setup.ts` ファイルを開きます。 このデータは、`/news` 記事を読み込む検索バーに使用されます。 この機能をテストする可能性は低いですが、 言語のデータがないと、ローカルでコードベースを構築しようとする際にエラーが発生する可能性があります。
`algoliaIndices` オブジェクトに言語のオブジェクトを追加します。 ローカルテスト用に `english` オブジェクトの値を使用する必要があります。`english` キーを、言語の `availableLangs` 値に置き換えます。
`algoliaIndices` オブジェクトに言語のオブジェクトを追加します。 You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] 既に対象言語でニュースのインスタンスをデプロイしている場合は、値を更新してライブインスタンスを反映することができます。 それ以外の場合は、英語の値を使用します。
@@ -130,8 +130,8 @@ const algoliaIndices = {
最後に、`.env` ファイルの中で、`CLIENT_LOCALE` と `CURRICULUM_LOCALE` を新しい言語 (`availableLangs` 値を使用) に設定します。
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Releasing a Superblock
@@ -13,13 +13,13 @@ Primeiro, visite o arquivo `config/i18n/all-langs.ts` para adicionar o idioma à
- `availableLangs`: tanto para o array `client` quanto para o array `curriculum`, adicione o nome do idioma. Esse valor é o que será usado no arquivo `.env` depois.
- `auditedCerts`: adicione o nome do texto do idioma como a _chave_ e adicione um array de variáveis `SuperBlocks.{cert}` como o _valor_. Isto informa ao cliente quais certificações estão totalmente traduzidas.
- `i18nextCodes`: esses são os códigos ISO de cada linguagem. Você vai precisar do código ISO apropriado para o idioma que você está habilitando. Eles precisam ser únicos para cada idioma.
- `langDisplayNames`: esses são os nomes dos idiomas que aparecerão para a seleção no menu de navegação.
- `langCodes`: esses são os códigos de idiomas usados para formatar datas e números. Esses deverão ser códigos Unicode CLDR ao invés de códigos ISO.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. Esses deverão ser códigos Unicode CLDR ao invés de códigos ISO.
Como um exemplo, se você tivesse que habilitar o idioma Dothraki como seu idioma, os objetos `all-langs.js` devem ficar assim:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
Agora, abra o arquivo `client/src/utils/algolia-locale-setup.ts`. Esse dado é usado para a barra de busca que carrega os artigos `/news`. Embora seja improvável que você venha a testar essa funcionalidade, não ter os dados para o seu idioma pode levar a erros quando tentar criar a base de código localmente.
Adicione um objeto para seu idioma no objeto `algoliaIndices`. Você deve usar os valores do objeto `english` para o teste local, substituindo a chave `english` pelo valor de `availableLangs` do seu idioma.
Adicione um objeto para seu idioma no objeto `algoliaIndices`. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] Se nós já implantamos uma instância do editorial em sua língua-alvo, você pode atualizar os valores para refletir a instância que já está implantada. Do contrário, use os valores em inglês.
@@ -130,8 +130,8 @@ const algoliaIndices = {
Por fim, em seu arquivo `.env`, definimos `CLIENT_LOCALE` e `CURRICULUM_LOCALE` com o valor de seu novo idioma (use o valor de `availableLangs`.)
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Liberar um superbloco
@@ -13,13 +13,13 @@ First, visit the `config/i18n/all-langs.ts` file to add the language to the avai
- `availableLangs`: For both the `client` and `curriculum` arrays, add the text name of the language. This is the value that will be used in the `.env` file later.
- `auditedCerts`: Add the text name of the language as the _key_, and add an array of `SuperBlocks.{cert}` variables as the _value_. This tells the client which certifications are fully translated.
- `i18nextCodes`: These are the ISO language codes for each language. You will need to add the appropriate ISO code for the language you are enabling. These do need to be unique for each language.
- `langDisplayNames`: These are the display names for the language selector in the navigation menu.
- `langCodes`: These are the language codes used for formatting dates and numbers. These should be Unicode CLDR codes instead of ISO codes.
- `LangNames`: These are the display names for the language selector in the navigation menu.
- `LangCodes`: These are the language codes used for formatting dates and numbers. These should be Unicode CLDR codes instead of ISO codes.
As an example, if you wanted to enable Dothraki as a language, your `all-langs.js` objects should look like this:
```js
const availableLangs = {
export const availableLangs = {
client: ['english', 'espanol', 'chinese', 'chinese-traditional', 'dothraki'],
curriculum: [
'english',
@@ -69,7 +69,7 @@ export const auditedCerts = {
]
};
const i18nextCodes = {
export const i18nextCodes = {
english: 'en',
espanol: 'es',
chinese: 'zh',
@@ -77,7 +77,7 @@ const i18nextCodes = {
dothraki: 'mis'
};
const langDisplayNames = {
export enum LangNames = {
english: 'English',
espanol: 'Español',
chinese: '中文(简体字)',
@@ -85,7 +85,7 @@ const langDisplayNames = {
dothraki: 'Dothraki'
};
const langCodes = {
export enum LangCodes = {
english: 'en-US',
espanol: 'es-419',
chinese: 'zh',
@@ -96,7 +96,7 @@ const langCodes = {
Next, open the `client/src/utils/algolia-locale-setup.ts` file. This data is used for the search bar that loads `/news` articles. While it is unlikely that you are going to test this functionality, missing the data for your language can lead to errors when attempting to build the codebase locally.
Add an object for your language to the `algoliaIndices` object. You should use the values for the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
Add an object for your language to the `algoliaIndices` object. You should use the the same values as the `english` object for local testing, replacing the `english` key with your language's `availableLangs` value.
> [!NOTE] If we have already deployed an instance of news in your target language, you can update the values to reflect the live instance. Otherwise, use the English values.
@@ -130,8 +130,8 @@ const algoliaIndices = {
Finally, in your `.env` file, set `CLIENT_LOCALE` and `CURRICULUM_LOCALE` to your new language (use the `availableLangs` value.)
```txt
CLIENT_LOCALE="dothraki"
CURRICULUM_LOCALE="dothraki"
CLIENT_LOCALE=dothraki
CURRICULUM_LOCALE=dothraki
```
### Releasing a Superblock