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