The client only allows to add translations that are present on the server. I want to add the source string, project, translation suggestion and release in one time.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ruudvanoijen created an issue. See original summary.

Gábor Hojtsy’s picture

Why add a source string that Drupal does not otherwise know about?

ruudvanoijen’s picture

The issue is when having a module that already has been created. Sometimes there will be 1 source string added or an old source string changed. Currently you have to generate a potx. Then import the potx. Then translate it and then you can package it. With this you can add that one string. Then add the new source string and translation en repackage it. It a little bit faster, Also this will be combined with this patch (https://www.drupal.org/node/2823986) sow that you can insert source strings externally.

ruudvanoijen’s picture

Combined .. (does not mean one patch.) but functionality wise.

TVoesenek’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
24.5 KB

Here the patch made by @ruudvanoijen. As described by ruudvanoijen, this patch depends on #2823986: Option to add a source string to a package and #2838052: Option to add a source string remotely with l10n_client for the Localization server.

Status: Needs review » Needs work

The last submitted patch, 5: l10n_client-add_source_string-2823988-5.patch, failed testing.

ruudvanoijen’s picture

As a reaction to Gabor: Why add a source string that Drupal does not otherwise know about?

When you're developing a module or creating a patch with a new translation. You have to export the potx. To get the new translation on the translation server. I'd rather see the generating a potx automatically with cron and translate the translation / source string on the client or on the server. Then I don't have to deal with potx files.

Current Problems:
- Added source strings are not being added to the potx.
- When a potx file is being imported it will through away source strings that are not avaliable. Rather have option to remove a source string with the next clean up.
- Add source string to multiple projects/ releases.