View Issue Details

IDProjectCategoryView StatusLast Update
0012470mantisbtcustom fieldspublic2014-02-07 18:24
Reporterjmonin 
Assigned Todregad 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.3 
Target Version1.2.16Fixed in Version1.2.16 
Summary0012470: Custom fields names aren't translated in several places
Description

Custom fields are displayed with their name, disregarding their localization :

  • in the history log
  • in the custom fields section, in the project management page
TagsNo tags attached.

Relationships

has duplicate 0016335 closedatrol Localized custom field names in bug history 

Activities

jmonin

jmonin

2010-10-22 04:53

reporter  

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);
 			}
 		}
 
jmonin

jmonin

2010-10-22 04:53

reporter  

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>' ;
 						}
 					}
 				?>
jmonin

jmonin

2010-10-22 04:54

reporter   ~0027118

You'll find attached the patches I made on my Mantis 1.2.3 deployment here.

dregad

dregad

2013-08-28 19:39

developer   ~0037945

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.

zrybola

zrybola

2013-08-29 02:23

reporter   ~0037946

@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.

dregad

dregad

2013-08-29 05:35

developer   ~0037948

Yep. Exactly what I said: http://article.gmane.org/gmane.comp.bug-tracking.mantis.devel/4525

Related Changesets

MantisBT: master-1.2.x c174d88f

2013-08-28 11:46:40

dregad

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
mod - core/history_api.php Diff File
mod - manage_proj_edit_page.php Diff File

MantisBT: master 65835d64

2013-08-28 11:46:40

dregad

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
mod - core/history_api.php Diff File
mod - manage_proj_edit_page.php Diff File

MantisBT: master-1.2.x 9b9c2cc4

2013-08-29 11:06:25

dregad

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
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 11:06:25

dregad

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
mod - core/custom_field_api.php Diff File
mod - manage_custom_field_page.php Diff File
mod - manage_proj_edit_page.php Diff File

Issue History

Date Modified Username Field Change
2010-10-22 04:53 jmonin New Issue
2010-10-22 04:53 jmonin File Added: mantis-1.2.3-patch-custom-translation-history.patch
2010-10-22 04:53 jmonin File Added: mantis-1.2.3-patch-custom-translation-manage-project.patch
2010-10-22 04:54 jmonin Note Added: 0027118
2013-08-28 05:44 atrol Relationship added has duplicate 0016335
2013-08-28 11:48 dregad Changeset attached => MantisBT master-1.2.x c174d88f
2013-08-28 11:48 dregad Assigned To => dregad
2013-08-28 11:48 dregad Status new => resolved
2013-08-28 11:48 dregad Resolution open => fixed
2013-08-28 11:48 dregad Fixed in Version => 1.2.16
2013-08-28 11:50 dregad Changeset attached => MantisBT master 65835d64
2013-08-28 11:50 dregad Target Version => 1.2.16
2013-08-28 19:39 dregad Note Added: 0037945
2013-08-29 02:23 zrybola Note Added: 0037946
2013-08-29 05:35 dregad Note Added: 0037948
2013-08-30 12:35 dregad Changeset attached => MantisBT master-1.2.x 9b9c2cc4
2013-08-30 12:35 dregad Changeset attached => MantisBT master d45881d8
2014-02-07 18:24 dregad Status resolved => closed