diff --git a/.craftplugin b/.craftplugin index 121691a4..24f536df 100644 --- a/.craftplugin +++ b/.craftplugin @@ -1,7 +1,7 @@ { "pluginName": "Translations for Craft", "pluginDescription": "Drive global growth with simplified translation workflows.", - "pluginVersion": "2.2.4", + "pluginVersion": "2.2.5", "pluginAuthorName": "Acclaro", "pluginVendorName": "Acclaro", "pluginAuthorUrl": "http://www.acclaro.com/", diff --git a/CHANGELOG.md b/CHANGELOG.md index fe028814..cb8e9af5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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/). +## 2.2.5 - 2023-05-29 + +### Fixed +- An issue where plugin license was always showing `free trial` despite of `Paid` even after license is purchased. ([AcclaroInc#437](https://github.com/AcclaroInc/craft-translations/issues/437)) +- An issue where asset's title was incuded in source files regardless of translation enabled or not. ([AcclaroInc#439](https://github.com/AcclaroInc/craft-translations/issues/439)) + ## 2.2.4 - 2023-02-06 ### Fixed diff --git a/src/services/fieldtranslator/AssetsFieldTranslator.php b/src/services/fieldtranslator/AssetsFieldTranslator.php index 852e62e4..54b7e968 100644 --- a/src/services/fieldtranslator/AssetsFieldTranslator.php +++ b/src/services/fieldtranslator/AssetsFieldTranslator.php @@ -29,9 +29,10 @@ public function toTranslationSource(ElementTranslator $elementTranslator, Elemen { foreach ($blocks as $block) { - $source[sprintf('%s.%s.%s', $field->handle, $block->id, 'title')] = $block->title; - $element = Craft::$app->assets->getAssetById($block->id, $sourceSite); + if ($element->getIsTitleTranslatable()) { + $source[sprintf('%s.%s.%s', $field->handle, $block->id, 'title')] = $block->title; + } foreach ($element->getFieldLayout()->getFields() as $layoutField) { $assetField = Craft::$app->fields->getFieldById($layoutField->id); $fieldSource = $elementTranslator->fieldToTranslationSource($element, $assetField, $sourceSite); diff --git a/src/templates/_components/app-info.twig b/src/templates/_components/app-info.twig index 44a7efdf..1fb64889 100644 --- a/src/templates/_components/app-info.twig +++ b/src/templates/_components/app-info.twig @@ -1,4 +1,5 @@ -{% set licenseStatus = craft.app.plugins.getPluginLicenseKeyStatus('translations') %} +{% set pluginHandle = constant('acclaro\\translations\\Constants::PLUGIN_HANDLE') %} +{% set licenseStatus = craft.app.plugins.getPluginInfo(pluginHandle)['licenseKeyStatus']|default(null) %} {% set edition = (licenseStatus == 'valid') ? 'Paid' : 'Free trial' %} {% set emailSubject = 'Hello Acclaro' %} {% set emailBody = 'I’m interested in learning more about your professional translation services and how you can help with the launch of global Craft sites.%0D%0A%0D%0AThank you,%0D%0AYour Name%0D%0AYour Company%0D%0AYour Phone Number' %} diff --git a/src/templates/_index.twig b/src/templates/_index.twig index 4668bcf5..8415362c 100644 --- a/src/templates/_index.twig +++ b/src/templates/_index.twig @@ -4,7 +4,7 @@ {% set title = "Translation Dashboard"|t %} {% set elementType = 'acclaro\\translations\\elements\\Order' %} {% set pluginHandle = constant('acclaro\\translations\\Constants::PLUGIN_HANDLE') %} -{% set licenseStatus = craft.app.plugins.getPluginLicenseKeyStatus(pluginHandle) %} +{% set licenseStatus = craft.app.plugins.getPluginInfo(pluginHandle)['licenseKeyStatus']|default(null) %} {% set edition = (licenseStatus == 'valid') ? 'Paid' : 'Free trial' %} {% set updates = craft.app.getApi().getUpdates().plugins.translations %} diff --git a/src/templates/settings/about.twig b/src/templates/settings/about.twig index 4b20638d..7be77fd5 100644 --- a/src/templates/settings/about.twig +++ b/src/templates/settings/about.twig @@ -20,9 +20,6 @@
This plugin is made available by Acclaro. Any usage of it on a public site requires that the site owners have purchased the plugin either from Acclaro or the Craft plugin store.