Skip to content

Commit 58e000e

Browse files
committed
First commit
0 parents  commit 58e000e

File tree

13 files changed

+511
-0
lines changed

13 files changed

+511
-0
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# For more information about the properties used in this file,
2+
# please see the EditorConfig documentation:
3+
# http://editorconfig.org
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
indent_size = 4
9+
indent_style = space
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.{yml,js,json,css,scss,feature,eslintrc}]
14+
indent_size = 2
15+
indent_style = space
16+
17+
[composer.json]
18+
indent_size = 4

.php_cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
/**
3+
* This is the php-cs-fixer Laravel 6.x style .php_cs VsCode config file for Amila Laravel CMS
4+
*/
5+
$finder = PhpCsFixer\Finder::create()
6+
->notPath('bootstrap/cache')
7+
->notPath('storage')
8+
->notPath('vendor')
9+
->in(__DIR__)
10+
->name('*.php')
11+
->notName('*.blade.php')
12+
->ignoreDotFiles(true)
13+
->ignoreVCS(true)
14+
;
15+
16+
return PhpCsFixer\Config::create()
17+
->setRules(array(
18+
'@Symfony' => true,
19+
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
20+
'array_syntax' => ['syntax' => 'short'],
21+
'linebreak_after_opening_tag' => true,
22+
'not_operator_with_successor_space' => true,
23+
'ordered_imports' => true,
24+
'phpdoc_order' => true,
25+
))
26+
->setFinder($finder)
27+
;

.styleci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
preset: laravel
2+
risky: false
3+
enabled:
4+
- alpha_ordered_imports
5+
- align_double_arrow
6+
- align_equals
7+
disabled:
8+
- length_ordered_imports
9+
- unused_use
10+
- unalign_equals
11+
finder:
12+
exclude:
13+
- modules
14+
- node_modules
15+
- storage
16+
- vendor
17+
name: "*.php"
18+
not-name: "*.blade.php"

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Translate content online by Baidu AI or Google AI
2+
3+
- This is an Amila Laravel CMS Plugin
4+
- Translate content online
5+
6+
## Install it via the backend
7+
8+
- Go to the CMS settings page -> Plugin -> search for remote image
9+
- Find alexstack/laravel-cms-plugin-translator
10+
- Click the Install button
11+
12+
## What the plugin do for us?
13+
14+
- Translate content online
15+
- Add the translate result to the page content
16+
17+
## Install it via command line manually
18+
19+
```php
20+
composer require alexstack/laravel-cms-plugin-translator
21+
22+
php artisan migrate --path=./vendor/alexstack/laravel-cms-plugin-translator/src/database/migrations
23+
24+
php artisan vendor:publish --force --tag=translator-views
25+
26+
php artisan laravelcms --action=clear
27+
28+
```
29+
30+
## How to use it?
31+
32+
- It's enabled after install by default. You can see a Translator tab when you edit a page.
33+
- You don't need to do anything after install
34+
35+
## How to change the settings?
36+
37+
- You can change the settings by edit plugin.page-tab-translator
38+
39+
```json
40+
41+
```
42+
43+
## Improve this plugin & documents
44+
45+
- You are very welcome to improve this plugin and how to use documents
46+
47+
## License
48+
49+
- This Amila Laravel CMS plugin is an open-source software licensed under the MIT license.

code-of-conduct.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Code of Conduct
2+
3+
- Check the .php_cs

codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: false

composer.json

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"name": "alexstack/laravel-cms-plugin-translator",
3+
"description": "Translate content when you add or edit a page",
4+
"type": "amila-laravel-cms-plugin",
5+
"homepage": "https://github.com/AlexStack/Laravel-CMS-Plugin-Translator",
6+
"keywords": [
7+
"laravel",
8+
"amila laravel cms",
9+
"translate",
10+
"amila laravel cms plugin"
11+
],
12+
"license": "MIT",
13+
"support": {
14+
"issues": "https://github.com/AlexStack/Laravel-CMS-Plugin-Translator/issues"
15+
},
16+
"authors": [{
17+
"name": "Alex",
18+
"homepage": "https://github.com/AlexStack/Laravel-CMS-Plugin-Translator"
19+
}],
20+
"require": {
21+
"php": ">=7.0.0",
22+
"alexstack/laravel-cms": "*"
23+
},
24+
"autoload": {
25+
"psr-4": {
26+
"Amila\\LaravelCms\\Plugins\\Translator\\": "src/"
27+
}
28+
},
29+
"minimum-stability": "dev",
30+
"extra": {
31+
"laravel": {
32+
"providers": [
33+
"Amila\\LaravelCms\\Plugins\\Translator\\LaravelCmsPluginServiceProvider"
34+
]
35+
},
36+
"laravel-cms": {
37+
"plugin-param-name": "page-tab-translator"
38+
}
39+
},
40+
"scripts": {
41+
"post-package-install": [
42+
"php artisan migrate --path=./vendor/alexstack/laravel-cms-plugin-translator/src/database/migrations/",
43+
"php artisan vendor:publish --provider=Amila\\LaravelCms\\Plugins\\Translator\\LaravelCmsPluginServiceProvider",
44+
"php artisan laravelcms --action=clear"
45+
]
46+
}
47+
}

contributing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
- Any open source product is only as good as the community behind it. You can participate by sharing code, ideas, or simply helping others. No matter what your skill level is, every contribution counts.

license.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (C) 2019-2020 Alex Zeng
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

0 commit comments

Comments
 (0)