CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Re: Multiple Choice Options
Pages: [1]

Author Topic: Re: Multiple Choice Options  (Read 4137 times)

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
May 17, 2010, 01:02:15 pm
I am having the same problem as in a previous post.  I cannot translate the multiple choice options for custom data.  I am using civicrm 3.0.1.  I looked at the patch info in the previous post.  Could I be provided with detail info on where to apply the path if this is still the way to fix the problem.  I am not a programmer but I can modify the code in a file.
Thanks

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
May 24, 2010, 06:56:24 am
Can you please specify (link) which ‘previous post’ you mean?

(Also: If you update your forum profile you won’t have to provide the CiviCRM version in the posts.) :)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
May 25, 2010, 07:04:55 am
Topic title is 'Multiple Choice Options' started March 6, 2010. Last post March 19, 2010

Quote from post.
'I think there is a bug with the user interface, similar to what I reported before with the help text being mult lang.

When you go into a option value to edit its description, you dont get the ability to add mult lang values in the "option label" field. I've checked on the table behind the scenes, civicrm_option_value, and the table does hold the relevant columns so it should be possible.

Would it be possible to get a patch for this like the last time?'

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
May 25, 2010, 12:45:17 pm
Here is the link http://forum.civicrm.org/index.php/topic,12613.0.html

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
May 26, 2010, 02:37:49 am
Thanks for the link (and the profile info).

The patch looks like this:

Code: [Select]
diff --git a/templates/CRM/Admin/Form/OptionValue.tpl b/templates/CRM/Admin/Form/OptionValue.tpl
index 442885d..d1cb663 100644
--- a/templates/CRM/Admin/Form/OptionValue.tpl
+++ b/templates/CRM/Admin/Form/OptionValue.tpl
@@ -45,7 +45,7 @@
         {/if}
         <dt>{$form.name.label}</dt><dd>{$form.name.html}</dd>
         <dt>{$form.grouping.label}</dt><dd>{$form.grouping.html}</dd>
-    <dt>{$form.description.label}</dt><dd>{$form.description.html}</dd>
+        <dt>{$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_option_value' field='description' id=$id}{/if}</dt><dd>{$form.description.html}</dd>
         <dt>{$form.weight.label}</dt><dd>{$form.weight.html}</dd>
        {if $form.is_default}
         <dt>{$form.is_default.label}</dt><dd>{$form.is_default.html}</dd>
diff --git a/templates/CRM/Admin/Form/Options.tpl b/templates/CRM/Admin/Form/Options.tpl
index 3789a91..b2a50c3 100644
--- a/templates/CRM/Admin/Form/Options.tpl
+++ b/templates/CRM/Admin/Form/Options.tpl
@@ -63,7 +63,7 @@
             {if $form.filter.html} {* Filter property is only exposed for some option groups. *}
                 <dt>{$form.filter.label}</dt><dd>{$form.filter.html}</dd>
             {/if}
-            <dt>{$form.description.label}</dt><dd>{$form.description.html}</dd>
+            <dt>{$form.description.label} {if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_option_value' field='description' id=$id}{/if}</dt><dd>{$form.description.html}</dd>
             {if $gName eq 'activity_type'}
                 <dt>&nbsp;</dt><dd class="description">{ts}Description is included at the top of the activity edit and view pages for this type of activity.{/ts}</dd>
             {/if}

– i.e., you need to find the relevant lines in templates/CRM/Admin/Form/OptionValue.tpl and templates/CRM/Admin/Form/Options.tpl files (they might be a bit different in 3.0 than 3.1) and add the {if $action == 2}…{/if} blocks (these add the flag symbol and popup).

If these fixes don’t work, try changing $id to $fid above.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
May 27, 2010, 08:23:42 am
Thanks for providing the patch.

I made the changes specified but it does not seem to resolve my problem. (I changed the one line specified in each of the 2 files). I tried it with $id and with $fid.

I took a look at the civicrm tables and I would like to know (as a temporary fix) if it is safe to alter the table directly with phpmyadmin.  I would enter the second language label in the 'label_xx_XX' field (xx_XX being the second language) in the 'civicrm_option_value' table.  I noticed the same field get changed automatically in the 'civicrm_option_value_xx_XX' table.

I did a quick simple test on a test site with one label and it seems to work.

Thanks

PS: BTW is this problem resolved in civicrm 3.1.5 ?

Bob


Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
May 31, 2010, 09:56:49 am
Quote from: bobd on May 27, 2010, 08:23:42 am
I made the changes specified but it does not seem to resolve my problem. (I changed the one line specified in each of the 2 files). I tried it with $id and with $fid.

Hm, I did the exact patch attached (line numbers fixed for 3.0 reality) and it does show for me the flag icons near labels and descriptions in things like Administer → Option Lists → Email Greetings (and they seem to work, except for rich text textareas, where the visible RTF form does not get updated from the popup).

Please let me know which exact screen needs to be fixed and I’ll do that.

Quote
I would like to know (as a temporary fix) if it is safe to alter the table directly with phpmyadmin.

Yeah, you can do that as described.

Quote
PS: BTW is this problem resolved in civicrm 3.1.5 ?

I’m reluctant to add textarea multi-lang popups, as they don’t update the underlying rich text editor, and so end up being confusingly for the user. I’m perfectly ok for labels; please let me know which screen is missing the flag popup and I’ll add it (ideally, point me to the right demo page).
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
June 06, 2010, 05:45:47 am
I am only having the problem with the option list of custom data.  The label for the custom field brings up the popup for translation ok.  It is the selectable options that I cannot translate(except by going directly into the database).  I tested this out on the civicrm 3.1 demo site.  There is a custom data group 'Constituent Information' that has a multiple choice selection for 'Marital Status'.  The label for 'Marital Status' has a popup but not the marital status choices that you select from.

Thanks

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
June 07, 2010, 06:11:30 am
Hi,

Is there anyone out there that has a multilingual site with custom data that has a multiple choice selection.   Is it working for you? (or not)  Did the patch provided in earlier post work for you?

Thanks

Bob

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Multiple Choice Options
June 07, 2010, 10:52:39 am
Quote from: bobd on June 06, 2010, 05:45:47 am
I tested this out on the civicrm 3.1 demo site.  There is a custom data group 'Constituent Information' that has a multiple choice selection for 'Marital Status'.  The label for 'Marital Status' has a popup but not the marital status choices that you select from.

Ah, sorry, I misunderstood you previously. Can you try the attached patch (I added versions for both 3.0 and 3.1)?
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

bobd

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
    • Adaptive Sports Foundation
Re: Multiple Choice Options
June 09, 2010, 05:15:16 pm
This latest patch seems to resolve the issue.  Your time on this is much appreciated.  Thank you Piotr.

Bob

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Re: Multiple Choice Options

This forum was archived on 2017-11-26.