First of all thank you very much for this great module! It works like a charm and is really helpful!

We have a little problem with the "More choices" button. The problem is, that you are using a core translation string, which is very useful for other normal multiple fields, but in this case it's a lot of trouble for us. We're running a German Drupal Project and the translation "Weitere Auswahlmöglichkeiten" is
1. much too long for the UI
2. does not make much sense in this case, because it is hard to understand that it means, another date to choose from is added.

The key problem is, that "More suggestions" and "More choices" are very close in current German translation.

What we really need is just a little modification: Give the t() function a context so that we can differentiate between the core text and the different text in this module.

The context attribute is described here:
https://www.drupal.org/node/1323152
https://localize.drupal.org/node/2109
https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/t/7

With this little modification it would not be required to hack / patch the module anymore.

Code before (makemeeting.module, line 359):

'#value' => t('More choices'),

after:

'#value' => t('More choices', array(), array('context' => 'makemeeting:choices_wrapper:makemeeting_more_choices')),

Furthermore the code has to be changed in the processing function (makemeeting.module, line 449):

// Handle other operations
  if (!empty($form_state['values']['op'])) {
    switch ($form_state['values']['op']) {
      // Add 1 more choice to the form.
      case t('More choices', array(), array('context' => 'makemeeting:choices_wrapper:makemeeting_more_choices')):
        // Increment choice count
        $form_state['choice_count'] = count($element['choices']) + 1;
        break;

      // Add 1 more suggestion to the form.
      case t('More suggestions', array(), array('context' => 'makemeeting:choices_wrapper:makemeeting_more_suggestions')):
        $form_state['suggestion_count']++;
        break;

And maybe you could do the same with "More suggestions"?

Thanks a lot, that is really a big problem for multilang sites.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anybody’s picture

A little further usability improvement would be to swap the two "more"-Buttons so that they match the fields above. The Screenshot attached shows that.

What do you think?

Anybody’s picture

Issue summary: View changes
Anybody’s picture

Is there any more activity in this module? Otherwise would you like to grant me access as maintainer of this project?

SebCorbin’s picture

Yes there is, but if you could provide a patch so that it could be test by the testbot, it would save me a lot of time.

Also, the context must be a readable phrase so that translator can understand why this string must not be considered like the others, just put in english the difference that it makes in your language.

Anybody’s picture

Thank you for your fast reply, that's really cool :)

The patch is attached and I hope the format fits because I had to create it with netbeans in my current environment. Otherwise I will have to do it with GIT in the next days.

SebCorbin’s picture

Status: Active » Needs review

Now go on testbot!

Status: Needs review » Needs work

The last submitted patch, 5: makemeeting-translation_contexts-.2293593-5-7.x-2.x-dev.patch, failed testing.

SebCorbin’s picture

So yeah, a patch made with git diff would be nice.

Again, if you could define a readable context for translators so that translators can know why it differs from the original meaning.