]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #3644 localized profile field names
authorCash Costello <cash.costello@gmail.com>
Fri, 7 Oct 2011 12:05:14 +0000 (08:05 -0400)
committerCash Costello <cash.costello@gmail.com>
Fri, 7 Oct 2011 12:05:14 +0000 (08:05 -0400)
languages/en.php
views/default/admin/appearance/profile_fields/list.php
views/default/forms/profile/fields/add.php

index c739d554ec750af6047b57bf46c93e61e6494d29..da4e6a901266432582e86b00dffb1d57003282eb 100644 (file)
@@ -379,6 +379,14 @@ $english = array(
        'profile:twitter' => "Twitter username",
        'profile:saved' => "Your profile was successfully saved.",
 
+       'profile:field:text' => 'Short text',
+       'profile:field:longtext' => 'Large text area',
+       'profile:field:tags' => 'Tags',
+       'profile:field:url' => 'Web address',
+       'profile:field:email' => 'Email address',
+       'profile:field:location' => 'Location',
+       'profile:field:date' => 'Date',
+
        'admin:appearance:profile_fields' => 'Edit Profile Fields',
        'profile:edit:default' => 'Edit profile fields',
        'profile:label' => "Profile label",
index 542ab1b6f8eb00e8df077d448225348f393824e4..6e79838ea40e85bbc8b6cbc0125bd814e09b0770 100644 (file)
@@ -9,15 +9,18 @@
 $n = 0;
 $loaded_defaults = array();
 $items = array();
-if ($fieldlist = elgg_get_config('profile_custom_fields')) {
+$fieldlist = elgg_get_config('profile_custom_fields');
+if ($fieldlist) {
        $fieldlistarray = explode(',', $fieldlist);
        foreach ($fieldlistarray as $listitem) {
-               if ($translation = elgg_get_config("admin_defined_profile_{$listitem}")) {
+               $translation = elgg_get_config("admin_defined_profile_$listitem");
+               $type = elgg_get_config("admin_defined_profile_type_$listitem");
+               if ($translation && $type) {
                        $item = new stdClass;
                        $item->translation = $translation;
                        $item->shortname = $listitem;
-                       $item->name = "admin_defined_profile_{$listitem}";
-                       $item->type = elgg_get_config("admin_defined_profile_type_{$listitem}");
+                       $item->name = "admin_defined_profile_$listitem";
+                       $item->type = elgg_echo("profile:field:$type");
                        $items[] = $item;
                }
        }
index c1d07d2ce260430e1072f077edffd61b28c3b42c..bd58ae381f1a0ec50c5168bd966309c054fa8401 100644 (file)
@@ -8,11 +8,13 @@ $type_text = elgg_echo('profile:type');
 
 $label_control = elgg_view('input/text', array('name' => 'label'));
 $type_control = elgg_view('input/dropdown', array('name' => 'type', 'options_values' => array(
-       'text' => elgg_echo('text'),
-       'longtext' => elgg_echo('longtext'),
-       'tags' => elgg_echo('tags'),
-       'url' => elgg_echo('url'),
-       'email' => elgg_echo('email')
+       'text' => elgg_echo('profile:field:text'),
+       'longtext' => elgg_echo('profile:field:longtext'),
+       'tags' => elgg_echo('profile:field:tags'),
+       'url' => elgg_echo('profile:field:url'),
+       'email' => elgg_echo('profile:field:email'),
+       'location' => elgg_echo('profile:field:location'),
+       'date' => elgg_echo('profile:field:date'),
 )));
 
 $submit_control = elgg_view('input/submit', array('name' => elgg_echo('add'), 'value' => elgg_echo('add')));