View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012470 | mantisbt | custom fields | public | 2010-10-22 04:53 | 2014-02-07 18:24 |
Reporter | jmonin | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.2.3 | ||||
Target Version | 1.2.16 | Fixed in Version | 1.2.16 | ||
Summary | 0012470: Custom fields names aren't translated in several places | ||||
Description | Custom fields are displayed with their name, disregarding their localization :
| ||||
Tags | No tags attached. | ||||
Attached Files | mantis-1.2.3-patch-custom-translation-history.patch (430 bytes)
--- mantisbt-1.2.3-orig/core/history_api.php 2010-09-14 20:40:10.000000000 +0200 +++ mantisbt-1.2.3/core/history_api.php 2010-10-22 08:37:52.000000000 +0200 @@ -390,6 +390,7 @@ $p_old_value = string_custom_field_value_for_email( $p_old_value, $t_cf_type ); } $p_new_value = string_custom_field_value_for_email( $p_new_value, $t_cf_type ); + $t_field_localized = lang_get_defaulted( $p_field_name); } } mantis-1.2.3-patch-custom-translation-manage-project.patch (874 bytes)
--- mantisbt-1.2.3-orig/manage_proj_edit_page.php 2010-09-14 20:40:10.000000000 +0200 +++ mantisbt-1.2.3/manage_proj_edit_page.php 2010-10-22 08:37:27.000000000 +0200 @@ -565,7 +565,7 @@ ?> <tr <?php echo helper_alternate_class() ?>> <td> - <?php echo string_display( $t_desc['name'] ) ?> + <?php echo string_display( lang_get_defaulted( $t_desc['name'] ) ) ?> </td> <td> <form method="post" action="manage_proj_custom_field_update.php"> @@ -603,7 +603,7 @@ { if( !custom_field_is_linked( $t_field_id, $f_project_id ) ) { $t_desc = custom_field_get_definition( $t_field_id ); - echo "<option value=\"$t_field_id\">" . string_attribute( $t_desc['name'] ) . '</option>' ; + echo "<option value=\"$t_field_id\">" . string_attribute( lang_get_defaulted( $t_desc['name'] ) ) . '</option>' ; } } ?> | ||||
You'll find attached the patches I made on my Mantis 1.2.3 deployment here. |
|
Comment from grangeway: I think this may have been deliberate - it's feasible to add 2 custom fields that localise to 1 string. You now can't identify which custom field is which. |
|
@dregad: I don't believe this is really an issue in the bug history. If multiple custom fields localise to the same string you can't distinguish them in the bug report form or bug detail page either. Therefore we can suppose that custom fields in the same project have different localized names. However, in the custom field management page there should be the original name along with the localized string to help with the identification. |
|
Yep. Exactly what I said: http://article.gmane.org/gmane.comp.bug-tracking.mantis.devel/4525 |
|
MantisBT: master-1.2.x c174d88f 2013-08-28 07:46 Details Diff |
Translate custom field names Custom fields are displayed with their name, disregarding their localization : - in the history log - in the custom fields section, in the project management page Thanks to jmonin for the patch. Fixes 0012470 |
Affected Issues 0012470 |
|
mod - core/history_api.php | Diff File | ||
mod - manage_proj_edit_page.php | Diff File | ||
MantisBT: master 65835d64 2013-08-28 07:46 Details Diff |
Translate custom field names Custom fields are displayed with their name, disregarding their localization : - in the history log - in the custom fields section, in the project management page Thanks to jmonin for the patch. Fixes 0012470 Conflicts: manage_proj_edit_page.php |
Affected Issues 0012470 |
|
mod - core/history_api.php | Diff File | ||
mod - manage_proj_edit_page.php | Diff File | ||
MantisBT: master-1.2.x 9b9c2cc4 2013-08-29 07:06 Details Diff |
Follow-up fix for custom field names translations In the case where we have multiple custom strings localized to the same string, commit c174d88fc4f6a92e5bff0f7660688f1757c4cdaf would make it impossible to distinguish them. While this should not be a major issue in the bug history (as it doesn't make sense to have more than one fields with a given localized name within a given project), it is important that in custom field management as well as project management pages custom fields are uniquely identified with their "system" name to ensure there is no confusion. This commit adds a new API function custom_field_get_display_name() that will append the localized name to the field name, and which is called from the above-mentioned pages. Issue 0012470 |
Affected Issues 0012470 |
|
mod - core/custom_field_api.php | Diff File | ||
mod - manage_custom_field_page.php | Diff File | ||
mod - manage_proj_edit_page.php | Diff File | ||
MantisBT: master d45881d8 2013-08-29 07:06 Details Diff |
Follow-up fix for custom field names translations In the case where we have multiple custom strings localized to the same string, commit c174d88fc4f6a92e5bff0f7660688f1757c4cdaf would make it impossible to distinguish them. While this should not be a major issue in the bug history (as it doesn't make sense to have more than one fields with a given localized name within a given project), it is important that in custom field management as well as project management pages custom fields are uniquely identified with their "system" name to ensure there is no confusion. This commit adds a new API function custom_field_get_display_name() that will append the localized name to the field name, and which is called from the above-mentioned pages. Issue 0012470 Conflicts: manage_proj_edit_page.php |
Affected Issues 0012470 |
|
mod - core/custom_field_api.php | Diff File | ||
mod - manage_custom_field_page.php | Diff File | ||
mod - manage_proj_edit_page.php | Diff File |