Skip to content

Commit ce41d64

Browse files
committed
Updated multilingual docs
1 parent 809c289 commit ce41d64

File tree

10 files changed

+51
-26
lines changed

10 files changed

+51
-26
lines changed

.frontmatter/database/mediaDb.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

components/Docs/Page.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22
import { PageFrontMatter } from '../../models/PageFrontMatter';
3-
import { PageActions } from './PageActions';
43
import { PageInfo } from './PageInfo';
54

65
export interface IPageProps {
@@ -13,8 +12,6 @@ export const Page: React.FunctionComponent<React.PropsWithChildren<IPageProps>>
1312
return (
1413
<div className={`max-w-7xl mx-auto px-4 sm:px-6 lg:px-8`}>
1514
<div className={`relative my-16 min-w-0 w-full flex-auto lg:max-h-full`} style={{ marginLeft: '-1px' }}>
16-
<PageActions page={page} />
17-
1815
{children}
1916

2017
<PageInfo page={page} items={items} />

components/Docs/PageActions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export const PageActions: React.FunctionComponent<IPageActionsProps> = ({ page }
1313
}
1414

1515
return (
16-
<div className={`absolute right-0`}>
16+
<div className={`mt-16 mb-8`}>
1717
<a
18-
className={`flex items-center text-whisper-500 hover:text-whisper-900 -mt-4`}
18+
className={`flex items-center text-whisper-900 hover:text-whisper-500`}
1919
href={`${Extension.githubDocs}/edit/${process.env.NEXT_PUBLIC_VERCEL_ENV === "production" ? "main" : "dev"}/content/docs/${page.fileName}.md`}
2020
target="_blank"
2121
rel={`noopener noreferrer`}>
22-
<PencilIcon className={`w-4 h-4 mr-2`} /> <span>Edit</span>
22+
<PencilIcon className={`w-4 h-4 mr-2`} /> <span>Edit page</span>
2323
</a>
2424
</div>
2525
);

components/Docs/PageInfo.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import * as React from 'react';
33
import { useMemo } from 'react';
44
import { Extension } from '../../constants/extension';
55
import { PageFrontMatter } from '../../models/PageFrontMatter';
6-
import { GitHub } from '../Images/GitHub';
76
import Giscus from "@giscus/react";
7+
import { PageActions } from './PageActions';
88

99
export interface IPageInfoProps {
1010
items: PageFrontMatter[];
@@ -36,13 +36,15 @@ export const PageInfo: React.FunctionComponent<IPageInfoProps> = ({ page, items
3636
}
3737

3838
const date = parseJSON(page.lastmod);
39-
const feedbackUrl = `${Extension.issueLink}/new?title=Feedback:%20&body=%0A%0A%5BEnter%20feedback%20here%5D%0A%0A%0A---%0A%23%23%23%23%20Document%20Details%0A%0A%E2%9A%A0%20*Do%20not%20edit%20this%20section*%0A%0A*%20ID%3A%20${page.fileName}%0A*%20URL%3A%20${`${process.env.NEXT_PUBLIC_VERCEL_ENV === "production" ? Extension.mainSite : Extension.betaSite}/docs/${page.fileName}`}%0A*%20Content%20Source%3A%20${encodeURIComponent(`/content/docs/${page.fileName}.md`)}`;
39+
// const feedbackUrl = `${Extension.issueLink}/new?title=Feedback:%20&body=%0A%0A%5BEnter%20feedback%20here%5D%0A%0A%0A---%0A%23%23%23%23%20Document%20Details%0A%0A%E2%9A%A0%20*Do%20not%20edit%20this%20section*%0A%0A*%20ID%3A%20${page.fileName}%0A*%20URL%3A%20${`${process.env.NEXT_PUBLIC_VERCEL_ENV === "production" ? Extension.mainSite : Extension.betaSite}/docs/${page.fileName}`}%0A*%20Content%20Source%3A%20${encodeURIComponent(`/content/docs/${page.fileName}.md`)}`;
4040

4141
return (
4242
<>
43+
<PageActions page={page} />
44+
4345
{
4446
(prevPage || nextPage) && (
45-
<div className={`mt-16 w-full flex justify-between gap-16 text-xl`}>
47+
<div className={`w-full flex justify-between gap-16 text-xl`}>
4648
{(prevPage && prevPage.slug && prevPage.title) && (
4749
<a href={`/docs/${(prevPage as PageFrontMatter).slug}`}
4850
title={prevPage.title}

content/changelog/CHANGELOG.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Change Log
22

3-
## [10.0.0] - 2024-xx-xx
3+
## [10.0.0] - 2024-xx-xx - [Release notes](https://beta.frontmatter.codes/updates/v10.0.0)
44

55
### ✨ New features
66

77
- [#731](https://github.com/estruyf/vscode-front-matter/issues/731): Added the ability to map/unmap taxonomy to multiple pages at once
88
- [#746](https://github.com/estruyf/vscode-front-matter/issues/746): Placeholder support added to to the `slug` field
99
- [#749](https://github.com/estruyf/vscode-front-matter/issues/749): Ability to set your own filters on the content dashboard with the `frontMatter.content.filters` setting
10-
- [[#756](https://github.com/estruyf/vscode-front-matter/issues/756): i18n/multilingual content support
10+
- [#756](https://github.com/estruyf/vscode-front-matter/issues/756): i18n/multilingual content support
1111

1212
### 🎨 Enhancements
1313

@@ -19,8 +19,6 @@
1919
- [#747](https://github.com/estruyf/vscode-front-matter/issues/747): The `@frontmatter/extensibility` dependency now supports scripts for placeholders
2020
- [#752](https://github.com/estruyf/vscode-front-matter/issues/752): Placeholder support in default `list` field values
2121

22-
### ⚡️ Optimizations
23-
2422
### 🐞 Fixes
2523

2624
- [#721](https://github.com/estruyf/vscode-front-matter/issues/721): Fix keywords regex to support unicode characters

content/changelog/v10.0.0.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Version 10.0.0 release notes
33
description: Discover the highly anticipated multilingual support in version 10.0.0 of our CMS, allowing you to manage content in multiple languages.
44
date: 2024-02-22T12:13:07.119Z
5-
lastmod: 2024-02-22T12:35:24.970Z
5+
lastmod: 2024-02-22T14:30:00.989Z
66
slug: v10.0.0
77
type: changelog
88
---
@@ -14,8 +14,9 @@ You can now define the languages and use the CMS to manage your content in multi
1414

1515
![Multilingual content](/releases/v10.0.0/multilingual-content.png)
1616

17-
The CMS also integrated its first third-party service to provide automatic translations
18-
for your content. In this release, we added support for [DeepL](https://www.deepl.com).
17+
The CMS also integrated its first third-party services to provide automatic translations
18+
for your content. In this release, we added support for [DeepL](https://www.deepl.com)
19+
and [Azure AI Translator](https://azure.microsoft.com/en-us/products/ai-services/ai-translator).
1920

2021
> **Info**: More information can be found in the [multilingual documentation](/docs/content-creation/multilingual).
2122

content/docs/content-creation/multilingual.md

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Multilingual
33
slug: content-creation/multilingual
44
description: null
55
date: 2024-02-21T09:10:16.640Z
6-
lastmod: 2024-02-22T09:02:18.228Z
6+
lastmod: 2024-02-22T14:41:02.138Z
77
weight: 200.71
88
---
99

@@ -177,11 +177,30 @@ then you can use any of the following methods to create a new translation:
177177
## Automatic language translation
178178

179179
By default, the multilingual feature does not include automatic language translation of
180-
content. However, you can make use of [DeepL](https://www.deepl.com/) for automatic
181-
language translation.
180+
content. However, you can make use of [DeepL](https://www.deepl.com/) or
181+
[Azure AI Translator](https://azure.microsoft.com/en-us/products/ai-services/ai-translator)
182+
for automatic language translation.
182183

183-
To enable automatic language translation, you need to provide your authentication key
184-
from DeepL.
184+
To enable automatic language translation, you need to configure the authentication
185+
settings for the translation service.
186+
187+
### Configure Azure AI Translator
188+
189+
Follow the next steps in order to configure the Azure AI Translator authentication key:
190+
191+
- Go to the [Azure Portal](https://portal.azure.com/)
192+
- Go to your `Azure AI Translator` resource
193+
- Click on the `Keys and Endpoint` menu item
194+
- Copy the `Key 1` or `Key 2` and the `Region` values
195+
- Back in Visual Studio Code, open the Front Matter CMS dashboard
196+
- Click on the gear icon in the top right corner to open the settings view
197+
- Click on the `Integration` tab
198+
- Paste the `Key 1` or `Key 2` in the `Subscription key` field
199+
- Paste the `Region` in the `Region` field
200+
201+
![Azure AI Translator Configuration](/releases/v10.0.0/azure-translator-config.png)
202+
203+
- Save the settings and start creating translations
185204

186205
### Configure DeepL
187206

@@ -194,7 +213,15 @@ Follow the next steps in order to configure the DeepL authentication key:
194213
- Click on the `Integration` tab
195214
- Paste the `Authentication Key for DeepL API` in the `Authentication key` field
196215

197-
![DeepL Authentication Key](/releases/v10.0.0/deepl-authentication-key.png)
216+
![DeepL Authentication Key Configuration](/releases/v10.0.0/deepl-authentication-config.png)
217+
218+
- Save the settings and start creating translations
219+
220+
### Start translating
221+
222+
Once you configured Deepl or Azure AI Translator, when you [create a new translation](docs/content-creation/multilingual#create-a-translation),
223+
the CMS will automatically submit the article title, description, and content to the
224+
translation service.
198225

199-
Once you provided the authentication key, when you create a new translation, the
200-
content will be automatically translated to the target language.
226+
> **Important**: If anything goes wrong with the translation. The CMS will show an error message
227+
> and create a copy of the original content in the target locale folder.
25.3 KB
Loading
27.2 KB
Loading

styles/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ h5.header__offset {
9696
}
9797

9898
ul {
99-
@apply list-disc pl-5 my-4;
99+
@apply list-disc pl-5 my-4 space-y-1;
100100
}
101101

102102
ol {

0 commit comments

Comments
 (0)