mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Cast all translations to strings.
This commit is contained in:
@@ -296,7 +296,7 @@ class ConfigureRolesHandler implements FileConfigurationInterface
|
||||
{
|
||||
$roles = [];
|
||||
foreach (array_keys(config('csv.import_roles')) as $role) {
|
||||
$roles[$role] = trans('import.column_' . $role);
|
||||
$roles[$role] = (string)trans('import.column_' . $role);
|
||||
}
|
||||
asort($roles);
|
||||
|
||||
|
@@ -80,7 +80,7 @@ class ConfigureUploadHandler implements FileConfigurationInterface
|
||||
}
|
||||
if (!$complete) {
|
||||
$messages = new MessageBag;
|
||||
$messages->add('account', trans('import.invalid_import_account'));
|
||||
$messages->add('account', (string)trans('import.invalid_import_account'));
|
||||
|
||||
return $messages;
|
||||
}
|
||||
@@ -96,9 +96,9 @@ class ConfigureUploadHandler implements FileConfigurationInterface
|
||||
public function getNextData(): array
|
||||
{
|
||||
$delimiters = [
|
||||
',' => trans('form.csv_comma'),
|
||||
';' => trans('form.csv_semicolon'),
|
||||
'tab' => trans('form.csv_tab'),
|
||||
',' => (string)trans('form.csv_comma'),
|
||||
';' => (string)trans('form.csv_semicolon'),
|
||||
'tab' => (string)trans('form.csv_tab'),
|
||||
];
|
||||
$config = $this->importJob->configuration;
|
||||
$config['date-format'] = $config['date-format'] ?? 'Ymd';
|
||||
|
@@ -91,7 +91,7 @@ class NewFileJobHandler implements FileConfigurationInterface
|
||||
$importFileTypes = [];
|
||||
$defaultImportType = config('import.options.file.default_import_format');
|
||||
foreach ($allowedTypes as $type) {
|
||||
$importFileTypes[$type] = trans('import.import_file_type_' . $type);
|
||||
$importFileTypes[$type] = (string)trans('import.import_file_type_' . $type);
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -145,7 +145,7 @@ class NewFileJobHandler implements FileConfigurationInterface
|
||||
|
||||
// check if content is UTF8:
|
||||
if (!$this->isUTF8($attachment)) {
|
||||
$message = trans('import.file_not_utf8');
|
||||
$message = (string)trans('import.file_not_utf8');
|
||||
Log::error($message);
|
||||
$messages->add('import_file', $message);
|
||||
// delete attachment:
|
||||
|
Reference in New Issue
Block a user