Germany
Account created on 19 February 2008, almost 17 years ago
#

Merge Requests

More

Recent comments

🇩🇪Germany SteffenR Germany

I'll have a look on the issue. Looks like the configuration of the unit tests needs to be updated.

🇩🇪Germany SteffenR Germany

Additional info: https://www.deepl.com/en/blog/deepl-translator-now-supports-traditional-...

@cyrille.miskiewicz: Feel free to add a MR adding the new language.

🇩🇪Germany SteffenR Germany

I've added a new MR fixing the issues, since the MR provided by the bot was missing some additions made to the module.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 3451351-automated-drupal-11 to hidden.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch project-update-bot-only to hidden.

🇩🇪Germany SteffenR Germany

@rgpublic: You are right but ;)
In our case, we did not switch to paragraphs_asymmetric_translation_widgets module, since few sites only get security updates in terms of module updates. In this case, it made more sense, to fix the existing patch for the latest paragraphs version.
For our recent projects we switched to paragraphs_asymmetric_translation_widgets and use the "minimal" version of the patch proposed in this issue..

🇩🇪Germany SteffenR Germany

I've created a new MR, because updating the Fork/ re-applying the changes messed up the old one...

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 2.x to hidden.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 3224400-missing-resizeobserver-api to hidden.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 2.x to active.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 2.x to hidden.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 3224400-2.x-missing-resizeobserver-api to hidden.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 3224400-8.x-1.x-missing-resizeobserver-api to hidden.

🇩🇪Germany SteffenR Germany

steffenr changed the visibility of the branch 3224400-8.x-1.x-missing-resizeobserver-api_rb1 to hidden.

🇩🇪Germany SteffenR Germany

Another reroll of the latest patch for 1.18. I was missing the
use Drupal\paragraphs\ParagraphInterface;
while Copy&Pasting the code.

🇩🇪Germany SteffenR Germany

I just did a quick test run in Drupal 10.2 with existing values and the hook_update_n was working as expected. The length of the field is set to 64.

Thanks @hctom

🇩🇪Germany SteffenR Germany

steffenr made their first commit to this issue’s fork.

🇩🇪Germany SteffenR Germany

Since we were als using 2904705-128.patch with version 1.16, i did a quick reroll of the patch to get it working with 1.18 also.

🇩🇪Germany SteffenR Germany

Unfortunately you hook_update_n is not working, if you have a database with existing content.

------------------ ----------- --------------- -------------------------------------------------------------------------------
  Module             Update ID   Type            Description
 ------------------ ----------- --------------- -------------------------------------------------------------------------------
  view_mode_switch   10201       hook_update_n   10201 - Increase max length of all view mode switch 'value' property columns.
 ------------------ ----------- --------------- -------------------------------------------------------------------------------

 // Do you wish to run the specified pending updates?: yes.

>  [notice] Update started: view_mode_switch_update_10201
>  [error]  The SQL storage cannot change the schema for an existing field (field_column_layout in paragraph entity) with data.
>  [error]  Update failed: view_mode_switch_update_10201
🇩🇪Germany SteffenR Germany

I'll have a look on it and hope the error is fixed.

🇩🇪Germany SteffenR Germany

The official DeepL-PHP library is being integrated in https://git.drupalcode.org/issue/tmgmt_deepl-3324073/-/tree/3324073-use-...

Can you give it a try please and give feedback?

🇩🇪Germany SteffenR Germany

Looks like the request payload is to big and causes the timeout or your connection is too slow.
Can you give more details on the amount of text you try to translate and give steps to reproduce the issue?

🇩🇪Germany SteffenR Germany

Even after clearing caches the problem still persists.
It's kind of strange, since our custom cookie plugin is working without any problems and the hook_page_attachments is rewriting the code correctly.

🇩🇪Germany SteffenR Germany

@anybody: I do so. I'll have a closer look tomorrow and will run some tests on other machines. Hope we can reproduce the bug on another local environment to find a fix..

🇩🇪Germany SteffenR Germany

We have a similar problem. But in our case this is only happening on live/ staging system.
Our local ddev environment is handling the consent/ rewriting done via cookies_matomo_page_attachments correctly.

On our stage/ prod the cookies_matomo_page_attachments is not working for no reason.
We also implemented a custom cookies service for matomo_tag_manager, which is working/ rewritten correctly using the same logic as cookies_matomo_page_attachments.

🇩🇪Germany SteffenR Germany

We had the similar problem in on of our projects.

The reason was the missing cookiesjsr-preloader.min.js file in the npm asset, since we are fetching all of our external libraries via composer.

This could be fixed by adding the following entry to the repositories section of the composer.json.

"cookiessjr": {
            "type": "package",
            "package": {
                "name": "npm-asset/cookiesjsr",
                "version": "master",
                "type": "drupal-library",
                "dist": {
                    "url": "https://github.com/jfeltkamp/cookiesjsr/archive/refs/heads/master.zip",
                    "type": "zip"
                }
            }
        },

Afterwards you can require (first remove if already installed) the composer package via:

composer require npm-asset/cookiesjsr

🇩🇪Germany SteffenR Germany

Thanks for your contribution. The error went into code while fixing php code quality issues.

In this case, it's sufficient to just check for !== NULL, like i did previously.

Changes were added to latest DEV and the new release.

🇩🇪Germany SteffenR Germany

@Berdir: DO you plan to create a new release for tmgmt, since Drupal 11 was released these days.
Thanks in advance.

🇩🇪Germany SteffenR Germany

@taraskorpach: thx for your contribution.
The changes are merged into the latest 2.2.x-dev release of the module.

🇩🇪Germany SteffenR Germany

@WalterP: No - not out of the box.

🇩🇪Germany SteffenR Germany

You can use the hook_tmgmt_deepl_query_string_alter to alter the query string.
Other hooks and examples can be found in the file tmgmt_deepl.api.php.

🇩🇪Germany SteffenR Germany

Setting translate="no" while handling HTML or XML is the only way to prevent the translation of the content in a tag.
What is your setting for tag handling? This should be set to HTML or XML.

Have you tried other languages with translate="no".

The problem is not related to the module itself, since we only pass all markup to the DeepL API translate endpoint and use the returning values as the translation.

🇩🇪Germany SteffenR Germany

The issue sounds more like a general tmgmt issue and not directly related to tmgmt_deepl, which only provides the translator plugin.
To confirm this, you can try tmgmt_Google as an alternative translator and create an issue in the tmgmt issue queue. Don‘t forget to link the issue as related issue in here.

If the error cannot be reproduced, leave a comment in here and i‘ll have a closer look.

🇩🇪Germany SteffenR Germany

@jurgenhaas Considering the hook_update_n i was also unsure, but maybe we should remove it and add a note to the release notes.
This would be less intrusive and won't destroys customization.

I've updated the MR accordingly and reverted the commit.

🇩🇪Germany SteffenR Germany

Just a quick note.

Due to dependency on tmgmt, we cannot merge this MR, because tmgmt still has missing dependencies/ is not compatible with Drupal 11.

🇩🇪Germany SteffenR Germany

Right now there is no better way to just abort the "broken" job items and start again.
Feel free to post a MR dealing/ fixing the issue or make suggestions how this issue should be fixed.
I'm not dealing that much with continous jobs in projects we are using tmgmt_deepl.
The issue is kind of mix between DeepL API limits (free version) and the continous job handling of the tmgmt module.

🇩🇪Germany SteffenR Germany
  • hope it's helpfull - the change is available in latest 2.2.2 release
🇩🇪Germany SteffenR Germany

@JurriaanRoelofs
Did you find time testing the Merge Request?
Besides asking for new features, it would be great, if you could help testing issues ;)..

🇩🇪Germany SteffenR Germany

@JurriaanRoelofs I just had a call with deepl on this issue and they don't recommend the chunking of those large text volumes. If we do so, the quality of the translations could get worse, since context is missing.

Therefore i'll set the status to Closed (won't fix), since this limitation is given by the API and will not be changed (for now)...

🇩🇪Germany SteffenR Germany

@JurriaanRoelofs
Some time ago, there was a similar issue concerning the formality level per language. But the suggestion to add the selection right to the checkout process makes more sense.
Please test the MR and give feedback in this issue.

Testing instructions

  • run database udpates to get default values for new config setting override_formality
  • ensure, that new checkbox Allow override of Formality in checkout is available in configuration form of the DeepL translator
  • if Allow override of Formality in checkout is enabled, you'll be able to set the formality level while checkout
  • ensure, that the override has an effect on the translations
🇩🇪Germany SteffenR Germany

SteffenR made their first commit to this issue’s fork.

🇩🇪Germany SteffenR Germany
  • language Arabic is available in latest 2.2.1 release
🇩🇪Germany SteffenR Germany

SteffenR changed the visibility of the branch 3431415-add-arabic-ar to active.

🇩🇪Germany SteffenR Germany

SteffenR changed the visibility of the branch 3431415-add-arabic-ar to hidden.

🇩🇪Germany SteffenR Germany

SteffenR changed the visibility of the branch 3431415-add-arabic-ar to hidden.

🇩🇪Germany SteffenR Germany

Thanks for the issue. The glossary is buildt upon the possibilities of the API of deepL, that's why cannot create glossaries/ list that are independent from any source or target language.
More information can be found on their documentation: https://www.deepl.com/docs-api/translate-text/translate-text / https://www.deepl.com/docs-api/glossaries

We still need to create one glossary for each language pair to use it, while requesting the translation.

Cloning capabilities

For cloning glossary entities, you can use the entity_clone module.
Since glossary entities are normal content entities, those are supported out-of-the-box by the module.
https://www.drupal.org/project/entity_clone

🇩🇪Germany SteffenR Germany

Hi JurriaanRoelofs,

Thanks for the issue and the well defined requirements.
I'll take a look at it after my easter holiday.

Usually we had no need handling such large amounts of data/ text within one single field. The internal batch processing of the module is already chunking the input data, but only to split up requests. It doesn't handle the DOM chunking you are looking for right now.

🇩🇪Germany SteffenR Germany

@miki_mike
Sorry for letting you wait for such a long time.
I just tested a similar setup in a D10.2 installation and can reproduce the behaviour. I'll need to spend some time looking a possible causes.
Usually the process of the translator plugin "ends" before adding the translations - this is handled via tmgmt itself.
In the review of translation you can see, that the translated texts are correct, but sth goes wrong while completing the job/ adding the translations to the new node (independent from choosing auto accept or review).

🇩🇪Germany SteffenR Germany

SteffenR changed the visibility of the branch 3324073-official-php-library to hidden.

🇩🇪Germany SteffenR Germany

SteffenR changed the visibility of the branch 2.2.x to hidden.

🇩🇪Germany SteffenR Germany

SteffenR changed the visibility of the branch 2.1.x to hidden.

🇩🇪Germany SteffenR Germany

@recrit thanks for the finding. While developing/ testing the module i was focussed on the "content side" and forgot about the config side, where we might have placeholders.

Therefore the issue is fixed in the latest 2.2.x-dev release.

🇩🇪Germany SteffenR Germany

Since we plan to use the deepl-php library, we will rework all existing tests and add new ones for the glossary functionality.
Therefore this ticket will be closed and marked as being outdated.

Further information: 📌 Use official PHP client library for the DeepL API Active

🇩🇪Germany SteffenR Germany

Thanks for testing the new functionality.
A new 2.2.0 release was just released.

🇩🇪Germany SteffenR Germany

@mrshowerman
Are you sure, that your permissions are configured correctly?

I just did a test on a blank D10 site with just tmgmt and tmgt_deepl installed and got access to the deepl_glossary overview page without the need of the administer permission.

The following permissions are granted to the role content_editor

  - 'access administration pages'
  - 'access content overview'
  - 'access contextual links'
  - 'access deepl_glossary overview'
  - 'access files overview'
  - 'access toolbar'
  - 'access tour'
  - 'administer url aliases'
  - 'create article content'
  - 'create page content'
  - 'create terms in tags'
  - 'create translation jobs'
  - 'create url aliases'
  - 'delete article revisions'
  - 'delete own article content'
  - 'delete own page content'
  - 'delete page revisions'
  - 'edit deepl_glossary glossary entries'
  - 'edit own article content'
  - 'edit own comments'
  - 'edit own page content'
  - 'edit terms in tags'
  - 'revert all revisions'
  - 'view all revisions'
  - 'view own unpublished content'
  - 'view the administration theme'
🇩🇪Germany SteffenR Germany

I'll have a further look.
I my testing it was sufficient to just set access deepl_glossary overview and edit deepl_glossary glossary entries..

🇩🇪Germany SteffenR Germany

@mrshowerman Thx for the findings. I've changed the code according to your suggestions.
All occurences of deepL where changed to DeepL (like in their API documentation) and the description text was updated.
I also run a phpstan/ phpcs test against the tmgmt_deepl_glossary submodule and added some fixes.

The time was sponsored by my lovely daughter, who is currently at the swimming competition. (Dad taxi 🚕🚕🚕)

Production build 0.71.5 2024