Problem/Motivation

The new D10 localize.drupal.org wont have xmlrpc endpoints so we have to update this module.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Harlor created an issue. See original summary.

harlor’s picture

harlor’s picture

The Draft MR currently contains changes that allow to push translations to the new REST endpoints of l10n_server (https://www.drupal.org/project/l10n_server/issues/3395508).

The new concept for the authentication as described in https://www.drupal.org/project/l10n_client/issues/3395488 still needs to be implemented.

azhardotcoder changed the visibility of the branch 3395327-replace-xmlrpc-for to hidden.

azhardotcoder changed the visibility of the branch 3395327-replace-xmlrpc-for to active.

azhardotcoder’s picture

Status: Needs work » Needs review

Integrated server-side submission logic

L10nClientContributorHelper.php:

  • Integrated additional handling to better manage translation submissions, including improved error management using \Exception.

l10n_client_contributor.module:

  • Removed redundant lines to streamline the l10n_client_contributor_save_translation function and enhance code clarity.
  • TranslationForm.php:
  • Added logic to send translations to the server with a response validation. This includes error handling that displays a message if the contribution fails, or a success message if it succeeds.
  • Implemented a hidden button to trigger form rebuilding when a render cache is active, ensuring all strings are collected from the page.
  • Improved comments and documentation for better code readability and maintenance.
fmb’s picture

Assigned: harlor » Unassigned

  • fmb committed ff75bc81 on 3.x
    Issue #3395327 by Harlor, azhardotcoder: Replace xmlrpc for new localize...

  • Harlor committed 13f8aa72 on 3.x
    Issue #3395327: Remove obsolete xmlrpc related stuff form translation...

  • Harlor committed 5a1032a1 on 3.x
    Issue #3395327: Cleanup post request handling
    

  • Harlor committed d941cd35 on 3.x
    Issue #3395327: Init auth and transmission for new localize.drupal.org
    
fmb’s picture

Status: Needs review » Needs work

We still need to:

donquixote’s picture

The commits from this MR made it into the 3.x branch in a bad way, bypassing the pipeline tests.
It seems the following happened:
- The 3.x branch was merged into the issue MR branch.
- The 3.x branch was rebased or reset to the tip of the issue MR branch.
- More minor changes were pushed to the MR branch.
- The minor changes were then squash-merged into the 3.x branch, resulting in https://git.drupalcode.org/project/l10n_client/-/commit/ff75bc814e058add...

Since this we have failing tests.

I think the correct way is to hard-reset the 3.x branch to before this issue, which is 3.0.0-alpha3.
I don't remember if drupalcode.org allows us to hard reset a branch (that is, force push).

donquixote’s picture

It seems the following happened:
- The 3.x branch was merged into the issue MR branch.
- The 3.x branch was rebased or reset to the tip of the issue MR branch.

Actually more likely it was just merged with fast-forward.

  • fmb committed 217838a1 on 3.x
    Issue #3395327 by harlor, azhardotcoder, fmb, donquixote: Replace xmlrpc...
fmb’s picture

Even as a maintainer, I cannot use "git push --force" on a branch which is used for a dev release.

Mainly, the culprit is this commit which caused a conflict in l10n_contributor.module which was not correctly dealt with, introducing again the l10n_client_contributor_send_translation() function which had been previously removed in a previous commit (for good reason, as it is now implemented in a service, plus it used xmlrpc). Some things need to be removed (like old xmlrpc-based tests) but this commit cannot be held as responsible.