Coder Social home page Coder Social logo

acclaroinc / craft-translations Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 12.0 5.46 MB

Easily manage your Craft CMS website translations and drive global growth with simplified translation workflows.

Home Page: https://plugins.craftcms.com/translations

License: Other

PHP 67.21% CSS 2.24% JavaScript 19.31% Twig 11.23%
craft craft-plugin craftcms localization translation translations-plugin

craft-translations's People

Contributors

bhupeshappfoster avatar blafferty avatar ifrimere avatar robmcfadden avatar shnsumit avatar sidedwards avatar taylordaughtry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

craft-translations's Issues

Translations Plugin dashboard page gives SSL error

Repro step:

  1. install Plugin
  2. go to {admin}/translations

When I land on page, it displays following error:
GuzzleHttp\Exception\RequestException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in /usr/share/nginx/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:186

Even though site is certified with SSL
Screen Shot 2019-09-23 at 5 07 44 PM

Only get this error on Dashboard page and orders, translators, and about tabs loads without any issues.

Environment:
https://github.com/wyveo/nginx-php-fpm > Docker Tag: php71
Craft Version: 3.3.3
PGSQL: 9.6
Host: Google Cloud Platform, flex environment

Couldn't install plugin

The plugin downloaded fine, and was added to composer just fine, but won't install in Craft.

Here's the log file:

$_POST = []

$_FILES = []

$_COOKIE = [
    '1031b8c41dfff97a311a7ac99863bdc5_username' => '19955e3010d8b407bca6a2303dc337e97735372e0cf5bda3f53cb69b25e1c4e8a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_username\";i:1;s:5:\"admin\";}'
    '__stripe_mid' => 'a3d2cff3-ef0b-4e1b-a027-8445e61df9be'
    '1031b8c41dfff97a311a7ac99863bdc5_identity' => '2a6147fe172f075b097109bb58f7f5ee5042074eaba9237377703c44f5d69095a:2:{i:0;s:41:\"1031b8c41dfff97a311a7ac99863bdc5_identity\";i:1;s:206:\"[1,\"[\\\"8oF_TQhR7TcoqyV_1Np6kQfpytrT-BtygP94JLujZexHsCSyM0mT-3BvUaHXpfqVoufouKpnG89-dP69isCDXMLr2ae6HYwCbtvY\\\",null,\\\"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0\\\"]\",1209600]\";}'
    'CraftSessionId' => 'j77rsjdlvsps0a7fn6k15qt31f'
    'CRAFT_CSRF_TOKEN' => '•••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    '__stripe_sid' => 'b4e6abcd-00ae-4ebe-a1ce-7475e80ddf0f'
]

$_SESSION = [
    'bd62416aa8538ede709019a5e113eea5__flash' => [
        'error' => 1
    ]
    '1031b8c41dfff97a311a7ac99863bdc5__token' => '••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••'
    '1031b8c41dfff97a311a7ac99863bdc5__id' => 1
    '1031b8c41dfff97a311a7ac99863bdc5__expire' => 1555469626
    'bd62416aa8538ede709019a5e113eea5__auth_access' => [
        0 => 'saveAssetInVolume:1'
    ]
    'error' => 'Couldn’t install plugin.'
]

$_SERVER = [
    'USER' => 'www-data'
    'HOME' => '/var/www'
    'HTTP_UPGRADE_INSECURE_REQUESTS' => '1'
    'HTTP_COOKIE' => '1031b8c41dfff97a311a7ac99863bdc5_username=19955e3010d8b407bca6a2303dc337e97735372e0cf5bda3f53cb69b25e1c4e8a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_username%22%3Bi%3A1%3Bs%3A5%3A%22admin%22%3B%7D; __stripe_mid=a3d2cff3-ef0b-4e1b-a027-8445e61df9be; 1031b8c41dfff97a311a7ac99863bdc5_identity=2a6147fe172f075b097109bb58f7f5ee5042074eaba9237377703c44f5d69095a%3A2%3A%7Bi%3A0%3Bs%3A41%3A%221031b8c41dfff97a311a7ac99863bdc5_identity%22%3Bi%3A1%3Bs%3A206%3A%22%5B1%2C%22%5B%5C%228oF_TQhR7TcoqyV_1Np6kQfpytrT-BtygP94JLujZexHsCSyM0mT-3BvUaHXpfqVoufouKpnG89-dP69isCDXMLr2ae6HYwCbtvY%5C%22%2Cnull%2C%5C%22Mozilla%2F5.0+%28X11%3B+Ubuntu%3B+Linux+x86_64%3B+rv%3A66.0%29+Gecko%2F20100101+Firefox%2F66.0%5C%22%5D%22%2C1209600%5D%22%3B%7D; CraftSessionId=j77rsjdlvsps0a7fn6k15qt31f; CRAFT_CSRF_TOKEN=0413c990b163d7cf09e398265237edfd5f4666fe4022fd02bbc1a3bf3fe18815a%3A2%3A%7Bi%3A0%3Bs%3A16%3A%22CRAFT_CSRF_TOKEN%22%3Bi%3A1%3Bs%3A208%3A%22caTjblStr5-ZSxOiitoIqeUvl6Dfa54jx5jCQekM%7C2f91fce6d2090313bb2e235b00d24bd8a85fba7abfb64af139d3a1d4e76fc876caTjblStr5-ZSxOiitoIqeUvl6Dfa54jx5jCQekM%7C1%7C%242y%2413%24QmdByUScQyJw.Bix05UxvuCaZvRDmFVI0mZ0qSUAv5eCR44sA1bjq%22%3B%7D; __stripe_sid=b4e6abcd-00ae-4ebe-a1ce-7475e80ddf0f'
    'HTTP_CONNECTION' => 'keep-alive'
    'HTTP_REFERER' => 'http://lgp-global/admin/settings/plugins'
    'HTTP_ACCEPT_ENCODING' => 'gzip, deflate'
    'HTTP_ACCEPT_LANGUAGE' => 'en-US,en;q=0.5'
    'HTTP_ACCEPT' => 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
    'HTTP_USER_AGENT' => 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0'
    'HTTP_HOST' => 'lgp-global'
    'REDIRECT_STATUS' => '200'
    'SERVER_NAME' => 'lgp-global'
    'SERVER_PORT' => '80'
    'SERVER_ADDR' => '127.0.0.1'
    'REMOTE_PORT' => '46012'
    'REMOTE_ADDR' => '127.0.0.1'
    'SERVER_SOFTWARE' => 'nginx/1.14.0'
    'GATEWAY_INTERFACE' => 'CGI/1.1'
    'REQUEST_SCHEME' => 'http'
    'SERVER_PROTOCOL' => 'HTTP/1.1'
    'DOCUMENT_ROOT' => '/var/www/new-craft/web'
    'DOCUMENT_URI' => '/index.php'
    'REQUEST_URI' => '/admin/settings/plugins'
    'SCRIPT_NAME' => '/index.php'
    'CONTENT_LENGTH' => ''
    'CONTENT_TYPE' => ''
    'REQUEST_METHOD' => 'GET'
    'QUERY_STRING' => ''
    'SCRIPT_FILENAME' => '/var/www/new-craft/web/index.php'
    'FCGI_ROLE' => 'RESPONDER'
    'PHP_SELF' => '/index.php'
    'REQUEST_TIME_FLOAT' => 1555466026.3294
    'REQUEST_TIME' => 1555466026
    'ENVIRONMENT' => 'dev'
    'SECURITY_KEY' => '••••••••••••••••••••••••••••••••'
    'DB_DRIVER' => 'pgsql'
    'DB_SERVER' => 'localhost'
    'DB_USER' => 'nicolas'
    'DB_PASSWORD' => '•••••••'
    'DB_DATABASE' => 'lgp-global'
    'DB_SCHEMA' => 'public'
    'DB_TABLE_PREFIX' => ''
    'DB_PORT' => '5432'
    'DEFAULT_SITE_URL' => 'http://lgp-global'
]

And my composer.json file:

{
  "require": {
    "acclaro/translations": "1.0.2",
    "aelvan/mailchimp-subscribe": "v2.0.4",
    "angellco/spoon": "3.3.6",
    "barrelstrength/sprout-active": "2.0.9",
    "barrelstrength/sprout-forms": "3.0.0-beta.50",
    "barrelstrength/sprout-reports": "1.1.5",
    "craftcms/cms": "^3.0.0",
    "craftcms/contact-form": "2.2.4",
    "craftcms/element-api": "2.5.4",
    "craftcms/redactor": "2.3.2",
    "dolphiq/redirect": "1.0.20",
    "dolphiq/sitemap": "1.0.9",
    "dukt/videos": "2.0.6",
    "lukeyouell/craft-contactformtemplates": "1.0.1",
    "lukeyouell/craft-countryselect": "1.1.2",
    "lukeyouell/craft-mailchimplists": "1.0.5",
    "lukeyouell/craft-sentry": "1.5.1",
    "nerds-and-company/schematic": "4.1.1",
    "nystudio107/craft-fastcgicachebust": "1.0.8",
    "nystudio107/craft-seomatic": "3.1.47",
    "rias/craft-notifications": "1.1.1",
    "studioespresso/craft-dumper": "1.3.1",
    "superbig/craft3-http2serverpush": "1.0.1",
    "superbig/craft3-imgix": "2.0.4",
    "topshelfcraft/wordsmith": "3.0.4",
    "verbb/smith": "1.0.0",
    "verbb/super-table": "2.1.17",
    "vlucas/phpdotenv": "^2.4.0",
    "xpertbot/craft-wheelform": "1.25.3"
  },
  "autoload": {
    "psr-4": {
      "modules\\": "modules/"
    }
  },
  "config": {
    "sort-packages": true,
    "optimize-autoloader": true,
    "platform": {
      "php": "7.2"
    }
  },
  "scripts": {
    "post-root-package-install": [
      "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ]
  }
}

Blocks do not appear in translation export if they are not managed on per-site basis

I was trialing the plugin for a client who is currently getting a quote for a website translation job from Acclaro; however, I ran into a snag where fields with blocks (such as Supertable or Matrix) that have their blocks set to NOT be managed on a per-site basis, but have translatable content, do not appear as translatable content to this plugin.

For example, consider you have a content builder for building out detail pages with a matrix block. Say, you have a heading block, "Contact Us" and then a block for a form. The text within the blocks should be translatable; however, the format and structure of the blocks should not be translatable. This is currently possible with Craft; however, the Translations plugin is not aware of these blocks upon creating an order.

Issue applying Drafts [re: missing fields - neo, lightswitch, assets]

Hi!

I'm encountering an issue in Craft 3.6.15 where I'm unable to apply an Order to an Entry. It seems to happen with a specific Order; I've attached the error output + XML I'm attempting to import (I just exported the Order + attempted to reimport the same content). Let me know if you need anything else!

XML ZIP

Image of Yaktocat

Does/can the plugin allow Entries to be translated to other Sites regardless of the Section's propagation setting?

The client I'm working with wants Entries that are only on a specific Site. However, the Translations plugin requires that a Section's propagation setting be set to ALL ("Save entries to all sites enabled for this section").

This means that anyone using the plugin can't have content that's unique to a Site.

Removing this limitation would mean that attempting to translate an Entry to a Site where its section isn't enabled would cause an error—but it'd be a relatively straightforward check to ensure the Section is enabled in the Site, and returning an error if it isn't.

Based on a quick review, reworking this area to not check the supported Sites for entry would be a 'step one', if you will:

if ($element instanceof Entry) {
$supportedSites = array();
foreach ($element->getSupportedSites() as $supportedSite) {
$supportedSites[] = $supportedSite['siteId'];
}
$hasTargetSites = !array_diff($targetSites, $supportedSites);
if (!$hasTargetSites) {
$message = sprintf(
Translations::$plugin->translator->translate('app', "The target site(s) selected are not available for the entry “%s”. Please check your settings in Settings > Sections > %s to change this entry's target sites."),
$element->title,
$element->section->name
);
Craft::$app->getSession()->setError($message);
return;
}

The other changes would include ensuring the Draft being created for each File is for the proper Site, and adding the check to ensure the Draft's Section is enabled for the Target Site.

Order not picking up translatable fields

Repro Steps: (assuming Multi site is already enabled and section has that multi site light switch turned on. and field's translation method is set to Translate for each Site)

  1. Install Translation plugin
  2. Create new section with multi site enabled

Screen Shot 2019-09-23 at 5 27 58 PM

  1. Create new field with translation enabled

Screen Shot 2019-09-23 at 5 27 18 PM

  1. Add that field to section

Screen Shot 2019-09-23 at 5 28 36 PM

  1. add Content to that field

Screen Shot 2019-09-23 at 5 29 01 PM

  1. after saving content, click on New Translation button from same content

Expected Behaviour:
Entry reference with word count to show translatable content.

Actual Behaviour (on our environment):
Screen Shot 2019-09-23 at 5 29 14 PM

No content is picked up as translatable content, unable to submit to create new order for translations

Environment:
https://github.com/wyveo/nginx-php-fpm > Docker Tag: php71
Craft Version: 3.3.3
PGSQL: 9.6
Host: Google Cloud Platform, flex environment

Automatically add new entries to order?

We create all new content on the site in english, and once a month, send those out for translation. We're now running Craft and I am testing out this translations plugin. Is there a way, or could you add a feature so that, whenever a new entry is created, it is automatically added to the current pending order?

If not, is there a command I could execute in a plugin on a new entry save event to add it to an order?

Thanks.

Button to create translation order on element index not appearing

I'm trialing this plugin for a client who is getting a quote for a site translation from Acclaro; however, there doesn't appear to be a button showing up to add multiple entries to an order on the element index screen. I am only able to create an order for a single entry once I've clicked into it. Having used the Craft 2 version, I don't believe this is expected behavior.

image

Plugin stops static translations from working

It looks to me like the Acclaro Translation plugin blocks loading static message translations.

These lines in TranslationRepository.php load Acclaro's translations into Craft/Yii's translation stuff, but because of this line in Yii's MessageSource class, once Acclaro's translations are loaded, the $key in $this->_messages exists, and it never calls ->loadMessages(), etc.

You should be able to easily duplicate this by running the acclaro plugin with entries in translations_translations along with a static translation file for the same category/language.

Maybe there's a way to cause Craft to load all translations up front? It looks like to me that Craft only reads the translation files if it comes across a twig translate filter for that category/language.

I saw this on older versions, but it's definitely present on CraftCMS 3.4.5/Translations 1.5 as well as CraftCMS 3.4.14/Translations 1.5.1.

Support for section propagation method "custom"

P&T added a new feature in craft 3.5.0 called PROPAGATION_METHOD_CUSTOM for sections.

see: https://github.com/craftcms/cms/blob/main/src/models/Section.php#L45

We are currently testing your plugin and this is a core requirement. Imagine the following scenario:

  • Entry in "Site A" (Propagation Method custom)
  • Export Content
  • Import contentt
  • Apply Translation --> Error because Draft for entry with id was not found

What craft does is, it lets you choose, if you want to have this specific Entry enabled in the target site.
When in my order, the imported content is in status "Ready to apply", i need to have the option to "enable target site for entry" first and after that do the import, but it may not fail uncaught when pushing the apply button.

Are there any plans to support this feature, or at least resolve the bug?
Another option would also be, to just no allow to import into this entry as long as it not enabled for the target site.

Small Text Change Suggestion

Going through connectors for test case creation and noticed that we have SITE listed here instead of either Language or Locale.
Not an emergency just a suggestion - @ifrimere what do you think?

Contentful we use Locale
My Acclaro and plunet we say Source and Target LANGUAGE
so maybe we switch the craft one to one of those versus SITE?

image

XML Export Missing Blocks when using same Block Type

Hi again!

We are testing the latest version of the plugin (2.0.1) on Craft 3.7.15 and having the following issue.

  • Create an entry with a matrix field with multiple block types (page builder style).
  • Use the same block type more than once
  • Create Translation Order (import/export)
  • Export XML
  • On block types that were used more than once, you will only see the second instance of the block type in the XML file.

Thanks!

Unable to modify and browse "Messages"

Hello

I am unable to browse the messages section through the pagination. Every time I press one of the arrows or page numbers it reloads the same page view again. There is some Javascript error that happens each time (Cannot read property 'split' of undefined).

Search doesn't seem to do anything either, but I am guessing that it's related to the same problem.

Craft CMS 3.4.17.1
Translations 2.0.3

Any help would be greatly appreciated! Thank you!

Is the plugin compatible with `project.yaml` and multiple environments?

Hi!

I'm encountering an issue where the plugin doesn't seem to install "properly" when using multiple environments, some with disabled admin changes. Specifically, I'm seeing this error when attempting to sync project-config in another environment:
Changes to the project config are not possible while in read-only mode.

I'd imagine that since admin changes are disabled, and installing this plugin runs migrations that don't go through the projectConfig service, the error makes sense, and the plugin isn't compatible with this situation—but if I'm missing something, just let me know! (I'd love to be wrong and just correct something errant I'm doing on my end!)

Here's some context:

  • Craft 3.4.23
  • acclaro/translation @ 1.7.0
  • Two environments: local + staging
  • Host: Heroku (using Pipelines)

Allow translation of Asset titles

Asset fields were recently added to the export: #8

This is great, but sometimes sites are using the title for the alt text instead of a field or for other reasons. If the title wasn't intentionally ignored for some reason, can we add that in?

https://github.com/robmcfadden/craft-translations/blob/asset-title-support/src/services/fieldtranslator/AssetsFieldTranslator.php#L40

Happy to make a PR for this. If this looks good, let me know which branch I should make the PR to. Thanks!

getDraftsByGlobalSetId function uses a site handle to look up GlobalSetDraftRecords, but it should use an ID

When I navigate to a global set in the CP, the first one works because there is no site handle in the URL, but if I navigate to another global set, the site handle gets added to the URL. In my case, either 'default' or 'de'. Eventually that handle from the URL gets matched and used to retrieve drafts for the global. Any of these global set CP pages with the site handle in them throw an error:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "default"
or
SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "de"

It seems that this line is setting the site value to the handle string instead of the id integer:

'site' => $site ?: Craft::$app->sites->getPrimarySite()->id

I changed it locally to:
'site' => Craft::$app->sites->getSiteByHandle($site)->id ?: Craft::$app->sites->getPrimarySite()->id

and that seems to have done the trick (at least the pages load now locally).

Migration Exception

Hi!

I am getting this migration exception when updating from v1.10.6 to v2.0.1.

- Craft version: 3.7.9 (Pro)
- PHP version: 7.3.28
- OS version: Linux 5.4.0-58-generic
- Database driver & version: PostgreSQL 10.6
- Plugins & versions: 
    - Translations v1.10.6
Database Exception: SQLSTATE[42710]: Duplicate object: 7 ERROR: constraint "translations_files_status_check" for relation "translations_files" already exists
The SQL being executed was: ALTER TABLE "translations_files" ALTER COLUMN "status" TYPE varchar(255), ALTER COLUMN "status" SET DEFAULT 'new', ALTER COLUMN "status" DROP NOT NULL, ADD CONSTRAINT translations_files_status_check CHECK ("status" in ('new','in progress','preview','ready for review','complete','canceled','published','failed'))

Migration: acclaro\translations\migrations\m210922_095949_add_ready_for_review_status

Output:

Altering translations_files status column...
> alter column status in table {{%translations_files}} to string DEFAULT 'new' CHECK ([[status]] in ('new','in progress','preview','ready for review','complete','canceled','published','failed')) ...Exception: SQLSTATE[42710]: Duplicate object: 7 ERROR: constraint "translations_files_status_check" for relation "translations_files" already exists
The SQL being executed was: ALTER TABLE "translations_files" ALTER COLUMN "status" TYPE varchar(255), ALTER COLUMN "status" SET DEFAULT 'new', ALTER COLUMN "status" DROP NOT NULL, ADD CONSTRAINT translations_files_status_check CHECK ("status" in ('new','in progress','preview','ready for review','complete','canceled','published','failed')) (/path/to/craft/src/vendor/yiisoft/yii2/db/Schema.php:678)
#0 /path/to/craft/src/vendor/yiisoft/yii2/db/Command.php(1307): yii\db\Schema->convertException(Object(PDOException), 'ALTER TABLE "tr...')
#1 /path/to/craft/src/vendor/yiisoft/yii2/db/Command.php(1102): yii\db\Command->internalExecute('ALTER TABLE "tr...')
#2 /path/to/craft/src/vendor/yiisoft/yii2/db/Migration.php(420): yii\db\Command->execute()
#3 /path/to/craft/src/vendor/acclaro/translations/src/migrations/m210922_095949_add_ready_for_review_status.php(20): yii\db\Migration->alterColumn('{{%translations...', 'status', Object(yii\db\ColumnSchemaBuilder))
#4 /path/to/craft/src/vendor/craftcms/cms/src/db/Migration.php(52): acclaro\translations\migrations\m210922_095949_add_ready_for_review_status->safeUp()
#5 /path/to/craft/src/vendor/craftcms/cms/src/db/MigrationManager.php(232): craft\db\Migration->up(true)
#6 /path/to/craft/src/vendor/craftcms/cms/src/db/MigrationManager.php(148): craft\db\MigrationManager->migrateUp(Object(acclaro\translations\migrations\m210922_095949_add_ready_for_review_status))
#7 /path/to/craft/src/vendor/craftcms/cms/src/services/Updates.php(249): craft\db\MigrationManager->up()
#8 /path/to/craft/src/vendor/craftcms/cms/src/controllers/BaseUpdaterController.php(509): craft\services\Updates->runMigrations(Array)
#9 /path/to/craft/src/vendor/craftcms/cms/src/controllers/UpdaterController.php(203): craft\controllers\BaseUpdaterController->runMigrations(Array, 'restore-db')
#10 [internal function]: craft\controllers\UpdaterController->actionMigrate()
#11 /path/to/craft/src/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#12 /path/to/craft/src/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#13 /path/to/craft/src/vendor/craftcms/cms/src/web/Controller.php(189): yii\base\Controller->runAction('migrate', Array)
#14 /path/to/craft/src/vendor/yiisoft/yii2/base/Module.php(534): craft\web\Controller->runAction('migrate', Array)
#15 /path/to/craft/src/vendor/craftcms/cms/src/web/Application.php(277): yii\base\Module->runAction('updater/migrate', Array)
#16 /path/to/craft/src/vendor/craftcms/cms/src/web/Application.php(674): craft\web\Application->runAction('updater/migrate')
#17 /path/to/craft/src/vendor/craftcms/cms/src/web/Application.php(214): craft\web\Application->_processUpdateLogic(Object(craft\web\Request))
#18 /path/to/craft/src/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#19 /path/to/craft/src/web/index.php(21): yii\base\Application->run()
#20 ~/.composer/vendor/laravel/valet/server.php(235): require('/~/...')
#21 {main}

Import xml/zip file to translation order failing

There seems to be a bug when we tried to import xml/zip file to translation order.
Following is SQL error message we’re getting when Go! button is clicked after xml/zip file is uploaded to field above:
SQLSTATE[23502]: Not null violation: 7 ERROR: null value in column "id" violates not-null constraint DETAIL: Failing row contains (null, 1, 5, Talk Page, トークページ, 2019-08-13 21:39:54, 2019-08-13 21:39:54, b46dde54-1bb3-405e-999f-c4b31e7a3214). The SQL being executed was: INSERT INTO "dp_translations_translations" ("id", "sourceSite", "targetSite", "source", "target", "dateCreated", "uid", "dateUpdated") VALUES (NULL, 1, 5, 'Talk Page', 'トークページ', '2019-08-13 21:39:54', 'b46dde54-1bb3-405e-999f-c4b31e7a3214', '2019-08-13 21:39:54') RETURNING "id"

We’re using:
Craft: 3.1.33
PHP: 7.1
PGSQL version: 11.4 (same error happens on 9.6 and 10.x)

Any thoughts on the cause ?

Merge Issue with Drafts created From Plugin

Hi!

We think we have uncovered a bug which seems to be related to the new Craft merge feature into drafts which recently added matrix blocks. This issue seems to only happen with Acclaro created drafts and we think it only occurs with drafts using Matrix blocks as a "page builder" type field.

Steps to recreate.

  1. Create an entry using a matrix field and create a few different blocks (with different block types)
  2. Create a translation order from that entry targeting multiple sites
  3. At that point, the Acclaro drafts are created correctly.
  4. Go back to "Current" entry in any language and make a content change to one of the matrix blocks.
  5. Then return to an an Acclaro draft in a different language from where the change was made and you should see duplicates of each matrix block that was created. Meaning, for example, lets assume I have 3 sites, english, french, and spanish.....if i updated the "current" french entry, then the French Acclaro draft would be fine, but the Spanish draft would have the duplicate blocks.

I know this one is a little tough to describe, so happy to jump on a call anytime.

This is with Craft 3.7.13 and Acclaro v1.10.6

Thanks!

Store static translations in the DB, volume, or some other location than directly on the server.

If I'm understanding the code correctly, the plugin is currently storing static translations that are added/modified by the user in the translations file itself. If the site's deployed via git, that file is overwritten and those changes are lost. (If the site uses any sort of multiple instance setup, this also causes issues.)

Here's where the changes would (possibly) need to be made:

public function set($lang, array $fileContent)
{
try {
// get translation file path
$sitePath = Craft::$app->getPath()->getSiteTranslationsPath();
$file = $sitePath.DIRECTORY_SEPARATOR.$lang.DIRECTORY_SEPARATOR.'site.php';
if ($existingContent = @include($file)) {
$fileContent = array_merge($existingContent, $fileContent);
}
$content = "<?php\r\n\r\nreturn ";
$content .= var_export($fileContent, true);
$content .= ';';
$content = str_replace(" '", "\t'", $content);
// write to file
FileHelper::writeToFile($file, $content);
}catch (\Exception $e) {
throw new \Exception(Craft::t('app','Something went wrong'));
}
return true;
}
}

Compatibility with Craft 3.4.7.1?

I'm having trouble accessing any page -- admin or frontend -- since updating Craft to 3.4.7.1.

Seeing the following error:

Class 'acclaro\translations\Order' not found

Removing the plugin eliminates the error. I tested this with plugin versions of 1.4.3 and 1.2.1. Any chance there's something that needs to be patched on this end?

Composer error

Craft: Craft Pro 3.0.27.1
PHP: 7.1.20

We are getting a composer error when trying to install

  Problem 1
    - Installation request for sebastian/diff 3.0.x-dev -> satisfiable by sebastian/diff[3.0.x-dev].
    - sebastian/diff 3.0.x-dev requires php ^7.1 -> your PHP version (7.0.33-0ubuntu0.16.04.3) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
  Problem 2
    - Installation request for sebastian/diff dev-master -> satisfiable by sebastian/diff[dev-master].
    - sebastian/diff dev-master requires php ^7.1 -> your PHP version (7.0.33-0ubuntu0.16.04.3) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
  Problem 3
    - sebastian/diff 3.0.x-dev requires php ^7.1 -> your PHP version (7.0.33-0ubuntu0.16.04.3) overridden by "config.platform.php" version (7.0) does not satisfy that requirement.
    - acclaro/translations dev-master requires sebastian/diff ^3.0 -> satisfiable by sebastian/diff[3.0.x-dev].
    - Installation request for acclaro/translations dev-master -> satisfiable by acclaro/translations[dev-master].

Let me know if there are any additional details I can provide.

Cannot "Create New Order" from entry

After creating a Translator and navigating to an entry, "Create New Order.." is unavailable from combo button dropdown.

Running Craft CMS 3.0.41.1 with Translations 1.0.2 demo.

Screenshot 2019-05-14 13 48 21

"New Translation" button no longer appears on Edit Entry Screen

In a recent Craft update (3.4.29), the hidden form element on the Edit Entry screen that Craft Translations uses to get the Entry ID has had a name change, which causes the "New Translation" button to not render on the Edit Entry screen.

getEditEntryId is looking for a field with name "entryId":

getEditEntryId: function() {
return $('form#main-form input[type=hidden][name=entryId]').val();
},

But as of Craft 3.4.29 that field name has changed to either "sourceId" or "revisionId" depending on whether the entry is a revision: https://github.com/craftcms/cms/blob/a6ffa8004da4da65f5bc883161ad6488d99cf23c/src/templates/entries/_edit.html#L45-L49

On the edit entry screen, the init function bails immediately because this conditional is always true, because the field with name "entryId" is never found:

if (this.isEditEntryScreen() && !this.getEditEntryId()) {
return;
}

Fields aren't translated properly when using child blocks in Neo fields.

Hi! Based on some investigation, it seems that the plugin doesn't currently handle situations where Neo fields use Child Blocks.

Here's the environment where I'm seeing this happen (we're on Craft 3.4.30 and Translations 1.8.2):

  1. We have a Neo field named 'Master Content', which contains two blocks: a 'Sponsor' block and a 'Form' block
  2. The 'Sponsor' block has at least one Child Block enabled
  3. The 'Sponsor' block, its Child Block, and the 'Form' block all have a headline field
  4. When creating a translation for an Entry, Translations saves the wrong headline data to the block that appears after the 'Sponsors' block

I've narrowed it down to this specific line:

$post = Translations::$plugin->elementTranslator->toPostArrayFromTranslationTarget($draft, $sourceSite, $targetSite, $targetData);

If I dump the data going into it, it's accurate (i.e. all the Headline fields are what they should be), but dumping the result of that method shows the errantly-placed data.

I realize that's somewhat difficult to understand through text, so if you'd like to have a very quick call I'd be glad to screenshare and walk you through it, just let us know.

Can't create a new translator entry

Tried to create an import/export translator, and this error came up:

PDOException: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, , export_import, ["2"], active, [], 2019-04-17 06:33:55, 2019-04-17 06:33:55, 47105d0a-8cdd-4f23-b79a-93058119f885). in /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php:1290
Stack trace:
#0 /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php(1290): PDOStatement->execute()
#1 /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php(1158): yii\db\Command->internalExecute('INSERT INTO "tr...')
#2 /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php(413): yii\db\Command->queryInternal('fetch', NULL)
#3 /var/old/new-craft/vendor/yiisoft/yii2/db/pgsql/Schema.php(617): yii\db\Command->queryOne()
#4 /var/old/new-craft/vendor/yiisoft/yii2/db/ActiveRecord.php(600): yii\db\pgsql\Schema->insert('{{%translations...', Array)
#5 /var/old/new-craft/vendor/yiisoft/yii2/db/ActiveRecord.php(566): yii\db\ActiveRecord->insertInternal(NULL)
#6 /var/old/new-craft/vendor/yiisoft/yii2/db/BaseActiveRecord.php(678): yii\db\ActiveRecord->insert(false, NULL)
#7 /var/old/new-craft/vendor/acclaro/translations/src/services/repository/TranslatorRepository.php(166): yii\db\BaseActiveRecord->save(false)
#8 /var/old/new-craft/vendor/acclaro/translations/src/controllers/BaseController.php(909): acclaro\translations\services\repository\TranslatorRepository->saveTranslator(Object(acclaro\translations\models\TranslatorModel))
#9 [internal function]: acclaro\translations\controllers\BaseController->actionSaveTranslator()
#10 /var/old/new-craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /var/old/new-craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#12 /var/old/new-craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('save-translator', Array)
#13 /var/old/new-craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-translator', Array)
#14 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('translations/ba...', Array)
#15 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('translations/ba...', Array)
#16 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#17 /var/old/new-craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#18 /var/old/new-craft/web/index.php(21): yii\base\Application->run()
#19 {main}

Next yii\db\IntegrityException: SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, , export_import, ["2"], active, [], 2019-04-17 06:33:55, 2019-04-17 06:33:55, 47105d0a-8cdd-4f23-b79a-93058119f885).
The SQL being executed was: INSERT INTO "translations_translators" ("id", "status", "service", "label", "sites", "settings", "dateCreated", "uid", "dateUpdated") VALUES (NULL, 'active', 'export_import', '', '["2"]', '[]', '2019-04-17 06:33:55', '47105d0a-8cdd-4f23-b79a-93058119f885', '2019-04-17 06:33:55') RETURNING "id" in /var/old/new-craft/vendor/yiisoft/yii2/db/Schema.php:664
Stack trace:
#0 /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php(1295): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO "tr...')
#1 /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php(1158): yii\db\Command->internalExecute('INSERT INTO "tr...')
#2 /var/old/new-craft/vendor/yiisoft/yii2/db/Command.php(413): yii\db\Command->queryInternal('fetch', NULL)
#3 /var/old/new-craft/vendor/yiisoft/yii2/db/pgsql/Schema.php(617): yii\db\Command->queryOne()
#4 /var/old/new-craft/vendor/yiisoft/yii2/db/ActiveRecord.php(600): yii\db\pgsql\Schema->insert('{{%translations...', Array)
#5 /var/old/new-craft/vendor/yiisoft/yii2/db/ActiveRecord.php(566): yii\db\ActiveRecord->insertInternal(NULL)
#6 /var/old/new-craft/vendor/yiisoft/yii2/db/BaseActiveRecord.php(678): yii\db\ActiveRecord->insert(false, NULL)
#7 /var/old/new-craft/vendor/acclaro/translations/src/services/repository/TranslatorRepository.php(166): yii\db\BaseActiveRecord->save(false)
#8 /var/old/new-craft/vendor/acclaro/translations/src/controllers/BaseController.php(909): acclaro\translations\services\repository\TranslatorRepository->saveTranslator(Object(acclaro\translations\models\TranslatorModel))
#9 [internal function]: acclaro\translations\controllers\BaseController->actionSaveTranslator()
#10 /var/old/new-craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /var/old/new-craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#12 /var/old/new-craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('save-translator', Array)
#13 /var/old/new-craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('save-translator', Array)
#14 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('translations/ba...', Array)
#15 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('translations/ba...', Array)
#16 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#17 /var/old/new-craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#18 /var/old/new-craft/web/index.php(21): yii\base\Application->run()
#19 {main}
Additional Information:
Array
(
    [0] => 23502
    [1] => 7
    [2] => ERROR:  null value in column "id" violates not-null constraint
DETAIL:  Failing row contains (null, , export_import, ["2"], active, [], 2019-04-17 06:33:55, 2019-04-17 06:33:55, 47105d0a-8cdd-4f23-b79a-93058119f885).
)

Use Craft's native XML export feature when generating XML for orders.

This is 100% a feature request, to be clear:

It'd be fantastic if we were able to export content with the (now) native XML exports. It'd let the plugin 'lean' on Craft's developers to provide support for various fields, taking a significant load off support needs.

The biggest barrier is the significant difference in XML structure between Craft's exports and this plugin's—that's likely where most of the work would lie.

Just a feature request, of course! This would be a huge win for workflow, being able to export content from any site to provide what's needed for translation.

Error deleting assets or entries

Hi,

i have installed translation plugin v1.1.1 and Craft 3.0.41. When I try to delete any asset or entry, it gives me an error notification of "An unknown error occurred." and the asset or entry remains. When I disable the translation plugin, deleting works again as usual. I tested on different environments, all same scenario.

Does anybody have an idea what could be the issue here and how to fix that?

Thank you
Stephan

Add support for Volumes to address an import error when using separate web/worker instances.

Hey!

For projects where the instance processing the job and the instance serving the CP are different, the plugin's Updating translation drafts job currently throws an error due to a missing file. (Since the upload is in the tempuploads directory of the worker instance, it wouldn't be in the tempuploads directory of the CP instance.)

DirectoryIterator::__construct(/app/storage/runtime/assets/tempuploads/88723): failed to open dir: No such file or directory

It'd be awesome if we could tell the plugin to use a Volume (like S3) to account for these types of situations! Would that be possible? (@sidedwards)

3.2 Publishing Functionality Update

In the current 1.2 version of the Plugin, 'updating' Translation Drafts has undesirable consequences with other multisite Entry drafts reverting any recent changes made to them. (Reference core CraftCMS posted issue: craftcms/cms#4642)

To better work with Craft 3.2's treatment of single Draft Entries, the Translations Plugin will be updated to directly "Save" delivered translations instead of updating and applying the Translation Drafts. Additionally, the Translation Drafts need to be set to 'can't be updated' status.

Acclaro has already begun working on this enhancement with the goal to have it ready within a couple of weeks or sooner.

Export Translations Order entries to CSV file

We ran into an issue after importing around 800 translated XML files in which the Draft preview links quit working. Our working Excel files that we were tracking the export/import process now had broken Draft preview links for the linguists. This is not ideal for the linguists during QA because they now have to log into Craft and preview each entry in the Craft UI.

Ideally, we could have mitigated the issue if the Translations plugin allowed exporting all Translations Order entries to CSV.

Overview: https://download.hamiltonsupport.com/wl/?id=ckCmwbMKvHEAFSzlStvqVhkSaGCrSAWC

Should the Target Site of an Order have a foreign key to the Site, so it's deleted when the target Site is deleted?

While I was testing locally, I encountered a minor issue where the Orders index screen threw an error—

SiteRepository@getSiteLanguageDisplayName()@179: getLocaleById() requires string, null given:

public function getSiteLanguageDisplayName($siteId)
{
$language = $this->getSiteLanguage($siteId);
$displayName = Craft::$app->i18n->getLocaleById($language)->getDisplayName();
return $displayName;
}

The issue stemmed from a few orders I made for a Site that was later deleted—since that site no longer exists, getSiteLanguage() was returning null and passing that value to the getLocaleById() method.

Super quick-fix, and not a blocker at all! But, I did want to ask this question to see if there was something happening elsewhere that prevented a foreign key being added to prevent this in the future!

cURL error 28: Operation timed out after 2000 milliseconds with 0 out of 0 bytes received

After successful installation, accessing the Translations menu gives this error:
(I do have to wonder why this module costs $1,000 when it's so buggy)

GuzzleHttp\Exception\ConnectException: cURL error 28: Operation timed out after 2000 milliseconds with 0 out of 0 bytes received (see http://curl.haxx.se/libcurl/c/libcurl-errors.html) in /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:185
Stack trace:
#0 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(149): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array)
#1 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php(102): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#2 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory))
#3 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#4 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php(51): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#5 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php(37): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#6 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Middleware.php(30): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#7 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php(70): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#8 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Middleware.php(60): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#9 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/HandlerStack.php(67): GuzzleHttp\Middleware::GuzzleHttp\{closure}(Object(GuzzleHttp\Psr7\Request), Array)
#10 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Client.php(277): GuzzleHttp\HandlerStack->__invoke(Object(GuzzleHttp\Psr7\Request), Array)
#11 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Client.php(125): GuzzleHttp\Client->transfer(Object(GuzzleHttp\Psr7\Request), Array)
#12 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Client->requestAsync('get', Object(GuzzleHttp\Psr7\Uri), Array)
#13 /var/old/new-craft/vendor/guzzlehttp/guzzle/src/Client.php(89): GuzzleHttp\Client->request('get', 'feed/', Array)
#14 /var/old/new-craft/vendor/acclaro/translations/src/widgets/News.php(122): GuzzleHttp\Client->__call('get', Array)
#15 /var/old/new-craft/vendor/acclaro/translations/src/widgets/News.php(85): acclaro\translations\widgets\News->_getArticles()
#16 /var/old/new-craft/vendor/acclaro/translations/src/controllers/WidgetController.php(804): acclaro\translations\widgets\News->getBodyHtml()
#17 /var/old/new-craft/vendor/acclaro/translations/src/controllers/WidgetController.php(135): acclaro\translations\controllers\WidgetController->_getWidgetInfo(Object(acclaro\translations\widgets\News))
#18 [internal function]: acclaro\translations\controllers\WidgetController->actionIndex()
#19 /var/old/new-craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#20 /var/old/new-craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#21 /var/old/new-craft/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('index', Array)
#22 /var/old/new-craft/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('index', Array)
#23 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('translations/wi...', Array)
#24 /var/old/new-craft/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('translations/wi...', Array)
#25 /var/old/new-craft/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request))
#26 /var/old/new-craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#27 /var/old/new-craft/web/index.php(21): yii\base\Application->run()
#28 {main}

Prevent toArray() on null -

The method FileRepository::getFileById() throws an Excetion when FileRecord not found and toArray() is called on null.

Error: Call to a member function toArray() on null in /vendor/acclaro/translations/src/services/repository/FileRepository.php:30

Stack trace:
#0 /vendor/acclaro/translations/src/controllers/BaseController.php(142): acclaro\translations\services\repository\FileRepository->getFileById('1')
#1 [internal function]: acclaro\translations\controllers\BaseController->actionFileCallback()

How can I mark all entries on a site as "already translated"?

Trying out the plugin on a site with 6 languages. This site's Craft install is a replacement content management system for an old ExpressionEngine 2 install - thus, all the entries already have translations. I'd like to take advantage of the "Modified Source Entries" widget on the dashboard, but the plugin thinks that none of my entries have ever been translated. Is there a tool I can use, or a query I can run on the db, to mark everything as translated from the start?

FR: Allow for assets to be added to translation order even if not related to entry

We have many assets on a 6 language site that are not attached to an entry, but do show up on the site. In our case, they are product documentation PDFs that are categorized and show up in search results for docs as well as categorized lists.

I don't believe adding an asset to an order upon upload makes sense, because it is unlikely that the asset title or any custom fields would have been populated at that time (title would just be made from the filename by Craft on upload). However, I do think a good idea would be to, on asset save, evaluate if the asset title in non-primary site languages is equivalent to the primary site title (so EN title == DE title, for instance) and if so, add that asset automatically to the open order. This does leave room for error however, and has to make a lot of assumptions, so it may not be ideal.

What I did in the old EE2 version of this with my custom translation module was, there was a custom field called "Needs Translation?" that was present on all entry types that could be translated. It's default value was true, so any time a new entry was added to the system, it would be "marked for translation". We had all PDFs setup as a file related to an entry so we could support translated titles and summaries for PDFs, so those got marked upon creation. With Craft, since assets can have custom fields just like entries, a good approach may be to have something akin to that Needs Translation field where entry sections, asset volumes, and even global sections can be selected to use it, and then, whenever an new entry in certain sections, asset in certain volumes, or variable in certain globals is added to the system, it is auto marked for translation, and then provide the ability to create a new order that includes all entries/assets/globals that are marked for translation. If this field was available even across existing entries/assets/globals, and when edited and saved, the plugin could auto mark an edited element for translation, those could be included as well in that new order.

Cannot Test Import/Export with Demo Version

Running the demo, seems like it is impossible to save an Order and therefor impossible to test the Import/Export functionality. Am I missing something? Thanks in advance.

Translating Asset Fields

We have an 'alt' field on our assets that needs to be translated, how do we add the fields on assets that need to be translated to an order?

Not super obvious if you need to pay for translations?

Hello,

I am not sure it is obvious but do I have to pay for translations using acclaro? Or does the $999 include translations? Is there limits? Would be nice to have a few more of those type of details on the readme/wiki/plugin details.

Thanks,

Array to String Conversion when importing a ZIP file

I'm gathering more specific information on replication now, but I thought I'd go ahead and open an issue to see if this is a known-bug just yet! My client was uploading a ZIP file they recieved from the Acclaro team after translation, and after uploading the file ran into the error in the stack trace below!

I think the offending line could be here, but I haven't taken a deep-dive into it just yet.

Stack trace:

yii\base\ErrorException: Array to string conversion in /app/vendor/acclaro/translations/src/services/job/ImportFiles.php:98
Stack trace:
#0 /app/vendor/craftcms/cms/src/web/ErrorHandler.php(84): yii\base\ErrorHandler->handleError(8, 'Array to string...', '/app/vendor/acc...', 98)
#1 /app/vendor/acclaro/translations/src/services/job/ImportFiles.php(98): craft\web\ErrorHandler->handleError(8, 'Array to string...', '/app/vendor/acc...', 98, Array)
#2 /app/vendor/acclaro/translations/src/controllers/FilesController.php(312): acclaro\translations\services\job\ImportFiles->processFile(Object(craft\elements\Asset), Object(acclaro\translations\elements\Order), 'zip', Array)
#3 [internal function]: acclaro\translations\controllers\FilesController->actionImportFile()
#4 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#5 /app/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#6 /app/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Controller->runAction('import-file', Array)
#7 /app/vendor/craftcms/cms/src/web/Application.php(277): yii\base\Module->runAction('translations/fi...', Array)
#8 /app/vendor/craftcms/cms/src/web/Application.php(586): craft\web\Application->runAction('translations/fi...', Array)
#9 /app/vendor/craftcms/cms/src/web/Application.php(256): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#10 /app/vendor/yiisoft/yii2/base/Application.php(392): craft\web\Application->handleRequest(Object(craft\web\Request))
#11 /app/web/index.php(24): yii\base\Application->run()
#12 {main}

Indexing Error on Import

We're applying an import/export of a page with a matrix block.

The matrix block goes text 1->image->text 2->text 3 but when the translation is applied, text 3 is in text 2's spot and nothing appears in text 3.

Craft CMS 3.5.18
Translations v1.9.4

Extra "space" character being injected into resname attribute causing incomplete imports

I have a few fields (specifically dropdown and radio buttons) that contain layout-related settings like Green (with a value of button--secondary) or Blue (with a value of button--tertiary), in the case of another field Medium (with a value of font--m) ... and so on. Essentially the values of these fields control CSS class on the front-end (the template outputs the value into a class attribute).

After import we noticed that all of these classes were missing on the translated entries, and I did some digging into why this may be happening.

Comparing the exported data and the imported data I am seeing that the resname attributes for these fields are not matching up, and it seems to be specifically related to the presence of a double hyphen in the value.

Using the handful of examples I listed above the resname attributes in the import file look like button- -secondary, button- -tertiary, font- -m, and so on. Note the added space.

Screen Shot 2020-08-17 at 12 33 16 PM

Here's a screenshot of one of the diffs. ☝️

It seems that because the resname attributes don't match, the import process isn't bringing the data back in so each of these fields in each entry is ending up blank.

File failed to import due to the resname mismatches in the XML.

My client is using a non-Acclaro translation service and they are sitting on translations for a while. By the time I'm importing them, I get this error.

When I create a new order and download the XML, I see that the resnames have different IDs.

Is there anything I can do about this besides manually fixing the XML files?

Blank install of v1.10.5, creating order not working

Hey,

we are currently testing around with your plugin. Creating a blank craft instance and installing the latest version fails with an error when submitting an order.

if we install 1.10.4 first und upgrade to 1.10.5 after that it works. So i think there is something missing in some migrations.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.