承接 thinktomorrow/squanto 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thinktomorrow/squanto

Composer 安装命令:

composer require thinktomorrow/squanto

包简介

Text manager for static laravel translations during and after development

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Manage the static translations of your Laravel application during and after development. Squanto, its name derived from one of the first Native Indian interpreters, is an opinionated way to manage the translations in database.

NOTE: This package is still in development and the api will be subject to change. That being said, please do try this package out as feedback is much appreciated!

Requirements

  • php >= 7.4.7
  • Laravel >= 8.0

Install

Via Composer

$ composer require thinktomorrow/squanto

Setup

The service providers of the package will be discovered automatically by Laravel. Note that there are two providers: one general package service provider but also a separate one for the Manager browser UI.

Run the migrations. This will add a table called squanto_lines to your database.

$ php artisan migrate

Next, publish the config file.

    php artisan vendor:publish --tag=squanto-config

In the config, set the different locales you'll wish to maintain via squanto. Most of the other config settings are sensible defaults and should work fine.

Admin interface

routes

Add the following routes. These are the route definitions for viewing and editing the translations. Make sure you'll add the necessary authentication middleware.

Route::get('translations/{id}/edit', [\Thinktomorrow\Squanto\Manager\Http\ManagerController::class, 'edit'])->name('squanto.edit');
Route::put('translations/{id}', [\Thinktomorrow\Squanto\Manager\Http\ManagerController::class, 'update'])->name('squanto.update');
Route::get('translations', [\Thinktomorrow\Squanto\Manager\Http\ManagerController::class, 'index'])->name('squanto.index');

Wysiswyg editor

The 'redactor' editor is required so you'll need to include the css and js assets. This is not provided since you'll need a licence. Feel free to switch editors. The textareas that require a wysiwyg are assigned the redactor-editor class.

Usage

The following console commands are available for the developer.

# Push all language lines to the database. Existing database values will remain untouched.
$ php artisan squanto:push

# Remove database lines that are no longer present in the language files.
$ php artisan squanto:purge

# Check if your database lines are up to date, and if a push or purge command is advised.
$ php artisan squanto:check

# Rebuild the database cache.
$ php artisan squanto:cache

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Security

If you discover any security related issues, please email to dev@thinktomorrow.be instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 42.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-10-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固