diff --git a/app/Api/V1/Controllers/PreferenceController.php b/app/Api/V1/Controllers/PreferenceController.php index 01b4ae40e4..b7b7e8bee4 100644 --- a/app/Api/V1/Controllers/PreferenceController.php +++ b/app/Api/V1/Controllers/PreferenceController.php @@ -23,11 +23,22 @@ declare(strict_types=1); namespace FireflyIII\Api\V1\Controllers; +use FireflyIII\Models\Preference; +use FireflyIII\Transformers\PreferenceTransformer; use FireflyIII\User; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; +use Illuminate\Support\Collection; +use League\Fractal\Manager; +use League\Fractal\Resource\Collection as FractalCollection; +use League\Fractal\Resource\Item; +use League\Fractal\Serializer\JsonApiSerializer; +use Preferences; - +/** + * + * Class PreferenceController + */ class PreferenceController extends Controller { public function __construct() @@ -67,7 +78,31 @@ class PreferenceController extends Controller */ public function index(Request $request): JsonResponse { - // todo implement. + /** @var User $user */ + $user = auth()->user(); + $available = [ + 'language', 'customFiscalYear', 'fiscalYearStart', 'currencyPreference', + 'transaction_journal_optional_fields', 'frontPageAccounts', 'viewRange', + 'listPageSize, twoFactorAuthEnabled', + ]; + $preferences = new Collection; + foreach ($available as $name) { + $pref = Preferences::getForUser($user, $name); + if (null !== $pref) { + $preferences->push($pref); + } + } + + // create some objects: + $manager = new Manager; + $baseUrl = $request->getSchemeAndHttpHost() . '/api/v1'; + + // present to user. + $manager->setSerializer(new JsonApiSerializer($baseUrl)); + $resource = new FractalCollection($preferences, new PreferenceTransformer($this->parameters), 'preferences'); + + return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json'); + } @@ -75,13 +110,21 @@ class PreferenceController extends Controller * List single resource. * * @param Request $request - * @param string $object + * @param Preference $preference * * @return JsonResponse */ - public function show(Request $request, string $object): JsonResponse + public function show(Request $request, Preference $preference): JsonResponse { - // todo implement me. + // create some objects: + $manager = new Manager; + $baseUrl = $request->getSchemeAndHttpHost() . '/api/v1'; + + // present to user. + $manager->setSerializer(new JsonApiSerializer($baseUrl)); + $resource = new Item($preference, new PreferenceTransformer($this->parameters), 'preferences'); + + return response()->json($manager->createData($resource)->toArray())->header('Content-Type', 'application/vnd.api+json'); } diff --git a/app/Models/Preference.php b/app/Models/Preference.php index 7182c9728e..2aae7b4a6e 100644 --- a/app/Models/Preference.php +++ b/app/Models/Preference.php @@ -22,6 +22,7 @@ declare(strict_types=1); namespace FireflyIII\Models; +use Carbon\Carbon; use Crypt; use Exception; use FireflyIII\Exceptions\FireflyException; @@ -29,12 +30,16 @@ use FireflyIII\User; use Illuminate\Contracts\Encryption\DecryptException; use Illuminate\Database\Eloquent\Model; use Log; +use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; /** * Class Preference. * * @property mixed $data * @property string $name + * @property Carbon $updated_at + * @property Carbon $created_at + * @property int $id */ class Preference extends Model { @@ -52,6 +57,25 @@ class Preference extends Model /** @var array */ protected $fillable = ['user_id', 'data', 'name']; + /** + * @param string $value + * + * @return Account + * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException + */ + public static function routeBinder(string $value): Preference + { + if (auth()->check()) { + $preferenceId = (int)$value; + $preference = auth()->user()->preferences()->find($preferenceId); + if (null !== $preference) { + return $preference; + } + } + throw new NotFoundHttpException; + } + + /** * @param $value * diff --git a/app/Support/Preferences.php b/app/Support/Preferences.php index 9dc524af8b..8774c29d6e 100644 --- a/app/Support/Preferences.php +++ b/app/Support/Preferences.php @@ -125,14 +125,14 @@ class Preferences * * @return \FireflyIII\Models\Preference|null */ - public function getForUser(User $user, $name, $default = null) + public function getForUser(User $user, $name, $default = null): ?Preference { $fullName = sprintf('preference%s%s', $user->id, $name); if (Cache::has($fullName)) { return Cache::get($fullName); } - $preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data']); + $preference = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']); if (null !== $preference && null === $preference->data) { try { $preference->delete(); @@ -219,7 +219,7 @@ class Preferences { $fullName = sprintf('preference%s%s', $user->id, $name); Cache::forget($fullName); - $pref = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data']); + $pref = Preference::where('user_id', $user->id)->where('name', $name)->first(['id', 'name', 'data', 'updated_at', 'created_at']); if (null !== $pref) { $pref->data = $value; diff --git a/app/Transformers/PreferenceTransformer.php b/app/Transformers/PreferenceTransformer.php new file mode 100644 index 0000000000..76a9d253cb --- /dev/null +++ b/app/Transformers/PreferenceTransformer.php @@ -0,0 +1,72 @@ +. + */ + +declare(strict_types=1); + +namespace FireflyIII\Transformers; + + +use FireflyIII\Models\Preference; +use League\Fractal\TransformerAbstract; +use Symfony\Component\HttpFoundation\ParameterBag; + +class PreferenceTransformer extends TransformerAbstract +{ + /** + * List of resources possible to include. + * + * @var array + */ + protected $availableIncludes = ['user']; + /** + * List of resources to automatically include + * + * @var array + */ + protected $defaultIncludes = []; + /** @var ParameterBag */ + protected $parameters; + + public function __construct(ParameterBag $parameters) + { + $this->parameters = $parameters; + } + + /** + * Transform the preference + * + * @param Preference $preference + * + * @return array + */ + public function transform(Preference $preference): array + { + return [ + 'id' => (int)$preference->id, + 'updated_at' => $preference->updated_at->toAtomString(), + 'created_at' => $preference->created_at->toAtomString(), + 'name' => $preference->name, + 'data' => $preference->data, + ]; + + } + +} \ No newline at end of file diff --git a/config/firefly.php b/config/firefly.php index 0878d882da..8d18fe1024 100644 --- a/config/firefly.php +++ b/config/firefly.php @@ -270,6 +270,7 @@ return [ 'journalLink' => \FireflyIII\Models\TransactionJournalLink::class, 'currency' => \FireflyIII\Models\TransactionCurrency::class, 'piggyBank' => \FireflyIII\Models\PiggyBank::class, + 'preference' => \FireflyIII\Models\Preference::class, 'tj' => \FireflyIII\Models\TransactionJournal::class, 'tag' => \FireflyIII\Models\Tag::class, 'recurrence' => \FireflyIII\Models\Recurrence::class, diff --git a/resources/lang/de_DE/firefly.php b/resources/lang/de_DE/firefly.php index 7f1bec46e4..d3b3d80507 100644 --- a/resources/lang/de_DE/firefly.php +++ b/resources/lang/de_DE/firefly.php @@ -465,7 +465,7 @@ return [ 'pref_two_factor_auth_code_help' => 'Scannen Sie den QR-Code mit einer Anwendung wie Authy oder Google Authenticator auf ihrem Handy und geben Sie den generierten Code ein.', 'pref_two_factor_auth_reset_code' => 'Verifizierungscode zurücksetzen', 'pref_two_factor_auth_disable_2fa' => '2FA deaktivieren', - '2fa_use_secret_instead' => 'If you cannot scan the QR code, feel free to use the secret instead: :secret.', + '2fa_use_secret_instead' => 'Wenn Sie den QR-Code nicht scannen können, verwenden Sie stattdessen das Geheimnis: :secret.', 'pref_save_settings' => 'Einstellungen speichern', 'saved_preferences' => 'Einstellungen gespeichert!', 'preferences_general' => 'Allgemein', @@ -1135,6 +1135,8 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'is (partially) refunded by_inward' => 'wird (teilweise) erstattet durch', 'is (partially) paid for by_inward' => 'wird (teilweise) bezahlt von', 'is (partially) reimbursed by_inward' => 'wird (teilweise) erstattet durch', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'bezieht sich auf', '(partially) refunds_outward' => '(Teil-)Erstattungen', '(partially) pays for_outward' => '(teilweise) bezahlt für', @@ -1261,15 +1263,15 @@ Sollen zusätzlich Ihre Girokonten angezeigt werden?', 'update_recurrence' => 'Dauerauftrag aktualisieren', 'updated_recurrence' => 'Dauerauftrag ":title" aktualisiert', 'recurrence_is_inactive' => 'Dieser Dauerauftrag ist nicht aktiv und erzeugt keine neuen Buchungen.', - 'delete_recurring' => 'Delete recurring transaction ":title"', - 'new_recurring_transaction' => 'New recurring transaction', - 'help_weekend' => 'What should Firefly III do when the recurring transaction falls on a Saturday or Sunday?', - 'do_nothing' => 'Just create the transaction', - 'skip_transaction' => 'Skip the occurence', - 'jump_to_friday' => 'Create the transaction on the previous Friday instead', - 'jump_to_monday' => 'Create the transaction on the next Monday instead', - 'will_jump_friday' => 'Will be created on Friday instead of the weekends.', - 'will_jump_monday' => 'Will be created on Monday instead of the weekends.', - 'except_weekends' => 'Except weekends', - 'recurrence_deleted' => 'Recurring transaction ":title" deleted', + 'delete_recurring' => 'Dauerauftrag „:title” löschen', + 'new_recurring_transaction' => 'Neue Dauerauftrag', + 'help_weekend' => 'Was sollte Firefly III tun, wenn der Dauerauftrag auf einen Samstag oder Sonntag fällt?', + 'do_nothing' => 'Einfach die Buchung anlegen', + 'skip_transaction' => 'Vorkommen überspringen', + 'jump_to_friday' => 'Die Buchung stattdessen am vorhergehenden Freitag ausführen', + 'jump_to_monday' => 'Die Buchung stattdessen am darauffolgenden Montag ausführen', + 'will_jump_friday' => 'Wird am Freitag statt am Wochenende ausgeführt.', + 'will_jump_monday' => 'Wird am Montag statt am Wochenende ausgeführt.', + 'except_weekends' => 'Außer an Wochenenden', + 'recurrence_deleted' => 'Dauerauftrag „:title” gelöscht', ]; diff --git a/resources/lang/de_DE/form.php b/resources/lang/de_DE/form.php index b7e269b13e..cc05840685 100644 --- a/resources/lang/de_DE/form.php +++ b/resources/lang/de_DE/form.php @@ -150,7 +150,7 @@ return [ 'delete_rule_group' => 'Lösche Regelgruppe ":title"', 'delete_link_type' => 'Verknüpfungstyp „:name” löschen', 'delete_user' => 'Benutzer ":email" löschen', - 'delete_recurring' => 'Delete recurring transaction ":title"', + 'delete_recurring' => 'Dauerauftrag „:title” löschen', 'user_areYouSure' => 'Wenn Sie den Benutzer ":email" löschen, ist alles weg. Es gibt keine Sicherung, Wiederherstellung oder ähnliches. Wenn Sie sich selbst löschen, verlieren Sie den Zugriff auf diese Instanz von Firefly III.', 'attachment_areYouSure' => 'Möchten Sie den Anhang „:name” wirklich löschen?', 'account_areYouSure' => 'Möchten Sie das Konto „:name” wirklich löschen?', @@ -159,7 +159,7 @@ return [ 'ruleGroup_areYouSure' => 'Sind Sie sicher, dass sie die Regelgruppe ":title" löschen möchten?', 'budget_areYouSure' => 'Möchten Sie den Kostenrahmen „:name” wirklich löschen?', 'category_areYouSure' => 'Möchten Sie die Kategorie „:name” wirklich löschen?', - 'recurring_areYouSure' => 'Are you sure you want to delete the recurring transaction titled ":title"?', + 'recurring_areYouSure' => 'Möchten Sie den Dauerauftrag „:title” wirklich löschen?', 'currency_areYouSure' => 'Möchten Sie die Währung „:name” wirklich löschen?', 'piggyBank_areYouSure' => 'Möchten Sie das Sparschwein „:name” wirklich löschen?', 'journal_areYouSure' => 'Sind Sie sicher, dass Sie die Überweisung mit dem Namen ":description" löschen möchten?', @@ -175,11 +175,11 @@ return [ 'also_delete_connections' => 'Die einzige Transaktion, die mit diesem Verknüpfungstyp verknüpft ist, verliert diese Verbindung. • Alle :count Buchungen, die mit diesem Verknüpfungstyp verknüpft sind, verlieren ihre Verbindung.', 'also_delete_rules' => 'Die einzige Regel, die mit diesem Konto verknüpft ist, wird ebenfalls gelöscht. | Alle :count Regeln, die mit diesem Konto verknüpft sind, werden ebenfalls gelöscht.', 'also_delete_piggyBanks' => 'Das einzige Sparschwein, das mit diesem Konto verknüpft ist, wird ebenfalls gelöscht. | Alle :count Sparschweine, die mit diesem Konto verknüpft sind, werden ebenfalls gelöscht.', - 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will be spared deletion.', - 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will be spared deletion.', - 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will be spared deletion.', - 'recurring_keep_transactions' => 'The only transaction created by this recurring transaction will not be deleted.|All :count transactions created by this recurring transaction will be spared deletion.', - 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will be spared deletion.', + 'bill_keep_transactions' => 'Die einzige mit dieser Rechnung verbundene Buchung wird nicht gelöscht. | Alle :count Buchungen, die mit dieser Rechnung verbunden sind, werden nicht gelöscht.', + 'budget_keep_transactions' => 'Die einzige mit diesem Kostenrahmen verbundene Buchung wird nicht gelöscht. | Alle :count Buchungen, die mit diesem Kostenrahmen verbunden sind, werden nicht gelöscht.', + 'category_keep_transactions' => 'Die einzige Buchung, die mit dieser Kategorie verbunden ist, wird nicht gelöscht. | Alle :count Buchungen, die mit dieser Kategorie verbunden sind, werden nicht gelöscht.', + 'recurring_keep_transactions' => 'Die einzige Buchung, die durch diesen Dauerauftrag erstellt wurde, wird nicht gelöscht. | Alle :count Buchungen, die durch diesen Dauerauftrag erstellt wurden, werden nicht gelöscht.', + 'tag_keep_transactions' => 'Das einzige mit dieser Rechnung verbundene Schlagwort wird nicht gelöscht. | Alle :count Schlagwörter, die mit dieser Rechnung verbunden sind, werden nicht gelöscht.', 'check_for_updates' => 'Nach Updates suchen', 'email' => 'E-Mail Adresse', @@ -236,6 +236,6 @@ return [ 'repetition_end' => 'Wiederholung endet', 'repetitions' => 'Wiederholungen', 'calendar' => 'Kalender', - 'weekend' => 'Weekend', + 'weekend' => 'Wochenende', ]; diff --git a/resources/lang/de_DE/import.php b/resources/lang/de_DE/import.php index c4a3c14ceb..e19c46222c 100644 --- a/resources/lang/de_DE/import.php +++ b/resources/lang/de_DE/import.php @@ -127,16 +127,16 @@ return [ 'spectre_no_mapping' => 'Es scheint, dass Sie keine Konten zum Importieren ausgewählt haben.', 'imported_from_account' => 'Von „:account” importiert', 'spectre_account_with_number' => 'Konto :number', - 'job_config_spectre_apply_rules' => 'Apply rules', - 'job_config_spectre_apply_rules_text' => 'By default, your rules will be applied to the transactions created during this import routine. If you do not want this to happen, deselect this checkbox.', + 'job_config_spectre_apply_rules' => 'Regeln übernehmen', + 'job_config_spectre_apply_rules_text' => 'Standardmäßig werden Ihre Regeln auf die Buchungen angewendet, die während dieser Importfunktion erstellt wurden. Wenn Sie dies nicht wünschen, entfernen Sie die Markierung dieses Kontrollkästchens.', // job configuration for bunq: 'job_config_bunq_accounts_title' => 'bunq-Konten', 'job_config_bunq_accounts_text' => 'Dies sind jene Konten, die mit Ihrem „bunq”-Konto verknüpft sind. Bitte wählen Sie die Konten aus, von denen Sie importieren möchten, und in welches Konto die Buchungen importiert werden sollen.', 'bunq_no_mapping' => 'Es scheint, dass Sie keine Konten ausgewählt haben.', 'should_download_config' => 'Sie sollten die Konfigurationsdatei für diesen Aufgabe herunterladen. Dies wird zukünftige Importe erheblich erleichtern.', 'share_config_file' => 'Wenn Sie Daten von einer öffentlichen Bank importiert haben, sollten Sie Ihre Konfigurationsdatei freigeben, damit es für andere Benutzer einfach ist, ihre Daten zu importieren. Wenn Sie Ihre Konfigurationsdatei freigeben, werden Ihre finanziellen Daten nicht preisgegeben.', - 'job_config_bunq_apply_rules' => 'Apply rules', - 'job_config_bunq_apply_rules_text' => 'By default, your rules will be applied to the transactions created during this import routine. If you do not want this to happen, deselect this checkbox.', + 'job_config_bunq_apply_rules' => 'Regeln übernehmen', + 'job_config_bunq_apply_rules_text' => 'Standardmäßig werden Ihre Regeln auf die Buchungen angewendet, die während dieser Importfunktion erstellt wurden. Wenn Sie dies nicht wünschen, entfernen Sie die Markierung dieses Kontrollkästchens.', // keys from "extra" array: 'spectre_extra_key_iban' => 'IBAN', 'spectre_extra_key_swift' => 'SWIFT Code', diff --git a/resources/lang/de_DE/validation.php b/resources/lang/de_DE/validation.php index c2d2d34059..0ed794bba3 100644 --- a/resources/lang/de_DE/validation.php +++ b/resources/lang/de_DE/validation.php @@ -44,8 +44,8 @@ return [ 'belongs_to_user' => 'Der Wert von :attribute ist nicht bekannt', 'accepted' => ':attribute muss akzeptiert werden.', 'bic' => 'Dies ist kein gültiger BIC.', - 'base64' => 'This is not valid base64 encoded data.', - 'model_id_invalid' => 'The given ID seems invalid for this model.', + 'base64' => 'Dies sind keine gültigen base64-kodierten Daten.', + 'model_id_invalid' => 'Die angegebene ID scheint für dieses Modell ungültig zu sein.', 'more' => ':attribute muss größer als Null sein.', 'active_url' => ':attribute ist keine gültige URL.', 'after' => ':attribute muss ein Datum nach :date sein.', diff --git a/resources/lang/es_ES/firefly.php b/resources/lang/es_ES/firefly.php index 20dc9fa099..4d83113a79 100644 --- a/resources/lang/es_ES/firefly.php +++ b/resources/lang/es_ES/firefly.php @@ -1135,6 +1135,8 @@ return [ 'is (partially) refunded by_inward' => 'es (parcialmente) es devuelto por', 'is (partially) paid for by_inward' => 'es(parcialmente) pagado por', 'is (partially) reimbursed by_inward' => 'es(parcialmente) reembolsado por', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'relacionado con', '(partially) refunds_outward' => '(parcialmente) reembolso', '(partially) pays for_outward' => '(parcialmente) paga por', diff --git a/resources/lang/fr_FR/firefly.php b/resources/lang/fr_FR/firefly.php index 7cd9b4d937..f082d0631f 100644 --- a/resources/lang/fr_FR/firefly.php +++ b/resources/lang/fr_FR/firefly.php @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => 'est (partiellement) remboursé par', 'is (partially) paid for by_inward' => 'est (partiellement) payé par', 'is (partially) reimbursed by_inward' => 'est (partiellement) remboursé par', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'se rapporte à', '(partially) refunds_outward' => 'rembourse (partiellement)', '(partially) pays for_outward' => 'paye (partiellement) pour', diff --git a/resources/lang/id_ID/firefly.php b/resources/lang/id_ID/firefly.php index a4b8c09d66..d5a358e8a8 100644 --- a/resources/lang/id_ID/firefly.php +++ b/resources/lang/id_ID/firefly.php @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => '(sebagian) dikembalikan oleh', 'is (partially) paid for by_inward' => 'adalah (sebagian) dibayar oleh', 'is (partially) reimbursed by_inward' => '(sebagian) diganti oleh', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'berhubungan dengan', '(partially) refunds_outward' => '(sebagian) pengembalian uang', '(partially) pays for_outward' => '(sebagian) membayar', diff --git a/resources/lang/it_IT/firefly.php b/resources/lang/it_IT/firefly.php index cc270a8c5f..eb29183d4c 100644 --- a/resources/lang/it_IT/firefly.php +++ b/resources/lang/it_IT/firefly.php @@ -465,7 +465,7 @@ return [ 'pref_two_factor_auth_code_help' => 'Esegui la scansione del codice QR con un\'applicazione sul tuo telefono come Authy o Google Authenticator e inserisci il codice generato.', 'pref_two_factor_auth_reset_code' => 'Reimposta il codice di verifica', 'pref_two_factor_auth_disable_2fa' => 'Disattiva 2FA', - '2fa_use_secret_instead' => 'If you cannot scan the QR code, feel free to use the secret instead: :secret.', + '2fa_use_secret_instead' => 'Se non puoi scansionare il codice QR puoi utilizzare il segreto: :secret.', 'pref_save_settings' => 'Salva le impostazioni', 'saved_preferences' => 'Preferenze salvate!', 'preferences_general' => 'Generale', @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => 'è (parzialmente) rimborsata da', 'is (partially) paid for by_inward' => 'è (parzialmente) pagata da', 'is (partially) reimbursed by_inward' => 'è (parzialmente) rimborsata da', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'inerente a', '(partially) refunds_outward' => '(parzialmente) rimborsa', '(partially) pays for_outward' => '(parzialmente) paga per', @@ -1260,15 +1262,15 @@ return [ 'update_recurrence' => 'Aggiorna transazione ricorrente', 'updated_recurrence' => 'Transazione ricorrente ":title" aggiornata', 'recurrence_is_inactive' => 'Questa transazione ricorrente non è attiva e non genererà nuove transazioni.', - 'delete_recurring' => 'Delete recurring transaction ":title"', - 'new_recurring_transaction' => 'New recurring transaction', - 'help_weekend' => 'What should Firefly III do when the recurring transaction falls on a Saturday or Sunday?', - 'do_nothing' => 'Just create the transaction', - 'skip_transaction' => 'Skip the occurence', - 'jump_to_friday' => 'Create the transaction on the previous Friday instead', - 'jump_to_monday' => 'Create the transaction on the next Monday instead', - 'will_jump_friday' => 'Will be created on Friday instead of the weekends.', - 'will_jump_monday' => 'Will be created on Monday instead of the weekends.', - 'except_weekends' => 'Except weekends', - 'recurrence_deleted' => 'Recurring transaction ":title" deleted', + 'delete_recurring' => 'Elimina transazione ricorrente ":title"', + 'new_recurring_transaction' => 'Nuova transazione ricorrente', + 'help_weekend' => 'Cosa vuoi che Firefly III faccia quando la transazione ricorrente cade di sabato o domenica?', + 'do_nothing' => 'Crea la transazione', + 'skip_transaction' => 'Salta l\'occorrenza', + 'jump_to_friday' => 'Crea la transazione il venerdì precedente', + 'jump_to_monday' => 'Crea la transazione il lunedì successivo', + 'will_jump_friday' => 'Verrà creata il venerdì anziché nel fine settimana.', + 'will_jump_monday' => 'Verrà creata il lunedì anziché il fine settimana.', + 'except_weekends' => 'Tranne il fine settimana', + 'recurrence_deleted' => 'La transazione ricorrente ":title" è stata eliminata', ]; diff --git a/resources/lang/it_IT/form.php b/resources/lang/it_IT/form.php index e9ebdf5f50..dd8c9b46ce 100644 --- a/resources/lang/it_IT/form.php +++ b/resources/lang/it_IT/form.php @@ -150,7 +150,7 @@ return [ 'delete_rule_group' => 'Elimina gruppo regole":title"', 'delete_link_type' => 'Elimina tipo collegamento ":name"', 'delete_user' => 'Elimina utente ":email"', - 'delete_recurring' => 'Delete recurring transaction ":title"', + 'delete_recurring' => 'Elimina transazione ricorrente ":title"', 'user_areYouSure' => 'Se cancelli l\'utente ":email", verrà eliminato tutto. Non sarà più possibile recuperare i dati eliminati. Se cancelli te stesso, perderai l\'accesso a questa istanza di Firefly III.', 'attachment_areYouSure' => 'Sei sicuro di voler eliminare l\'allegato ":name"?', 'account_areYouSure' => 'Sei sicuro di voler eliminare il conto ":name"?', @@ -159,7 +159,7 @@ return [ 'ruleGroup_areYouSure' => 'Sei sicuro di voler eliminare il gruppo regole ":title"?', 'budget_areYouSure' => 'Sei sicuro di voler eliminare il budget ":name"?', 'category_areYouSure' => 'Sei sicuro di voler eliminare categoria ":name"?', - 'recurring_areYouSure' => 'Are you sure you want to delete the recurring transaction titled ":title"?', + 'recurring_areYouSure' => 'Sei sicuro di voler eliminare la transazione ricorrente ":title"?', 'currency_areYouSure' => 'Sei sicuro di voler eliminare la valuta ":name"?', 'piggyBank_areYouSure' => 'Sei sicuro di voler eliminare il salvadanaio ":name"?', 'journal_areYouSure' => 'Sei sicuro di voler eliminare la transazione ":description"?', @@ -175,11 +175,11 @@ return [ 'also_delete_connections' => 'L\'unica transazione collegata a questo tipo di collegamento perderà questa connessione. | Tutto :count le transazioni di conteggio collegate a questo tipo di collegamento perderanno la connessione.', 'also_delete_rules' => 'Anche l\'unica regola collegata a questo gruppo di regole verrà eliminata. | Tutto :count verranno eliminate anche le regole di conteggio collegate a questo gruppo di regole.', 'also_delete_piggyBanks' => 'Verrà eliminato anche l\'unico salvadanaio collegato a questo conto. | Tutti :count il conteggio del salvadanaio collegato a questo conto verrà eliminato.', - 'bill_keep_transactions' => 'The only transaction connected to this bill will not be deleted.|All :count transactions connected to this bill will be spared deletion.', - 'budget_keep_transactions' => 'The only transaction connected to this budget will not be deleted.|All :count transactions connected to this budget will be spared deletion.', - 'category_keep_transactions' => 'The only transaction connected to this category will not be deleted.|All :count transactions connected to this category will be spared deletion.', - 'recurring_keep_transactions' => 'The only transaction created by this recurring transaction will not be deleted.|All :count transactions created by this recurring transaction will be spared deletion.', - 'tag_keep_transactions' => 'The only transaction connected to this tag will not be deleted.|All :count transactions connected to this tag will be spared deletion.', + 'bill_keep_transactions' => 'L\'unica transazione connessa a questa bolletta non verrà eliminata.|Tutte le :count transazioni del conto collegate a questa bolletta non verranno cancellate.', + 'budget_keep_transactions' => 'L\'unica transazione collegata a questo budget non verrà eliminata.|Tutte le :count transazioni del conto collegate a questo budget non verranno cancellate.', + 'category_keep_transactions' => 'L\'unica transazione collegata a questa categoria non verrà eliminata.|Tutte le :count transazioni del conto collegate a questa categoria non verranno cancellate.', + 'recurring_keep_transactions' => 'L\'unica transazione creata da questa transazione ricorrente non verrà eliminata.|Tutte le :count transazioni create da questa transazione ricorrente non verranno eliminate.', + 'tag_keep_transactions' => 'L\'unica transazione connessa a questa etichetta non verrà eliminata.|Tutte le :count transazioni del conto collegate a questa etichetta non verranno eliminate.', 'check_for_updates' => 'Controlla gli aggiornamenti', 'email' => 'Indirizzo email', @@ -236,6 +236,6 @@ return [ 'repetition_end' => 'La ripetizione termina il', 'repetitions' => 'Ripetizioni', 'calendar' => 'Calendario', - 'weekend' => 'Weekend', + 'weekend' => 'Fine settimana', ]; diff --git a/resources/lang/it_IT/import.php b/resources/lang/it_IT/import.php index d8e5d65400..5fd4aa332c 100644 --- a/resources/lang/it_IT/import.php +++ b/resources/lang/it_IT/import.php @@ -127,16 +127,16 @@ return [ 'spectre_no_mapping' => 'Sembra che tu non abbia selezionato nessun account da cui importare.', 'imported_from_account' => 'Importato da ":account"', 'spectre_account_with_number' => 'Conto :number', - 'job_config_spectre_apply_rules' => 'Apply rules', - 'job_config_spectre_apply_rules_text' => 'By default, your rules will be applied to the transactions created during this import routine. If you do not want this to happen, deselect this checkbox.', + 'job_config_spectre_apply_rules' => 'Applica regole', + 'job_config_spectre_apply_rules_text' => 'Per impostazione predefinita le tue regole verranno applicate alle transazioni create durante questa procedura di importazione. Se non vuoi che questo accada, deseleziona questa casella di controllo.', // job configuration for bunq: 'job_config_bunq_accounts_title' => 'Account bunq', 'job_config_bunq_accounts_text' => 'Questi sono i conti associati al tuo account bunq. Seleziona i conti dai quali vuoi effettuare l\'importazione e in quale conto devono essere importate le transazioni.', 'bunq_no_mapping' => 'Sembra che tu non abbia selezionato alcun conto.', 'should_download_config' => 'Ti consigliamo di scaricare il file di configurazione per questa operazione. Ciò renderà le importazioni future più facili.', 'share_config_file' => 'Se hai importato dati da una banca pubblica, dovresti condividere il tuo file di configurazione così da rendere più facile per gli altri utenti importare i loro dati. La condivisione del file di configurazione non espone i tuoi dettagli finanziari.', - 'job_config_bunq_apply_rules' => 'Apply rules', - 'job_config_bunq_apply_rules_text' => 'By default, your rules will be applied to the transactions created during this import routine. If you do not want this to happen, deselect this checkbox.', + 'job_config_bunq_apply_rules' => 'Applica regole', + 'job_config_bunq_apply_rules_text' => 'Per impostazione predefinita le tue regole verranno applicate alle transazioni create durante questa procedura di importazione. Se non vuoi che questo accada, deseleziona questa casella di controllo.', // keys from "extra" array: 'spectre_extra_key_iban' => 'IBAN', 'spectre_extra_key_swift' => 'SWIFT', diff --git a/resources/lang/it_IT/validation.php b/resources/lang/it_IT/validation.php index 3232c022c7..5f7a29b645 100644 --- a/resources/lang/it_IT/validation.php +++ b/resources/lang/it_IT/validation.php @@ -44,8 +44,8 @@ return [ 'belongs_to_user' => 'Il valore di :attribute è sconosciuto', 'accepted' => 'L\' :attribute deve essere accettato.', 'bic' => 'Questo non è un BIC valido.', - 'base64' => 'This is not valid base64 encoded data.', - 'model_id_invalid' => 'The given ID seems invalid for this model.', + 'base64' => 'Questi non sono dati codificati in base64 validi.', + 'model_id_invalid' => 'L\'ID fornito sembra non essere valido per questo modello.', 'more' => ':attribute deve essere maggiore di zero.', 'active_url' => ':attribute non è un URL valido.', 'after' => ':attribute deve essere una data dopo :date.', diff --git a/resources/lang/nl_NL/firefly.php b/resources/lang/nl_NL/firefly.php index 4973ef5577..e3f2297966 100644 --- a/resources/lang/nl_NL/firefly.php +++ b/resources/lang/nl_NL/firefly.php @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => 'wordt (deels) terugbetaald door', 'is (partially) paid for by_inward' => 'wordt (deels) betaald door', 'is (partially) reimbursed by_inward' => 'wordt (deels) vergoed door', + 'inward_transaction' => 'Actieve transactie', + 'outward_transaction' => 'Passieve transactie', 'relates to_outward' => 'gerelateerd aan', '(partially) refunds_outward' => 'is een (gedeeltelijke) terugbetaling voor', '(partially) pays for_outward' => 'betaalt (deels) voor', diff --git a/resources/lang/pl_PL/firefly.php b/resources/lang/pl_PL/firefly.php index 528a1d2450..c23c3c6557 100644 --- a/resources/lang/pl_PL/firefly.php +++ b/resources/lang/pl_PL/firefly.php @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => 'jest (częściowo) zwracane przez', 'is (partially) paid for by_inward' => 'jest (częściowo) opłacane przez', 'is (partially) reimbursed by_inward' => 'jest (częściowo) refundowany przez', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'odnosi się do', '(partially) refunds_outward' => '(częściowo) refundowany', '(partially) pays for_outward' => '(częściowo) płaci za', diff --git a/resources/lang/pt_BR/firefly.php b/resources/lang/pt_BR/firefly.php index f4f871629f..41ad6e78ff 100644 --- a/resources/lang/pt_BR/firefly.php +++ b/resources/lang/pt_BR/firefly.php @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => 'é (parcialmente) devolvido por', 'is (partially) paid for by_inward' => 'é (parcialmente) pago por', 'is (partially) reimbursed by_inward' => 'é (parcialmente) reembolsado por', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'relacionado a', '(partially) refunds_outward' => 'reembolsos (parcialmente)', '(partially) pays for_outward' => 'paga (parcialmente) por', diff --git a/resources/lang/ru_RU/firefly.php b/resources/lang/ru_RU/firefly.php index f64ee3b21f..c18e2716da 100644 --- a/resources/lang/ru_RU/firefly.php +++ b/resources/lang/ru_RU/firefly.php @@ -1134,6 +1134,8 @@ return [ 'is (partially) refunded by_inward' => '(частично) возвращён', 'is (partially) paid for by_inward' => '(частично) оплачен', 'is (partially) reimbursed by_inward' => '(частично) возмещён', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'относится к', '(partially) refunds_outward' => '(частично) возвращены', '(partially) pays for_outward' => '(частично) оплачены', diff --git a/resources/lang/tr_TR/firefly.php b/resources/lang/tr_TR/firefly.php index b5bb107d15..ec3ebb0c00 100644 --- a/resources/lang/tr_TR/firefly.php +++ b/resources/lang/tr_TR/firefly.php @@ -1135,6 +1135,8 @@ işlemlerin kontrol edildiğini lütfen unutmayın.', 'is (partially) refunded by_inward' => 'tarafından (kısmen) geri ödendi', 'is (partially) paid for by_inward' => 'tarafından (kısmen) ödendi', 'is (partially) reimbursed by_inward' => 'tarafından (kısmen) iade edildi', + 'inward_transaction' => 'Inward transaction', + 'outward_transaction' => 'Outward transaction', 'relates to_outward' => 'ile ilişkili', '(partially) refunds_outward' => '(kısmen) geri ödeme', '(partially) pays for_outward' => 'için (kısmen) öder', diff --git a/routes/api.php b/routes/api.php index ba748dbc0e..d5e2de9214 100644 --- a/routes/api.php +++ b/routes/api.php @@ -182,6 +182,20 @@ Route::group( } ); +Route::group( + ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'preferences', 'as' => 'api.v1.preferences.'], + function () { + + // Piggy Bank API routes: + Route::get('', ['uses' => 'PreferenceController@index', 'as' => 'index']); + Route::get('{preference}', ['uses' => 'PreferenceController@show', 'as' => 'show']); + // Route::post('', ['uses' => 'PiggyBankController@store', 'as' => 'store']); + + // Route::put('{piggyBank}', ['uses' => 'PiggyBankController@update', 'as' => 'update']); + // Route::delete('{piggyBank}', ['uses' => 'PiggyBankController@delete', 'as' => 'delete']); + } +); + Route::group( ['middleware' => ['auth:api', 'bindings'], 'namespace' => 'FireflyIII\Api\V1\Controllers', 'prefix' => 'currencies', 'as' => 'api.v1.currencies.'], function () {