Problem/Motivation

The BabelService currently uses a MySQL-specific SQL command

$this->db->query("SET SESSION group_concat_max_len = 1000000;");

It violates Drupal's database abstraction principles.

Apart from that using very long IDs in UI and exported files, composed by concatenating the plugin ID and the translation ID looks bad.

Proposed resolution

  • TranslationTypePluginInterface::getStrings() to return array to be keyed by hash instead of long concatenated list of plugin:id.
  • Use the hash as row ID (data-babel-row) in form and
  • Use the hash as translation ID in spreadsheet.
  • On retrieving and saving get the plugins and their translation IDs from the tables.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

TranslationTypePluginInterface::getStrings() to return array to be keyed by hash instead of long concatenated list of plugin:id

Issue fork babel-3535175

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

alorenc created an issue. See original summary.

claudiu.cristea’s picture

Issue summary: View changes
claudiu.cristea’s picture

Issue summary: View changes
claudiu.cristea’s picture

Assigned: Unassigned » claudiu.cristea

I'm gonna work on this

claudiu.cristea’s picture

Title: Replace MySQL-specific GROUP_CONCAT configuration » [PP-1] Replace MySQL-specific GROUP_CONCAT configuration
Related issues: +#3539336: Allow different default status per-plugin

The work is done but this was built on top of #3539336: Allow different default status per-plugin. Postponing until #3539336: Allow different default status per-plugin is in. Still keeping in my name.

claudiu.cristea’s picture

Status: Active » Postponed
claudiu.cristea’s picture

Title: [PP-1] Replace MySQL-specific GROUP_CONCAT configuration » Replace MySQL-specific GROUP_CONCAT configuration
Assigned: claudiu.cristea » Unassigned
Status: Postponed » Needs review

The blocker has been merged, this is ready for review.

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

dimilias’s picture

dimilias’s picture

Status: Needs review » Fixed

Merged into 1.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.