@sveltia/cms 0.81.1 → 0.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -20
- package/dist/sveltia-cms.js +263 -203
- package/dist/sveltia-cms.js.map +1 -1
- package/dist/sveltia-cms.mjs +263 -203
- package/dist/sveltia-cms.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
|
|
|
10
10
|
|
|
11
11
|
<br>
|
|
12
12
|
|
|
13
|
-
<br>
|
|
14
14
|
|
|
15
15
|
<br>
|
|
16
16
|
|
|
@@ -68,7 +68,7 @@ The free, open source alternative/successor to Netlify/Decap CMS is now in publi
|
|
|
68
68
|
- [Specifying default sort field and direction](#specifying-default-sort-field-and-direction)
|
|
69
69
|
- [Including Hugo’s special index file in a folder collection](#including-hugos-special-index-file-in-a-folder-collection)
|
|
70
70
|
- [Using keyboard shortcuts](#using-keyboard-shortcuts)
|
|
71
|
-
- [
|
|
71
|
+
- [Translating entry fields with one click](#translating-entry-fields-with-one-click)
|
|
72
72
|
- [Localizing entry slugs](#localizing-entry-slugs)
|
|
73
73
|
- [Disabling non-default locale content](#disabling-non-default-locale-content)
|
|
74
74
|
- [Using a random ID for an entry slug](#using-a-random-id-for-an-entry-slug)
|
|
@@ -274,7 +274,9 @@ Sveltia CMS has been built with a multilingual architecture from the very beginn
|
|
|
274
274
|
- Users can easily switch between locales while editing by clicking a button instead of a dropdown list when there are less than 5 locales.
|
|
275
275
|
- Language labels appear in human-readable display names instead of ISO 639 language codes because it’s not easy for everyone to recognize `DE` as German, `NL` as Dutch, `ZH` as Chinese, and so on.
|
|
276
276
|
- Content editing
|
|
277
|
-
- [Integrates
|
|
277
|
+
- [Integrates Cloud Translation API](#translating-entry-fields-with-one-click) to allow translation of text fields from another locale with one click.
|
|
278
|
+
- Earlier versions of Sveltia CMS included DeepL integration, but it’s disabled for now [due to API limitations](https://github.com/sveltia/sveltia-cms/issues/437).
|
|
279
|
+
- More translation services will be added in the future.
|
|
278
280
|
- The Content Editor supports [RTL scripts](https://en.wikipedia.org/wiki/Right-to-left_script) such as Arabic, Hebrew and Persian.[^146]
|
|
279
281
|
- It’s possible to [disable non-default locale content](#disabling-non-default-locale-content).[^15]
|
|
280
282
|
- Boolean, DateTime, List and Number fields in the entry preview are displayed in a localized format.
|
|
@@ -900,12 +902,14 @@ Note that the special index file is placed right under the `folder`, regardless
|
|
|
900
902
|
|
|
901
903
|
Standard keyboard shortcuts are also available in the Markdown editor, including `Ctrl+B`/`Command+B` for bold text, `Ctrl+I`/`Command+I` for italics, and `Tab` to indent a list item.
|
|
902
904
|
|
|
903
|
-
###
|
|
905
|
+
### Translating entry fields with one click
|
|
904
906
|
|
|
905
|
-
Sveltia CMS comes with a handy
|
|
907
|
+
Sveltia CMS comes with a handy Google Cloud Translation API integration so that you can translate any text field from another locale without leaving the Content Editor. To enable the quick translation feature:
|
|
906
908
|
|
|
907
909
|
1. Update your configuration file to enable the [i18n support](https://decapcms.org/docs/i18n/) with multiple locales.
|
|
908
|
-
1. Sign up for [
|
|
910
|
+
1. Sign in or sign up for [Google Cloud](https://cloud.google.com/) and create a new project.
|
|
911
|
+
1. Enable [Cloud Translation API](https://console.cloud.google.com/apis/library/translate.googleapis.com).
|
|
912
|
+
1. Create a [new API key](https://console.cloud.google.com/apis/credentials) and copy it.
|
|
909
913
|
1. Open an entry in Sveltia CMS.
|
|
910
914
|
1. Click on the Translation button on the pane header or each field, right next to the 3-dot menu.
|
|
911
915
|
1. Paste your key when prompted.
|
|
@@ -913,13 +917,6 @@ Sveltia CMS comes with a handy DeepL integration so that you can translate any t
|
|
|
913
917
|
|
|
914
918
|
Note that the Translation button on the pane header only translates empty fields, while in-field Translation buttons override any filled text.
|
|
915
919
|
|
|
916
|
-
If you have upgraded to DeepL API Pro, provide your new Authentication Key:
|
|
917
|
-
|
|
918
|
-
1. Click the Account button in the upper right corner, then click Settings.
|
|
919
|
-
1. Select the Contents tab.
|
|
920
|
-
1. Replace your free API key ending with `:fx` with the new paid API key in the DeepL API Authentication Key field.
|
|
921
|
-
1. Close the Settings dialog.
|
|
922
|
-
|
|
923
920
|
### Localizing entry slugs
|
|
924
921
|
|
|
925
922
|
In Sveltia CMS, it’s possible to localize entry slugs (filenames) if the i18n structure is `multiple_files` or `multiple_folders`. All you need is the `localize` filter for `slug` template tags:
|
|
@@ -1287,15 +1284,10 @@ Then, add the following origins depending on your Git backend and enabled integr
|
|
|
1287
1284
|
```
|
|
1288
1285
|
https://images.unsplash.com https://api.unsplash.com
|
|
1289
1286
|
```
|
|
1290
|
-
-
|
|
1291
|
-
- `connect-src`
|
|
1292
|
-
```
|
|
1293
|
-
https://api-free.deepl.com
|
|
1294
|
-
```
|
|
1295
|
-
- DeepL API Pro:
|
|
1287
|
+
- Google Translate:
|
|
1296
1288
|
- `connect-src`
|
|
1297
1289
|
```
|
|
1298
|
-
https://
|
|
1290
|
+
https://translation.googleapis.com
|
|
1299
1291
|
```
|
|
1300
1292
|
- YouTube:
|
|
1301
1293
|
- `frame-src`
|