mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 13:04:38 -04:00
Translations
This commit is contained in:
parent
af19afedb5
commit
269f83f317
@ -7,9 +7,9 @@ class SchedulerController extends Controller
|
|||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
if (auth()->user()->company()->account->latest_version == '0.0.0') {
|
if (auth()->user()->company()->account->latest_version == '0.0.0') {
|
||||||
return response()->json(['message' => 'Scheduler has never run'], 400);
|
return response()->json(['message' => ctrans('texts.scheduler_has_never_run')], 400);
|
||||||
} else {
|
} else {
|
||||||
return response()->json(['message' => 'Scheduler has run'], 200);
|
return response()->json(['message' => ctrans('texts.scheduler_has_run')], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class SelfUpdateController extends BaseController
|
|||||||
define('STDIN', fopen('php://stdin', 'r'));
|
define('STDIN', fopen('php://stdin', 'r'));
|
||||||
|
|
||||||
if (Ninja::isNinja()) {
|
if (Ninja::isNinja()) {
|
||||||
return response()->json(['message' => 'Self update not available on this system.'], 403);
|
return response()->json(['message' => ctrans('texts.self_update_not_available')], 403);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .git MUST be owned/writable by the webserver user */
|
/* .git MUST be owned/writable by the webserver user */
|
||||||
|
@ -1,101 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Invoice Ninja (https://invoiceninja.com).
|
|
||||||
*
|
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
||||||
*
|
|
||||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
|
||||||
*
|
|
||||||
* @license https://opensource.org/licenses/AAL
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class SettingsController.
|
|
||||||
*/
|
|
||||||
class SettingsController extends BaseController
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for creating a new resource.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for editing the specified resource.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function update(Request $request, $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,123 +0,0 @@
|
|||||||
<?php
|
|
||||||
/**
|
|
||||||
* Invoice Ninja (https://invoiceninja.com).
|
|
||||||
*
|
|
||||||
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
||||||
*
|
|
||||||
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
|
|
||||||
*
|
|
||||||
* @license https://opensource.org/licenses/AAL
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Cache;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class TranslationController.
|
|
||||||
*/
|
|
||||||
class TranslationController extends BaseController
|
|
||||||
{
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display a listing of the resource.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function index()
|
|
||||||
{
|
|
||||||
$strings = Cache::rememberForever('lang.js', function () {
|
|
||||||
$lang = config('app.locale');
|
|
||||||
|
|
||||||
$files = glob(resource_path('lang/'.$lang.'/*.php'));
|
|
||||||
$strings = [];
|
|
||||||
|
|
||||||
foreach ($files as $file) {
|
|
||||||
$name = basename($file, '.php');
|
|
||||||
$strings[$name] = require $file;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $strings;
|
|
||||||
});
|
|
||||||
|
|
||||||
header('Content-Type: text/javascript');
|
|
||||||
echo 'i18n = '.$this->easyMinify(json_encode($strings)).';';
|
|
||||||
exit();
|
|
||||||
}
|
|
||||||
|
|
||||||
private function easyMinify($javascript)
|
|
||||||
{
|
|
||||||
return preg_replace(["/\s+\n/", "/\n\s+/", '/ +/'], ["\n", "\n ", ' '], $javascript);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for creating a new resource.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function create()
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Store a newly created resource in storage.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function store(Request $request)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Display the specified resource.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function show($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the form for editing the specified resource.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function edit($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update the specified resource in storage.
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function update(Request $request, $id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Remove the specified resource from storage.
|
|
||||||
*
|
|
||||||
* @param int $id
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function destroy($id)
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
@ -668,6 +668,6 @@ class UserController extends BaseController
|
|||||||
$company_user->delete();
|
$company_user->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json(['message' => 'User detached from company'], 200);
|
return response()->json(['message' => ctrans('texts.user_detached')], 200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ class WebhookController extends BaseController
|
|||||||
$webhook->save();
|
$webhook->save();
|
||||||
|
|
||||||
if (! $webhook->id) {
|
if (! $webhook->id) {
|
||||||
return response()->json('Failed to create Webhook', 400);
|
return response()->json(ctrans('texts.create_webhook_failure'), 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->itemResponse($webhook);
|
return $this->itemResponse($webhook);
|
||||||
|
@ -25,13 +25,4 @@ class EditClientRequest extends Request
|
|||||||
return auth()->user()->can('edit', $this->client);
|
return auth()->user()->can('edit', $this->client);
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function prepareForValidation()
|
|
||||||
// {
|
|
||||||
// $input = $this->all();
|
|
||||||
|
|
||||||
// //$input['id'] = $this->encodePrimaryKey($input['id']);
|
|
||||||
|
|
||||||
// $this->replace($input);
|
|
||||||
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
@ -3424,4 +3424,9 @@ return [
|
|||||||
'invalid_design_object' => 'Invalid custom design object',
|
'invalid_design_object' => 'Invalid custom design object',
|
||||||
'quote_not_found' => 'Quote/s not found',
|
'quote_not_found' => 'Quote/s not found',
|
||||||
'quote_unapprovable' => 'Unable to approve this quote as it has expired.',
|
'quote_unapprovable' => 'Unable to approve this quote as it has expired.',
|
||||||
|
'scheduler_has_run' => 'Scheduler has run',
|
||||||
|
'scheduler_has_never_run' => 'Scheduler has never run',
|
||||||
|
'self_update_not_available' => 'Self update not available on this system.',
|
||||||
|
'user_detached' => 'User detached from company',
|
||||||
|
'create_webhook_failure' => 'Failed to create Webhook',
|
||||||
];
|
];
|
||||||
|
@ -178,8 +178,6 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
|||||||
|
|
||||||
Route::post('tasks/bulk', 'TaskController@bulk')->name('tasks.bulk');
|
Route::post('tasks/bulk', 'TaskController@bulk')->name('tasks.bulk');
|
||||||
|
|
||||||
|
|
||||||
Route::get('settings', 'SettingsController@index')->name('user.settings');
|
|
||||||
*/
|
*/
|
||||||
Route::get('scheduler', 'SchedulerController@index');
|
Route::get('scheduler', 'SchedulerController@index');
|
||||||
Route::post('support/messages/send', 'Support\Messages\SendingController');
|
Route::post('support/messages/send', 'Support\Messages\SendingController');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user