Skip to content

Commit

Permalink
Merge branch 'release/3.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
JodebaDigitalPulse committed Mar 25, 2024
2 parents f32c176 + 0f0f98f commit 38b538b
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 6 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 3.2.2 - 2024-03-25

### Updated
- docs

## 3.2.1 - 2024-03-20

### Fixed
Expand Down Expand Up @@ -44,6 +49,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added
- Craft 5 support

## 2.6.3 - 2024-03-25

### Updated
- docs

## 2.6.2 - 2024-03-20

### Fixed
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Trim spaces at begin or ending of values when they are saved.
When a new unknown translation is used while rendering templates, an event is triggered.
Handling this event is optional. A new empty translation row will be added for the missing message.

### Copy Entry bulk action

Enable [this feature](#copy-entries-in-bulk-action)

## Importing translations

![Screenshot](resources/img/screenshot_import.png)
Expand Down Expand Up @@ -84,7 +88,13 @@ message rows in the database:
## Exporting

1. Export all the rows using the export tab
2. Or select the rows in the table to export
2. Or, in the overview table, select the rows and languages to export
- as csv file
- as a content migration file

### Migration file export

The advantage of exporting to a migration file is that your content can be pushed to git and then the server when deploying. The migration file adds the rows to your database when `craft up` or `craft migrate/all` is executed.

## Manage translations

Expand All @@ -95,8 +105,6 @@ message rows in the database:
To enable this functionality both enable this in the settings
and set the permission for the user ("Copy content bulk action").

You can also enable this in `config/database-translations.php`

You can now select Entries in the index table, and select the bulk action.
The content will be copied over to the other site in a queue job.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "craft-database-translations",
"version": "3.2.1",
"version": "3.2.2",
"description": "A translations plugin for Craft CMS",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --progress --config=webpack.config.js",
Expand Down
Binary file modified resources/img/screenshot_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/img/screenshot_table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
return [
// 'pluginName' => 'Translations',
// 'categories' => [['key' => 'site']],
// 'mapLocales' => [],
// 'mapLocales' => [['source'=>'nl', 'destination'=>'nl-BE']],
// 'handleMissingTranslationEvent' => false,
// 'handleMissingTranslationEventOnlyInDevMode' => true,
// 'trimValuesOnSave' => true,
Expand Down
8 changes: 7 additions & 1 deletion src/templates/index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,13 @@
{% else %}
<h2>Hi!</h2>
<p>Your database is empty</p>
<p>Start with <a href="{{ url('database-translations/create') }}">an import</a> or enable event to listen to missing translations in <a href="{{ url('database-translations/settings') }}">the settings</a>.</p>
<p>
Start with <a href="{{ url('database-translations/create') }}">an import</a>
{% if currentUser.admin and craft.app.config.general.allowAdminChanges %}
or enable event to listen to missing translations in
<a href="{{ url('database-translations/settings') }}">the settings</a>.
{% endif %}
</p>
{% endif %}
</div>
{% endblock %}
Expand Down

0 comments on commit 38b538b

Please sign in to comment.