@localazy/strapi-plugin 0.1.12-rc.0 → 0.1.12-rc.2

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 CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Strapi localization doesn't have to be a headache! Install the Strapi localization plugin and seamlessly translate your content into multiple languages with [Localazy](https://localazy.com).
4
4
 
5
- ### Manage your multilingual content with ease.
6
- 1. [Sign up](https://localazy.com/register?ref=strapi_marketplace) & Upload your content to Localazy.
7
- 2. Translate your content with machine translation assistance, or let the Localazy Continuous Localization Team translate your content for you. You can also quickly pre-translate everything in bulk or invite your translators.
5
+ ### Manage your multilingual content with ease
6
+ 1. [Sign up](https://localazy.com/register) & Upload your content to Localazy.
7
+ 2. Translate your content with machine translation assistance, or let the Localazy [Continuous Localization Team](https://localazy.com/blog/guide-localazy-translation-services) translate your content for you. You can also quickly pre-translate everything in bulk or invite your translators.
8
8
  3. Download translated content back to Strapi and feel the seamless experience of multilingual content management.
9
9
 
10
- Learn more in the [Strapi + Localazy tutorial](https://localazy.com/blog/how-to-strapi-localization-with-localazy#getting-started-with-strapi-localization).
10
+ 📰 Learn more in the [Strapi + Localazy tutorial](https://localazy.com/blog/how-to-strapi-localization-with-localazy#getting-started-with-strapi-localization).
11
11
 
12
12
  ## Setup
13
13
 
14
- ### Install plugin via NPM
14
+ ### Install the plugin via NPM
15
15
 
16
16
  The plugin is available on [NPM](https://www.npmjs.com/package/@localazy/strapi-plugin).
17
17
  You can also follow the installation commands located in your Strapi project Marketplace. This is the recommended approach.
@@ -20,7 +20,7 @@ You can also follow the installation commands located in your Strapi project Mar
20
20
  npm install @localazy/strapi-plugin
21
21
  ```
22
22
 
23
- ### Use plugin in a clean project locally
23
+ ### Use the plugin in a clean project locally
24
24
 
25
25
  Besides installing the plugin via `npm`, you can also use it in a project locally. Assuming you have a (clean) Strapi project set up, do:
26
26
 
@@ -42,19 +42,22 @@ module.exports = {
42
42
  };
43
43
  ```
44
44
 
45
-
46
45
  5. Run the project. The plugin will be available in the admin.
47
46
 
48
- ## Tests
47
+ ### Tests
49
48
 
50
- To run tests, run `npm run test` command. To watch tests, run `npm run test:watch` command.
49
+ To run tests, run the `npm run test` command. To watch tests, run the `npm run test:watch` command.
51
50
 
52
- ## Support
53
- - If you encounter any issues or have questions, please contact us at [team@localazy.com](mailto:team@localazy.com).
54
- - Join the [Localazy Discord](https://discord.gg/CAVhHrh) to discuss all things localization.
55
-
56
- ## Configuration
57
51
  ### API Endpoints Prefix
58
- In case the Strapi Instance is running under a subfolder (`url` parameter in [Strapi documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/server.html#available-options)), Localazy Plugin needs to be additionally configured.
52
+ If your Strapi Instance is running in a subfolder (see the `url` parameter in [Strapi documentation](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/server.html#available-options)), the Localazy Plugin needs to be additionally configured to respect this.
53
+
54
+ You can use the `.env ` variable `STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX`. A value assigned to this variable will be used as the prefix.
59
55
 
60
- We provide a support for `.env ` variable `STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX`. A value assigned to this variable will be used as a prefix.
56
+
57
+ ## Additional Resources
58
+ - Localazy Docs: [Introduction to Strapi](https://localazy.com/docs/strapi/strapi-plugin-introduction-installation)
59
+ - Localazy Blog: [Articles about the Strapi plugin](https://localazy.com/tags/strapi)
60
+
61
+ ## Support
62
+ - If you encounter any issues or have questions, please contact us at [team@localazy.com](mailto:team@localazy.com).
63
+ - Join the [Localazy Discussion Forum](https://discuss.localazy.com/) to discuss all things localization.
@@ -5,7 +5,7 @@ import Upload from "@strapi/icons/Upload";
5
5
  import pluginId from "../../../pluginId";
6
6
  import i18n from "../../../i18n";
7
7
 
8
- const BASE_PATH = `/admin/plugins/${pluginId}`;
8
+ const BASE_PATH = `${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}`;
9
9
  const t = i18n.t;
10
10
  const gevNav = () => {
11
11
  return [
@@ -13,10 +13,10 @@ export const PLUGIN_ROUTES = {
13
13
 
14
14
  export default (route) => {
15
15
  if (route === PLUGIN_ROUTES.CONTENT_TRANSFER_SETUP) {
16
- history.push(`/admin/settings/${pluginId}/${route}`);
16
+ history.push(`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}settings/${pluginId}/${route}`);
17
17
 
18
18
  return;
19
19
  }
20
20
 
21
- history.push(`/admin/plugins/${pluginId}/${route}`);
21
+ history.push(`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}/${route}`);
22
22
  };
@@ -22,6 +22,7 @@ import buildContentTransferSetupSchema from "../../functions/build-content-trans
22
22
  import { getLocalazyIdentity } from "../../../../state/localazy-identity";
23
23
  import Tree from "../Tree";
24
24
  import ContentTransferSetupEmpty from "../ContentTransferSetupEmpty";
25
+ import pluginId from "../../../../pluginId";
25
26
 
26
27
  import "../../../../i18n";
27
28
 
@@ -197,7 +198,7 @@ function ContentTransferSetup() {
197
198
 
198
199
  return (
199
200
  <>
200
- {!isLoading && !isLoggedIn && <Redirect to="/plugins/localazy/login" />}
201
+ {!isLoading && !isLoggedIn && <Redirect to={`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}/login`} />}
201
202
 
202
203
  <HeaderLayout
203
204
  title={t("plugin_settings.content_transfer_setup")}
@@ -110,7 +110,7 @@ function App() {
110
110
  <>
111
111
  {!isLoggedIn && (
112
112
  <Switch>
113
- <Route path={`/admin/plugins/${pluginId}/login`} exact>
113
+ <Route path={`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}/login`} exact>
114
114
  <Login
115
115
  title={headerTitle}
116
116
  subtitle={headerSubtitle}
@@ -121,19 +121,19 @@ function App() {
121
121
 
122
122
  {isLoggedIn && (
123
123
  <Switch>
124
- <Route path={`/admin/plugins/${pluginId}/download`} exact>
124
+ <Route path={`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}/download`} exact>
125
125
  <Download
126
126
  title={headerTitle}
127
127
  subtitle={headerSubtitle}
128
128
  />
129
129
  </Route>
130
- <Route path={`/admin/plugins/${pluginId}/upload`} exact>
130
+ <Route path={`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}/upload`} exact>
131
131
  <Upload
132
132
  title={headerTitle}
133
133
  subtitle={headerSubtitle}
134
134
  />
135
135
  </Route>
136
- <Route path={`/admin/plugins/${pluginId}/settings`} exact>
136
+ <Route path={`${process.env.STRAPI_ADMIN_LOCALAZY_PLUGIN_BACKEND_PREFIX}${process.env.ADMIN_PATH}plugins/${pluginId}/settings`} exact>
137
137
  <Settings
138
138
  title={headerTitle}
139
139
  subtitle={headerSubtitle}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localazy/strapi-plugin",
3
- "version": "0.1.12-rc.0",
3
+ "version": "0.1.12-rc.2",
4
4
  "description": "The official Strapi Plugin by Localazy.",
5
5
  "strapi": {
6
6
  "name": "localazy",