mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 11:08:28 +00:00
Remove crappy translation of link types. Still needs a solution.
This commit is contained in:
@@ -112,7 +112,7 @@ class VerifyDatabase extends Command
|
||||
private function createLinkTypes()
|
||||
{
|
||||
$set = [
|
||||
'Relates' => ['relates to', 'relates to'],
|
||||
'Related' => ['relates to', 'relates to'],
|
||||
'Refund' => ['(partially) refunds', 'is (partially) refunded by'],
|
||||
'Paid' => ['(partially) pays for', 'is (partially) paid for by'],
|
||||
'Reimbursement' => ['(partially) reimburses', 'is (partially) reimbursed by'],
|
||||
|
@@ -71,8 +71,8 @@ class Translation extends Twig_Extension
|
||||
public function journalLinkTranslation(): Twig_SimpleFunction
|
||||
{
|
||||
return new Twig_SimpleFunction(
|
||||
'journalLinkTranslation', function (int $linkTypeId, string $direction, string $original) {
|
||||
$key = sprintf('firefly.%d_%s', $linkTypeId, $direction);
|
||||
'journalLinkTranslation', function (string $direction, string $original) {
|
||||
$key = sprintf('firefly.%s_%s', $original, $direction);
|
||||
$translation = trans($key);
|
||||
if ($key === $translation) {
|
||||
return $original;
|
||||
|
@@ -942,15 +942,6 @@ return [
|
||||
'overview_for_link' => 'Overview for link type ":name"',
|
||||
'delete_journal_link' => 'Delete the link between <a href=":source_link">:source</a> and <a href=":destination_link">:destination</a>',
|
||||
'deleted_link' => 'Deleted link',
|
||||
'1_outward' => 'relates to',
|
||||
'2_outward' => '(partially) refunds',
|
||||
'3_outward' => '(partially) pays for',
|
||||
'4_outward' => '(partially) reimburses',
|
||||
'1_inward' => 'relates to',
|
||||
'2_inward' => 'is (partially) refunded by',
|
||||
'3_inward' => 'is (partially) paid for by',
|
||||
'4_inward' => 'is (partially) reimbursed by',
|
||||
|
||||
|
||||
// split a transaction:
|
||||
'splits' => 'Splits',
|
||||
|
@@ -315,6 +315,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{# show links: #}
|
||||
{% if links.count > 0 %}
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
@@ -333,13 +334,13 @@
|
||||
<td>
|
||||
{{ ('this_'~(what|lower))|_ }}
|
||||
{% if link.source.id == journal.id %}
|
||||
{{ journalLinkTranslation(link.link_type_id,'outward', link.linkType.outward) }}
|
||||
{{ journalLinkTranslation('outward', link.linkType.outward) }}
|
||||
<a href="{{ route('transactions.show',link.destination.id) }}">
|
||||
#{{ link.destination.id }}: {{ link.destination.description }}
|
||||
</a>
|
||||
({{ journalAmount(link.destination) }})
|
||||
{% else %}
|
||||
{{ journalLinkTranslation(link.link_type_id,'inward', link.linkType.inward) }}
|
||||
{{ journalLinkTranslation('inward', link.linkType.inward) }}
|
||||
<a href="{{ route('transactions.show',link.source.id) }}">
|
||||
#{{ link.source.id }}: {{ link.source.description }}</a>
|
||||
({{ journalAmount(link.source) }})
|
||||
|
Reference in New Issue
Block a user