Currently we save errors into the watchdog when the remote submission did not work, but do not inform the user. It can still happen that someone generally has the permission on the server to use remote submission, but is not a member of the groups it is being submitted to, which overrides the general permissions for good reasons. So we should inform users when a remote submission error happens. There is also that case of course that the server is not up, etc. Basically, the l10n_client_submit_translation() code should somehow communicate errors back to the JS UI.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

j0nathan’s picture

Hi,
Would it be a good idea to inform the users also when the submission worked correctly so they know the translation got shared with the community?

Gábor Hojtsy’s picture

Yes, it would be good to find a good place in the UI to provide this feedback on success/error.

Jose Reyero’s picture

I think this should be part of a more general issue about keeping track of translations, who submitted them and whether remote submission was ok, on some local table.

It would be nice too having the option to re-submit translations, and maybe being able to run batched submissions.

Also I don't think we are even informing users whether submissions have been successfully saved locally, so this calls for a whole submission status / error handling ui.

A good starting point IMHO would be:

- Add some last submission status indicator on the js UI, so it informs but it doesn't interrupt normial workflow (a pop up would be too intrusive as it may interrupt you every time submission had some trouble, which may be because the server is down for some period of time, which would render the UI unusable)

- Keeping records on a separate table of who submitted what when, which will allow us to check the status of the whole thing and also to resubmit when there was a temporary submission problem.

smoothify’s picture

+1 for Jose's suggestions

I've just been trying out l10n_client for the first time in local mode and I did feel very much in the dark about what happens after saving.

I'm thinking about providing the tool to a translator, but i'd like to keep an eye on what they have translated and make sure they don't break any of the tokens when editing the text around the site.

andypost’s picture

subscribe

podarok’s picture

subscribe

possibly better way is to make job_queue for submitting strings via cron

Gábor Hojtsy’s picture

Title: Inform user on submission if string was not saved remotely » Inform user about submission status
Status: Active » Fixed
FileSize
7.83 KB
24.59 KB
32.36 KB
30.93 KB

Ok, here is a fairly complete solution for the problem. I decided to reuse the "source" display field. This is overwritten once you select your next string to translate, but otherwise displays the message permanently, so you can act on it, if it is a warning or error.

There are basically two messages: one for local operation the other for remote operation. The remote message is only ever displayed if the site is configured for remote submission, otherwise the user is not bugged. But if the site is configured and the user is not, the message tells the user he misses out on an easy way to contribute:

Remote errors are displayed similarly, such as if you did not set your API key properly:

Finally, if all goes well both locally and remotely, it is all green and nice and it tells you you put in your bit to the community.

Local error messages are similar but obviously affect the first item.

I imagine we will keep iterating on the display, colors and text of these messages, but I think this is a huuuuge step forward, so committing this ASAP (and will work on backport as well).

Gábor Hojtsy’s picture

FileSize
7.89 KB

Added the word "locally" to the local feedback when the remote submission is not aborted due to local error, so it is cleaner that local and remote status can be different (was not clear from the screenshot above). Also, only send 'default' textgroup strings to the remote server to avoid extra communication that is guaranteed to be fruitless.

Gábor Hojtsy’s picture

Version: 7.x-1.x-dev » 6.x-2.x-dev
FileSize
7.95 KB

Backported to Drupal 6. Here it is, available on 6.x-2.x now.

Status: Fixed » Closed (fixed)

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

podarok’s picture

Status: Closed (fixed) » Needs review
Gábor Hojtsy’s picture

What needs review here?

Gábor Hojtsy’s picture

Status: Needs review » Postponed (maintainer needs more info)
podarok’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

sorry
looked at #9, already commited...