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

added EN translation file and setup for localization #53

Merged
merged 2 commits into from
Aug 16, 2023
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
4 changes: 2 additions & 2 deletions src/templates/elementactions/BulkEdit/_edit.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<div class="field-edit-modal-bar">
<div class="buttons right">
<div class="btn" id="field-edit-cancel">{{ "Cancel"|t('venveo-bulk-edit') }}</div>
<input type="button" value="Save {{ totalElements }} Elements" class="btn submit"></div>
<input type="button" value="{{ 'Save {totalElements} Elements'|t('venveo-bulk-edit', params = {totalElements: totalElements}) }}" class="btn submit"></div>
</div>
{% else %}
<p>{{ "It doesn't look like there are any fields that support bulk editing on these elements."|t('venveo-bulk-edit') }}</p>
<p>{{ "It doesn\'t look like there are any fields that support bulk editing on these elements."|t('venveo-bulk-edit') }}</p>
<div class="field-edit-modal-bar">
<div class="buttons right">
<div class="btn" id="field-edit-cancel">{{ "Cancel"|t('venveo-bulk-edit') }}</div>
Expand Down
25 changes: 15 additions & 10 deletions src/templates/elementactions/BulkEdit/_fields.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,20 @@

<div class="bulkedit field-edit-modal">
<h2>{{ "Select Fields"|t('venveo-bulk-edit') }}</h2>
<p>Editing <strong>{{ selectedTotal }}</strong> elements on site
<strong>{{ site.name }} ({{ site.language }})</strong></p>
<p>
{{ "Editing {total} elements on site {site} ({language})"|t('venveo-bulk-edit', params = {
site: site.name,
language: site.language,
total: selectedTotal
}) }}
</p>
{% if fieldWrappers|length %}

<div style="margin-bottom: 10px;">
{{ forms.checkbox({
id: 'bulk-edit-select-all',
checked: selectAllChecked,
label: 'Select all ' ~ selectAllTotal ~ ' elements matching current filters',
label: 'Select all {total} elements matching current filters'|t('venveo-bulk-edit', params = {total: selectAllTotal}),
name: 'selectAll',
}) }}
</div>
Expand All @@ -20,22 +25,22 @@
<thead>
<th scope="col" class="col-header">
<span class="heading-text">
Field Name
{{ 'Field Name'|t('venveo-bulk-edit') }}
</span>
</th>
<th scope="col" class="col-header">
<span class="heading-text">
Field Handle
{{ 'Field Handle'|t('venveo-bulk-edit') }}
</span>
</th>
<th scope="col" class="col-header">
<span class="heading-text">
Edit
{{ 'Edit'|t('venveo-bulk-edit') }}
</span>
</th>
<th scope="col" class="col-header">
<span class="heading-text">
Strategy
{{ 'Strategy'|t('venveo-bulk-edit') }}
</span>
</th>
</thead>
Expand Down Expand Up @@ -82,12 +87,12 @@
</table>
{% endif %}
{% else %}
<p>These elements have no associated fields.</p>
<p>{{ 'These elements have no associated fields.'|t('venveo-bulk-edit') }}</p>
{% endif %}
<div class="field-edit-modal-bar">
<div class="buttons right">
<div class="btn" id="field-edit-cancel">Cancel</div>
<input type="submit" value="Continue" disabled
<div class="btn" id="field-edit-cancel">{{ "Cancel"|t('venveo-bulk-edit') }}</div>
<input type="submit" value="{{ "Continue"|t('venveo-bulk-edit') }}" disabled
class="btn submit disabled"></div>
</div>
</form>
Expand Down
17 changes: 0 additions & 17 deletions src/translations/en/bulk-edit.php

This file was deleted.

50 changes: 50 additions & 0 deletions src/translations/en/venveo-bulk-edit.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php
/**
* Bulk Edit plugin for Craft CMS 3.x
*
* Bulk edit entries
*
* @link https://venveo.com
* @copyright Copyright (c) 2018 Venveo
*/

/**
* @author Venveo
* @package BulkEdit
* @since 1.0.0
*/
return [
// Common
'Cancel' => 'Cancel',
'Continue' => 'Continue',

// Strategies
'Add' => 'Add',
'Divide' => 'Divide',
'Merge' => 'Merge',
'Multiply' => 'Multiply',
'Replace' => 'Replace',
'Subtract' => 'Subtract',

// User Permissions
'Bulk Edit Entries' => 'Bulk Edit Entries',
'Bulk Edit Assets' => 'Bulk Edit Assets',
'Bulk Edit Categories' => 'Bulk Edit Categories',
'Bulk Edit Users' => 'Bulk Edit Users',
'Bulk Edit Products' => 'Bulk Edit Products',
'Bulk Edit' => 'Bulk Edit',

// Select Fields Modal
'Select Fields' => 'Select Fields',
'Editing {total} elements on site {site} ({language})' => 'Editing {total} elements on site {site} ({language})',
'Field Name' => 'Field Name',
'Field Handle' => 'Field Handle',
'Edit' => 'Edit',
'Strategy' => 'Strategy',
'These elements have no associated fields.' => 'These elements have no associated fields.',
'Select all {total} elements matching current filters' => 'Select all {total} elements matching current filters',

// Edit Fields Modal
'It doesn\'t look like there are any fields that support bulk editing on these elements.' => 'It doesn\'t look like there are any fields that support bulk editing on these elements.',
'Save {totalElements} Elements' => 'Save {totalElements} Elements',
];