(I wish everybody spoke English, then developing for Drupal would be so much easier.
But hey, life's a bitch, a multi-lingual bitch.)

I couldn't get the module to generate previews or save the modified schemes on a non-English installation but other actions such as 'Make Default' or 'Create scheme' was working fine.

Turns out color_edit_scheme_form_submit() is checking against the value field of the clicked_button. Problem is, the value of a button is subject to translation. In my case, the submit buttons that were untouched by translation were working whilst the translated strings caused the form state router not to take proper action.

Maybe you should use the following logic instead (seems to work for me):

if ($form_state['clicked_button']['#id'] == "edit-options-save-button") {
}
elseif ($form_state['clicked_button']['#id'] == "edit-options-preview-button") {
}
elseif ($form_state['clicked_button']['#id'] == "edit-options-cancel-button") {
}

or wild-card the first part and only check against "save-button", etc.

Also seems as if there's an arbitrary mash-up between references. In the previous case the 'value' attribute was referenced thru 'clicked_button' in $form_sate. In the following snippet, taken from color.module, the same value re-appears in a different shape:

if ($form['#post']['op'] == "Modify") {
}

Here the 'op' is the name attribute of the submit button and 'Modify' in this case comes from it's value attribute (which is subject to translation).

Keep up the good work!

(For Google-bot and his colleagues: color module next generation doesn't save scheme or preview scheme or make default scheme.)

Comments

tonyn’s picture

Assigned: Unassigned » tonyn
Priority: Normal » Critical

Multi-lingual support. I'll put this issue in to do.

I will work on these areas. If you come up with anything I miss please report it.

Tony

tonyn’s picture

Status: Needs review » Fixed

To my knowledge this has been fixed!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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