Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust the translations and routes after naming convention changes #348

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/services/twig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
id="sylius_invoicing.twig.component.invoice.list"
class="Sylius\InvoicingPlugin\Twig\Component\Invoice\ListComponent"
>
<argument type="service" id="sylius_invoicing_plugin.repository.invoice" />
<argument type="service" id="sylius_invoicing.repository.invoice" />

<tag
name="sylius.twig_component"
Expand Down
4 changes: 2 additions & 2 deletions config/winzou_state_machine.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
'sylius_payment' => [
'callbacks' => [
'after' => [
'sylius_invoicing_plugin_payment_complete_producer' => [
'sylius_invoicing_payment_complete_producer' => [
'on' => ['complete'],
'do' => ['@sylius_invoicing_plugin.event_producer.order_payment_paid', '__invoke'],
'do' => ['@sylius_invoicing.event_producer.order_payment_paid', '__invoke'],
'args' => ['object'],
],
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<a {{ sylius_test_html_attribute('back') }} href="{{ path('sylius_invoicing_plugin_admin_invoice_index') }}" class="btn">
<a {{ sylius_test_html_attribute('back') }} href="{{ path('sylius_invoicing_admin_invoice_index') }}" class="btn">
{{ ux_icon('tabler:arrow-left', {'class': 'icon'}) }}
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#{{ invoice.order.number }}
</li>
<li class="list-inline-item">
<strong>{{ 'sylius_invoicing_plugin.ui.issued_from'|trans }}:</strong>
<strong>{{ 'sylius_invoicing.ui.issued_from'|trans }}:</strong>
<div {{ sylius_test_html_attribute('channel') }} class="d-inline">
{% include '@SyliusAdmin/shared/grid/field/channel.html.twig' with {'data': invoice.channel} %}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<tr>
<th colspan="8" class="text-end"><strong>{{ 'sylius_invoicing_plugin.ui.net_total'|trans }}</strong>:</th>
<th colspan="8" class="text-end"><strong>{{ 'sylius_invoicing.ui.net_total'|trans }}</strong>:</th>
<th class="text-end" {{ sylius_test_html_attribute('invoice-net-total') }}>{{ '%0.2f'|format(hookable_metadata.context.resource.subtotal/100) }}</th>
<th {{ sylius_test_html_attribute('invoice-net-total-currency-code') }}>{{ hookable_metadata.context.resource.currencyCode }}</th>
</tr>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% if hookable_metadata.context.resource.taxItems.count() > 0 %}
<tr>
<th colspan="8" class="text-end"><strong>{{ 'sylius_invoicing_plugin.ui.tax_rate'|trans }}</strong></th>
<th class="text-end"><strong>{{ 'sylius_invoicing_plugin.ui.tax_amount'|trans }}</strong></th>
<th colspan="8" class="text-end"><strong>{{ 'sylius_invoicing.ui.tax_rate'|trans }}</strong></th>
<th class="text-end"><strong>{{ 'sylius_invoicing.ui.tax_amount'|trans }}</strong></th>
<th><strong>{{ 'sylius.ui.currency'|trans }}</strong></th>
</tr>
{% for item in hookable_metadata.context.resource.taxItems %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<tr>
<th colspan="8" class="text-end"><strong>{{ 'sylius_invoicing_plugin.ui.taxes_total'|trans }}</strong>:</th>
<th colspan="8" class="text-end"><strong>{{ 'sylius_invoicing.ui.taxes_total'|trans }}</strong>:</th>
<th class="text-end" {{ sylius_test_html_attribute('invoice-taxes-total') }}>{{ '%0.2f'|format(hookable_metadata.context.resource.taxesTotal/100) }}</th>
<th {{ sylius_test_html_attribute('invoice-taxes-total-currency-code') }}>{{ hookable_metadata.context.resource.currencyCode }}</th>
</tr>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-discounted-unit-net-price" scope="col">{{ 'sylius_invoicing_plugin.ui.discounted_unit_net_price'|trans }}</th>
<th class="sylius-table-column-discounted-unit-net-price" scope="col">{{ 'sylius_invoicing.ui.discounted_unit_net_price'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-total" scope="col">{{ 'sylius_invoicing_plugin.ui.gross_value'|trans }}</th>
<th class="sylius-table-column-total" scope="col">{{ 'sylius_invoicing.ui.gross_value'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-subtotal" scope="col">{{ 'sylius_invoicing_plugin.ui.net_value'|trans }}</th>
<th class="sylius-table-column-subtotal" scope="col">{{ 'sylius_invoicing.ui.net_value'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-number" scope="col">{{ 'sylius_invoicing_plugin.ui.no'|trans }}</th>
<th class="sylius-table-column-number" scope="col">{{ 'sylius_invoicing.ui.no'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-tax_total" scope="col">{{ 'sylius_invoicing_plugin.ui.tax_amount'|trans }}</th>
<th class="sylius-table-column-tax_total" scope="col">{{ 'sylius_invoicing.ui.tax_amount'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-tax-rate" scope="col">{{ 'sylius_invoicing_plugin.ui.tax_rate'|trans }}</th>
<th class="sylius-table-column-tax-rate" scope="col">{{ 'sylius_invoicing.ui.tax_rate'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th class="sylius-table-column-unit-net-price" scope="col">{{ 'sylius_invoicing_plugin.ui.unit_net_price'|trans }}</th>
<th class="sylius-table-column-unit-net-price" scope="col">{{ 'sylius_invoicing.ui.unit_net_price'|trans }}</th>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<td>
<a href="{{ path('sylius_invoicing_plugin_admin_invoice_show', {'id': hookable_metadata.context.invoice.id}) }}" class="text-decoration-none">{{ hookable_metadata.context.invoice.number }}</a>
<a href="{{ path('sylius_invoicing_admin_invoice_show', {'id': hookable_metadata.context.invoice.id}) }}" class="text-decoration-none">{{ hookable_metadata.context.invoice.number }}</a>
</td>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<th>{{ 'sylius_invoicing_plugin.ui.issued_at'|trans }}</th>
<th>{{ 'sylius_invoicing.ui.issued_at'|trans }}</th>
2 changes: 1 addition & 1 deletion templates/admin/shared/action/download.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set invoice = data %}
{% endif %}

{% set path = path('sylius_invoicing_plugin_admin_invoice_download', {'id': invoice.id}) %}
{% set path = path('sylius_invoicing_admin_invoice_download', {'id': invoice.id}) %}

<a href="{{ path }}" class="btn" {{ sylius_test_html_attribute('download-button') }}>
<svg xmlns="http://www.w3.org/2000/svg"
Expand Down
2 changes: 1 addition & 1 deletion templates/admin/shared/action/resend.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{% set invoice = data %}
{% endif %}

{% set path = path('sylius_invoicing_plugin_admin_invoice_resend', {'id': invoice.id}) %}
{% set path = path('sylius_invoicing_admin_invoice_resend', {'id': invoice.id}) %}

<a href="{{ path }}" class="btn">
{{ ux_icon('tabler:send', {'class': 'icon'}) }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<td>
<a href="{{ path('sylius_invoicing_plugin_shop_invoice_download', {'id': hookable_metadata.context.invoice.id}) }}" {{ sylius_test_html_attribute('download-button') }}>
<a href="{{ path('sylius_invoicing_shop_invoice_download', {'id': hookable_metadata.context.invoice.id}) }}" {{ sylius_test_html_attribute('download-button') }}>
<svg xmlns="http://www.w3.org/2000/svg"
width="24"
height="24"
Expand Down
2 changes: 1 addition & 1 deletion tests/Behat/Resources/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<argument type="service" id="Tests\Sylius\InvoicingPlugin\Behat\Page\Admin\Invoice\IndexPageInterface" />
<argument type="service" id="Tests\Sylius\InvoicingPlugin\Behat\Page\Admin\Invoice\ShowPageInterface" />
<argument type="service" id="Tests\Sylius\InvoicingPlugin\Behat\Page\Admin\Order\ShowPageInterface" />
<argument type="service" id="sylius.behat.notification_checker"/>
<argument type="service" id="sylius_invoicing.repository.invoice"/>
<argument type="service" id="sylius.behat.notification_checker.admin"/>
</service>

Expand Down