Skip to content

Commit

Permalink
Merge pull request #444 from AcclaroInc/release/2.2.5
Browse files Browse the repository at this point in the history
Release/2.2.5
  • Loading branch information
bhupeshappfoster authored May 29, 2023
2 parents f3d79f8 + 48bebe9 commit 325e9b8
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .craftplugin
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions src/services/fieldtranslator/AssetsFieldTranslator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/templates/_components/app-info.twig
Original file line number Diff line number Diff line change
@@ -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' %}
Expand Down
2 changes: 1 addition & 1 deletion src/templates/_index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}

Expand Down
3 changes: 0 additions & 3 deletions src/templates/settings/about.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@

<h4 style="margin-top: 0px;">{{ 'by Acclaro Inc.'|t }}</h4>

{% set licenseStatus = craft.app.plugins.getPluginLicenseKeyStatus('translations') %}
{% set baseAssetsUrl = craft.app.assetManager.getPublishedUrl('@acclaro/translations/assetbundles/src', true ) %}

<div>
<h3>{{ 'General Information'|t }}</h3>
<p>This plugin is made available by <a href="https://www.acclaro.com/">Acclaro</a>. 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.</p>
Expand Down

0 comments on commit 325e9b8

Please sign in to comment.