Translate field labels
authorColeman Watts <coleman@civicrm.org>
Tue, 15 May 2018 14:20:31 +0000 (10:20 -0400)
committerColeman Watts <coleman@civicrm.org>
Tue, 15 May 2018 14:20:31 +0000 (10:20 -0400)
CRM/Member/DAO/MembershipType.php
xml/templates/dao.tpl

index f47bc47760b2d60d677ae78de81e794d305d9a27..a5469039bf7129187dd7da5da6c7dac4b4fa8e75 100644 (file)
@@ -248,7 +248,7 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
           'localizable' => 1,
           'html' => [
             'type' => 'Text',
-            'label' => 'Name',
+            'label' => ts("Name"),
           ],
         ],
         'description' => [
@@ -264,7 +264,7 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
           'localizable' => 1,
           'html' => [
             'type' => 'TextArea',
-            'label' => 'Description',
+            'label' => ts("Description"),
           ],
         ],
         'member_of_contact_id' => [
@@ -311,7 +311,7 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
           'localizable' => 0,
           'html' => [
             'type' => 'Text',
-            'label' => 'Minimum Fee',
+            'label' => ts("Minimum Fee"),
           ],
         ],
         'duration_unit' => [
@@ -417,7 +417,7 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
           'localizable' => 0,
           'html' => [
             'type' => 'Text',
-            'label' => 'Max Related',
+            'label' => ts("Max Related"),
           ],
         ],
         'visibility' => [
@@ -504,7 +504,7 @@ class CRM_Member_DAO_MembershipType extends CRM_Core_DAO {
           'localizable' => 0,
           'html' => [
             'type' => 'CheckBox',
-            'label' => 'Enabled?',
+            'label' => ts("Enabled?"),
           ],
         ],
       ];
index 222ffbb30928f9bc2f9d2e44398349db0003f6c8..9d579be6239c08758929d21beecd2f74a763601e 100644 (file)
@@ -146,8 +146,12 @@ class {$table.className} extends CRM_Core_DAO {ldelim}
   'serialize' => self::SERIALIZE_{$field.serialize|strtoupper},
 {/if}
 {if $field.html}
-  'html' => {$field.html|@print_array},
-{/if} {* field.html *}
+  'html' => array(
+  {foreach from=$field.html item=val key=key}
+    '{$key}' => {if $key eq 'label'}ts("{$val}"){else}'{$val}'{/if},
+  {/foreach}
+  ),
+{/if}
 {if $field.pseudoconstant}
   'pseudoconstant' => {$field.pseudoconstant|@print_array}
 {/if} {* field.pseudoconstant *}                                                                    ),