init i18n plugin

This commit is contained in:
Pierre Noël 2021-01-22 17:57:15 +01:00
parent dcb115275e
commit 3729f69e08
30 changed files with 379 additions and 27 deletions

View File

@ -32,6 +32,7 @@
"strapi-provider-email-mailgun": "3.4.4",
"strapi-provider-upload-aws-s3": "3.4.4",
"strapi-provider-upload-cloudinary": "3.4.4",
"strapi-plugin-i18n": "3.4.4",
"strapi-utils": "3.4.4"
},
"strapi": {

View File

@ -33,4 +33,5 @@ module.exports = {
'strapi-plugin-email': require('../../../strapi-plugin-email/admin/src').default,
'strapi-plugin-upload': require('../../../strapi-plugin-upload/admin/src').default,
'strapi-plugin-graphql': require('../../../strapi-plugin-graphql/admin/src').default,
'strapi-plugin-i18n': require('../../../strapi-plugin-i18n/admin/src').default,
};

View File

@ -25,5 +25,7 @@
"notification.update.success": "Settings updated successfully",
"notification.delete.success": "Doc deleted",
"notification.generate.success": "Doc generated",
"plugin.name": "Documentation"
"plugin.name": "Documentation",
"plugin.description.long": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
"plugin.description.short": "Create an OpenAPI Document and visualize your API with SWAGGER UI."
}

View File

@ -8,20 +8,22 @@
"containers.HomePage.PluginHeader.description": "Configurez votre plugin de documentation",
"containers.HomePage.PluginHeader.title": "Documentation - Paramètres",
"containers.HomePage.PopUpWarning.confirm": "Supprimer",
"containers.HomePage.PopUpWarning.message": "Êtes-vous sûre de vouloir supprimer cette version?",
"containers.HomePage.PopUpWarning.message": "Êtes-vous sûr·e de vouloir supprimer cette version ?",
"containers.HomePage.copied": "Token copié dans le presse papier",
"containers.HomePage.form.jwtToken": "Récuperez votre jwt token",
"containers.HomePage.form.jwtToken.description": "Copiez ce token et utilisez le dans swagger pour effectuer des requêtes",
"containers.HomePage.form.password": "Mot de passe",
"containers.HomePage.form.password.inputDescription": "Définir le mot de passe pour accèder à la documentation.",
"containers.HomePage.form.password.inputDescription": "Définir le mot de passe pour accéder à la documentation.",
"containers.HomePage.form.restrictedAccess": "Accès restreint",
"containers.HomePage.form.restrictedAccess.inputDescription": "Limiter l'accès à la documentation. Par défaut, celui-ci est publique.",
"containers.HomePage.form.restrictedAccess.inputDescription": "Limiter l'accès à la documentation. Par défaut, celle-ci est publique.",
"containers.HomePage.form.showGeneratedFiles": "Montrer les fichiers générés",
"containers.HomePage.form.showGeneratedFiles.inputDescription": "Cette option est pratique lorsque que vous voulez modifier votre documentation. \nLe plugin va générer les fichiers par modèle.",
"error.deleteDoc.versionMissing": "La version que vous essayer de supprimer n'existe pas.",
"error.deleteDoc.versionMissing": "La version que vous essayez de supprimer n'existe pas.",
"error.noVersion": "Une version de documentation est nécessaire",
"error.regenerateDoc": "Une erreur est survenue en recréant la documentation",
"error.regenerateDoc.versionMissing": "La version que vous essayer de créer n'existe pas.",
"notification.update.success": "Vos paramètre ont été enregistré",
"plugin.name": "Documentation"
"error.regenerateDoc.versionMissing": "La version que vous essayez de créer n'existe pas.",
"notification.update.success": "Vos paramètres ont été enregistrés",
"plugin.name": "Documentation",
"plugin.description.long": "Créez un document OpenAPI et visualisez votre API avec SWAGGER UI.",
"plugin.description.short": "Créez un document OpenAPI et visualisez votre API avec SWAGGER UI."
}

View File

@ -1,11 +1,11 @@
{
"name": "strapi-plugin-documentation",
"version": "3.4.4",
"description": "Automatically generates documentation for your api.",
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI.",
"strapi": {
"name": "Documentation",
"icon": "book",
"description": "Create an OpenAPI Document and visualize your API with SWAGGER UI."
"description": "documentation.plugin.description"
},
"scripts": {
"test": "echo \"no tests yet\""

View File

@ -1,4 +1,4 @@
{
"plugin.description.long": "Envoyez des emails",
"plugin.description.short": "Envoyez des emails"
"plugin.description.long": "Envoyez des emails.",
"plugin.description.short": "Envoyez des emails."
}

View File

@ -1,5 +1,4 @@
{
"plugin.description.long": "Kirim surel.",
"plugin.description.short": "Kirim surel."
}
"plugin.description.long": "Kirim surel.",
"plugin.description.short": "Kirim surel."
}

View File

@ -1,13 +1,7 @@
// NOTE TO PLUGINS DEVELOPERS:
// If you modify this file by adding new options to the plugin entry point
// Here's the file: strapi/docs/3.0.0-beta.x/plugin-development/frontend-field-api.md
// Here's the file: strapi/docs/3.0.0-beta.x/guides/registering-a-field-in-admin.md
// Also the strapi-generate-plugins/files/admin/src/index.js needs to be updated
// IF THE DOC IS NOT UPDATED THE PULL REQUEST WILL NOT BE MERGED
import pluginPkg from '../../package.json';
import pluginId from './pluginId';
import pluginLogo from './assets/images/logo.svg';
import trads from './translations';
export default strapi => {
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
@ -28,7 +22,7 @@ export default strapi => {
name: pluginPkg.strapi.name,
pluginLogo,
preventComponentRendering: false,
trads: {},
trads,
};
return strapi.registerPlugin(plugin);

View File

@ -0,0 +1,4 @@
{
"plugin.description.long": "Adds GraphQL endpoint with default API methods.",
"plugin.description.short": "Adds GraphQL endpoint with default API methods."
}

View File

@ -0,0 +1,4 @@
{
"plugin.description.long": "Crée un endpoint GraphQL supportant les méthodes par défaut de l'API.",
"plugin.description.short": "Crée un endpoint GraphQL supportant les méthodes par défaut de l'API."
}

View File

@ -0,0 +1,9 @@
import en from './en.json';
import fr from './fr.json';
const trads = {
en,
fr,
};
export default trads;

View File

@ -5,7 +5,7 @@
"strapi": {
"name": "graphql",
"icon": "plug",
"description": "Adds GraphQL endpoint with default API methods."
"description": "graphql.plugin.description"
},
"scripts": {
"test": "echo \"no tests yet\""

View File

@ -0,0 +1,7 @@
root = true
[*]
end_of_line = lf
insert_final_newline = false
indent_style = space
indent_size = 2

View File

@ -0,0 +1,103 @@
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto
#
# The above will handle all files NOT found below
#
#
## These files are text and should be normalized (Convert crlf => lf)
#
# source code
*.php text
*.css text
*.sass text
*.scss text
*.less text
*.styl text
*.js text eol=lf
*.coffee text
*.json text
*.htm text
*.html text
*.xml text
*.svg text
*.txt text
*.ini text
*.inc text
*.pl text
*.rb text
*.py text
*.scm text
*.sql text
*.sh text
*.bat text
# templates
*.ejs text
*.hbt text
*.jade text
*.haml text
*.hbs text
*.dot text
*.tmpl text
*.phtml text
# git config
.gitattributes text
.gitignore text
.gitconfig text
# code analysis config
.jshintrc text
.jscsrc text
.jshintignore text
.csslintrc text
# misc config
*.yaml text
*.yml text
.editorconfig text
# build config
*.npmignore text
*.bowerrc text
# Heroku
Procfile text
.slugignore text
# Documentation
*.md text
LICENSE text
AUTHORS text
#
## These files are binary and should be left untouched
#
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary

10
packages/strapi-plugin-i18n/.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
# Dont check auto-generated files into git
coverage
node_modules
stats.json
package-lock.json
# Cruft
.DS_Store
npm-debug.log
.idea

View File

@ -0,0 +1,103 @@
############################
# OS X
############################
.DS_Store
.AppleDouble
.LSOverride
Icon
.Spotlight-V100
.Trashes
._*
############################
# Linux
############################
*~
############################
# Windows
############################
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/
*.cab
*.msi
*.msm
*.msp
############################
# Packages
############################
*.7z
*.csv
*.dat
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip
*.com
*.class
*.dll
*.exe
*.o
*.seed
*.so
*.swo
*.swp
*.swn
*.swm
*.out
*.pid
############################
# Logs and databases
############################
*.log
*.sql
############################
# Misc.
############################
*#
ssl
.editorconfig
.gitattributes
.idea
nbproject
############################
# Node.js
############################
lib-cov
lcov.info
pids
logs
results
node_modules
.node_history
############################
# Tests
############################
test
testApp
coverage

View File

@ -0,0 +1,22 @@
Copyright (c) 2015-present Strapi Solutions SAS
Portions of the Strapi software are licensed as follows:
* All software that resides under an "ee/" directory (the “EE Software”), if that directory exists, is licensed under the license defined in "ee/LICENSE".
* All software outside of the above-mentioned directories or restrictions above is available under the "MIT Expat" license as set forth below.
MIT Expat License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1 @@
# strapi-plugin-i18n

View File

@ -0,0 +1 @@
<svg width="30" height="30" xmlns="http://www.w3.org/2000/svg"><text transform="translate(-19 -4)" fill="#4B515A" fill-rule="evenodd" font-size="30" font-family="AppleColorEmoji, Apple Color Emoji"><tspan x="19" y="32">🌍</tspan></text></svg>

After

Width:  |  Height:  |  Size: 245 B

View File

@ -0,0 +1,29 @@
import pluginPkg from '../../package.json';
import pluginId from './pluginId';
import pluginLogo from './assets/images/logo.svg';
import trads from './translations';
export default strapi => {
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
const plugin = {
blockerComponent: null,
blockerComponentProps: {},
description: pluginDescription,
icon: pluginPkg.strapi.icon,
id: pluginId,
isReady: true,
initializer: () => null,
injectedComponents: [],
isRequired: pluginPkg.strapi.required || false,
layout: null,
lifecycles: () => {},
mainComponent: null,
name: pluginPkg.strapi.name,
pluginLogo,
preventComponentRendering: false,
trads,
};
return strapi.registerPlugin(plugin);
};

View File

@ -0,0 +1,5 @@
import pluginPkg from '../../package.json';
const pluginId = pluginPkg.name.replace(/^strapi-plugin-/i, '');
export default pluginId;

View File

@ -0,0 +1,4 @@
{
"plugin.description.long": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API.",
"plugin.description.short": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API."
}

View File

@ -0,0 +1,4 @@
{
"plugin.description.long": "Ce plugin permet de créer, lire et modifier votre contenu en différentes langues, et ce, depuis le Panel d'Administraion et l'API.",
"plugin.description.short": "Ce plugin permet de créer, lire et modifier votre contenu en différentes langues, et ce, depuis le Panel d'Administraion et l'API."
}

View File

@ -0,0 +1,9 @@
import en from './en.json';
import fr from './fr.json';
const trads = {
en,
fr,
};
export default trads;

View File

@ -0,0 +1,3 @@
'use strict';
module.exports = () => {};

View File

@ -0,0 +1,3 @@
{
"routes": []
}

View File

@ -0,0 +1,3 @@
'use strict';
module.exports = {};

View File

@ -0,0 +1,29 @@
{
"name": "strapi-plugin-i18n",
"version": "3.4.4",
"description": "This plugin enables to create, to read and to update content in different languages, both from the Admin Panel and from the API",
"strapi": {
"name": "Internationalisation",
"icon": "round-language",
"description": "i18n.plugin.description",
"required": false
},
"dependencies": {},
"author": {
"name": "A Strapi developer",
"email": "",
"url": ""
},
"maintainers": [
{
"name": "A Strapi developer",
"email": "",
"url": ""
}
],
"engines": {
"node": ">=10.16.0 <=14.x.x",
"npm": ">=6.0.0"
},
"license": "SEE LICENSE IN LICENSE"
}

View File

@ -59,7 +59,7 @@
"Settings.section-label": "Users & Permissions plugin",
"notification.success.submit": "Settings have been updated",
"plugin.description.long": "Protect your API with a full authentication process based on JWT. This plugin comes also with an ACL strategy that allows you to manage the permissions between the groups of users.",
"plugin.description.short": "Protect your API with a full authentication process based on JWT",
"plugin.description.short": "Protect your API with a full authentication process based on JWT.",
"plugin.name": "Users & Permissions Plugin",
"popUpWarning.button.cancel": "Cancel",
"popUpWarning.button.confirm": "Confirm",

View File

@ -50,6 +50,6 @@
"PopUpForm.Providers.subdomain.placeholder": "my.subdomain.com",
"notification.success.submit": "Les configurations ont bien été sauvegardés",
"plugin.description.long": "Protégez votre API avec un système d'authentification complet basé sur JWT (JSON Web Token). Ce plugin ajoute aussi une stratégie ACL (Access Control Layer) qui vous permet de gérer les permissions entre les groupes d'utilisateurs.",
"plugin.description.short": "Protégez votre API avec un système d'authentification complet basé sur JWT",
"plugin.description.short": "Protégez votre API avec un système d'authentification complet basé sur JWT.",
"plugin.name": "Rôles et autorisations"
}