Skip to content

Commit 8ade741

Browse files
authored
Fix: Unknown '__s' function (#48)
1 parent fc0c874 commit 8ade741

2 files changed

Lines changed: 19 additions & 19 deletions

File tree

templates/config.html.twig

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,21 @@
3636
'currency',
3737
selected_currency,
3838
currency_options,
39-
__s('Choose your international currency', 'pdf')
39+
__('Choose your international currency', 'pdf')
4040
) }}
4141

4242
<input type="hidden" id="use_branding_logo_hidden" name="use_branding_logo" value="{{ (use_branding_logo and is_branding_active) ? 1 : 0 }}" />
4343
<div class="form-field row align-items-center col-12 col-sm-6 mb-2">
4444
<label class="col-form-label col-xxl-5 text-xxl-end ">
4545
<span class="d-inline-flex align-items-center">
46-
<span>{{ __s('Use logo from Branding plugin', 'pdf') }}</span>
46+
<span>{{ __('Use logo from Branding plugin', 'pdf') }}</span>
4747
</span>
4848
</label>
4949
<div class ="col-1 field-container">
5050
{% if is_branding_active %}
5151
<label class="form-switch mt-1" style="padding-left: 1rem;"
5252
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-trigger="hover"
53-
title="{{ __s('The logo will be used in the header of generated PDFs.', 'pdf') }}">
53+
title="{{ __('The logo will be used in the header of generated PDFs.', 'pdf') }}">
5454
<input type="checkbox" class="form-check-input ms-0 me-1 mt-0" id="use_branding_logo_checkbox"
5555
{{ use_branding_logo ? 'checked' : '' }} />
5656
</label>
@@ -62,7 +62,7 @@
6262
{% else %}
6363
<label class="form-switch mt-1" style="padding-left: 1rem;"
6464
data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-trigger="hover"
65-
title="{{ __s('The Branding plugin is either disabled, missing, or its version is below 3.0.0.', 'pdf') }}">
65+
title="{{ __('The Branding plugin is either disabled, missing, or its version is below 3.0.0.', 'pdf') }}">
6666
<input type="checkbox" class="form-check-input ms-0 me-1 mt-0" disabled />
6767
</label>
6868
{% endif %}
@@ -72,7 +72,7 @@
7272
{{ fields.textareaField(
7373
'add_text',
7474
add_text,
75-
__s('Text to add at the end of the PDF generation', 'pdf'),
75+
__('Text to add at the end of the PDF generation', 'pdf'),
7676
{
7777
'rows': 5,
7878
'style': 'width:95%'

templates/preference_form.html.twig

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
<div class="card-header">
3535
<h4 class="card-title d-flex align-items-center">
3636
<i class="ti ti-file-type-pdf me-2 text-danger"></i>
37-
{{ __s('%1$s: %2$s')|format(__s('Choose the tables to print in pdf', 'pdf'), item_type_name) }}
37+
{{ __('%1$s: %2$s')|format(__('Choose the tables to print in pdf', 'pdf'), item_type_name) }}
3838
</h4>
3939
</div>
4040

4141
<div class="card-body">
4242
{% if debug_mode %}
4343
<div class="alert alert-info mb-3">
4444
<i class="ti ti-info-circle me-2"></i>
45-
{{ __s('Debug mode enabled - showing internal references') }}
45+
{{ __('Debug mode enabled - showing internal references') }}
4646
</div>
4747
{% endif %}
4848

@@ -51,21 +51,21 @@
5151
<fieldset class="border p-3 mb-3 rounded">
5252
<legend class="fs-6 fw-bold mb-3 px-2">
5353
<i class="ti ti-table me-1"></i>
54-
{{ __s('Available tables', 'pdf') }}
54+
{{ __('Available tables', 'pdf') }}
5555
</legend>
5656

5757
<div class="mb-3 d-flex flex-wrap gap-2">
5858
<button type="button" class="btn btn-sm btn-outline-success" onclick="selectAllCheckboxes('{{ form_id }}')">
5959
<i class="ti ti-check me-1"></i>
60-
{{ __s('Check all') }}
60+
{{ __('Check all') }}
6161
</button>
6262
<button type="button" class="btn btn-sm btn-outline-secondary" onclick="selectNoCheckboxes('{{ form_id }}')">
6363
<i class="ti ti-x me-1"></i>
64-
{{ __s('Uncheck all') }}
64+
{{ __('Uncheck all') }}
6565
</button>
6666
<small class="text-muted d-flex align-items-center ms-auto">
6767
<i class="ti ti-info-circle me-1"></i>
68-
{{ __s('Select tables to include in PDF export', 'pdf') }}
68+
{{ __('Select tables to include in PDF export', 'pdf') }}
6969
</small>
7070
</div>
7171

@@ -99,16 +99,16 @@
9999
<div class="mb-3">
100100
<label for="page_{{ form_id }}" class="form-label">
101101
<i class="ti ti-rotate me-1"></i>
102-
{{ __s('Page orientation', 'pdf') }}
102+
{{ __('Page orientation', 'pdf') }}
103103
</label>
104104
<select name="page" id="page_{{ form_id }}" class="form-select">
105105
<option value="0" {{ not landscape ? 'selected' : '' }}>
106106
<i class="ti ti-rectangle-vertical"></i>
107-
{{ __s('Portrait', 'pdf') }}
107+
{{ __('Portrait', 'pdf') }}
108108
</option>
109109
<option value="1" {{ landscape ? 'selected' : '' }}>
110110
<i class="ti ti-rectangle"></i>
111-
{{ __s('Landscape', 'pdf') }}
111+
{{ __('Landscape', 'pdf') }}
112112
</option>
113113
</select>
114114
</div>
@@ -119,7 +119,7 @@
119119
<div class="mb-3">
120120
<label class="form-label">
121121
<i class="ti ti-list-numbers me-1"></i>
122-
{{ __s('Display (number of items)') }}
122+
{{ __('Display (number of items)') }}
123123
</label>
124124
<div class="dropdown-container">
125125
{{ call('Dropdown::showListLimit', [
@@ -136,9 +136,9 @@
136136
<div class="card-footer d-flex justify-content-between align-items-center">
137137
<div class="text-muted d-flex align-items-center">
138138
<i class="ti ti-info-circle me-1"></i>
139-
<span>{{ __s('Total options: %d')|format(options|length) }}</span>
139+
<span>{{ __('Total options: %d')|format(options|length) }}</span>
140140
<span class="ms-2">|
141-
{{ __s('Selected:') }}
141+
{{ __('Selected:') }}
142142
<span id="selected-count-{{ form_id }}">{{ values|length }}</span>
143143
</span>
144144
</div>
@@ -152,12 +152,12 @@
152152
<input type="hidden" name="itemID" value="{{ item_id }}">
153153
<button type="submit" name="generate" class="btn btn-primary">
154154
<i class="ti ti-printer me-2"></i>
155-
{{ __s('Print', 'pdf') }}
155+
{{ __('Print', 'pdf') }}
156156
</button>
157157
{% else %}
158158
<button type="submit" name="plugin_pdf_user_preferences_save" class="btn btn-primary">
159159
<i class="ti ti-device-floppy me-2"></i>
160-
{{ __s('Save') }}
160+
{{ __('Save') }}
161161
</button>
162162
{% endif %}
163163
</div>

0 commit comments

Comments
 (0)