View Issue Details

IDProjectCategoryView StatusLast Update
0008234mantisbtlocalizationpublic2015-11-24 02:46
Reportermkornatzki Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status newResolutionopen 
Product Version1.1.0a4 
Summary0008234: Localized categories
Description

if you want localized categories you have to implement the modifications:

Index: bug_view_advanced_page.php

--- bug_view_advanced_page.php (revision 376)
+++ bug_view_advanced_page.php (working copy)
@@ -156,7 +156,8 @@
<td>
<?php
$t_project_name = string_display( project_get_field( $t_bug->project_id, 'name' ) );

  • echo "[$t_project_name] $t_bug->category";
    +#KOM echo "[$t_project_name] $t_bug->category";
  • echo "[$t_project_name] " . lang_get_defaulted($t_bug->category);
    ?>
    </td>

Index: bug_view_inc.php

--- bug_view_inc.php (revision 376)
+++ bug_view_inc.php (working copy)
@@ -65,7 +65,7 @@

<!-- Category -->
<td>
  • <?php echo $t_bug->category ?>
  • <?php echo lang_get_defaulted($t_bug->category) ?>
    </td>

    <!-- Severity -->
    Index: bug_view_page.php

    --- bug_view_page.php (revision 376)
    +++ bug_view_page.php (working copy)
    @@ -159,7 +159,8 @@
    <td>
    <?php
    $t_project_name = string_display( project_get_field( $t_bug->project_id, 'name' ) );

  • echo "[$t_project_name] $t_bug->category";
    +#KOM echo "[$t_project_name] $t_bug->category";
  • echo "[$t_project_name] " . lang_get_defaulted($t_bug->category);
    ?>
    </td>

Index: core/columns_api.php

--- core/columns_api.php (revision 376)
+++ core/columns_api.php (working copy)
@@ -524,7 +524,8 @@
echo ']</small>
';
}

  • echo string_display( $p_row['category'] );
    +#KOM echo string_display( $p_row['category'] );
  • echo string_display( lang_get_defaulted($p_row['category']) );
    echo '</td>';
    }

Index: core/custom_function_api.php

--- core/custom_function_api.php (revision 376)
+++ core/custom_function_api.php (working copy)
@@ -32,7 +32,7 @@
function custom_function_default_changelog_print_issue( $p_issue_id, $p_issue_level = 0 ) {
$t_bug = bug_get( $p_issue_id );

  • $t_category = is_blank( $t_bug->category ) ? '' : '[' . $t_bug->category . '] ';

  • $t_category = is_blank( $t_bug->category ) ? '' : '[' . lang_get_defaulted($t_bug->category) . '] ';
    echo str_pad( '', $p_issue_level * 6, ' ' ), '- ', string_get_bug_view_link( $p_issue_id ), ': ', $t_category, string_display_line_links( $t_bug->summary );

    if ( $t_bug->handler_id != 0 ) {

    @@ -63,7 +63,7 @@
    $t_strike_start = $t_strike_end = '';
    }

  • $t_category = is_blank( $t_bug->category ) ? '' : '[' . $t_bug->category . '] ';

  • $t_category = is_blank( $t_bug->category ) ? '' : '[' . lang_get_defaulted($t_bug->category) . '] ';
    echo str_pad( '', $p_issue_level * 6, ' ' ), '- ', $t_strike_start, string_get_bug_view_link( $p_issue_id ), ': ', $t_category, string_display_line_links( $t_bug->summary );

    if ( $t_bug->handler_id != 0 ) {

    Index: core/email_api.php

    --- core/email_api.php (revision 376)
    +++ core/email_api.php (working copy)
    @@ -1109,7 +1109,7 @@
    $t_bug_data['email_reporter'] = user_get_name( $row['reporter_id'] );
    $t_bug_data['email_project'] = project_get_field( $row['project_id'], 'name' );

  • $t_bug_data['email_category'] = $row['category'];

  • $t_bug_data['email_category'] = lang_get_defaulted($row['category']);

    $t_bug_data['email_date_submitted'] = $row['date_submitted'];
    $t_bug_data['email_last_modified']   = $row['last_updated'];

    Index: core/my_view_inc.php

    --- core/my_view_inc.php (revision 376)
    +++ core/my_view_inc.php (working copy)
    @@ -268,7 +268,8 @@
    print( $project_name );
    echo '] ';
    }

  • echo string_display( $v_category );
    +#KOM echo string_display( $v_category );

  • echo lang_get_defaulted( $v_category );

        if ( $v_last_updated > strtotime( '-'.$t_filter['highlight_changed'].' hours' ) ) {
            echo ' - <b>' . $t_last_updated . '</b>';

    Index: core/print_api.php

    --- core/print_api.php (revision 376)
    +++ core/print_api.php (working copy)
    @@ -614,7 +614,8 @@
    foreach( $cat_arr as $t_category ) {
    PRINT "<option value=\"$t_category\"";
    check_selected( $t_category, $p_category );

  • PRINT ">$t_category</option>";
    +#KOM PRINT ">$t_category</option>";

  • PRINT ">" . lang_get_defaulted($t_category) . "</option>";
    }
    }

    --------------------

    @@ -664,7 +665,8 @@
    foreach( $cat_arr as $t_category ) {
    PRINT "<option value=\"$t_category\"";
    check_selected( $p_category, $t_category );

  • PRINT ">$t_category</option>";
    +#KOM PRINT ">$t_category</option>";

  • PRINT ">" . lang_get_defaulted($t_category) . "</option>";
    }
    }

Index: custom_strings_inc.php

--- custom_strings_inc.php (revision 379)
+++ custom_strings_inc.php (working copy)
@@ -3,10 +3,27 @@

Enum Strings

 $s_access_levels_enum_string = '10:Betrachter,25:Reporter,35:inconso Betrachter,40:Tester,55:Entwickler,56:Support,70:Manager,90:Administrator';
 $s_status_enum_string = '10:neu,20:Rückmeldung,25:Diskussion,30:anerkannt,40:bestätigt,50:zugewiesen,80:erledigt,82:getestet,85:erledigt Kunde,90:geschlossen,95:gelöscht';
  • category

  • $s_cat_bug = 'Fehler';
  • $s_cat_question = 'Frage';
  • $s_cat_suggestion = 'Vorschlag';
  • $s_cat_todo = 'Ausführen';
  • $s_cat_requirement = "Anforderung";
  • $s_cat_cr = "Change Request";
  • } else {

    Enum Strings

    $s_access_levels_enum_string = '10:viewer,25:reporter,35:inconso viewer,40:tester,55:developer,56:support,70:manager,90:administrator';
    $s_status_enum_string = '10:new,20:feedback,25:discussion,30:acknowledged,40:confirmed,50:assigned,80:resolved,82:tested,85:resolved customer,90:closed,95:deleted';

  • category

  • $s_cat_bug = 'Bug';
  • $s_cat_question = 'Question';
  • $s_cat_suggestion = 'Suggestion';
  • $s_cat_todo = 'ToDo';
  • $s_cat_requirement = "Requirement";
  • $s_cat_cr = "Change Request";
    }

    if ( file_exists( dirname( FILE ) . DIRECTORY_SEPARATOR . 'plugins' . DIRECTORY_SEPARATOR . 'pluginmanager' . DIRECTORY_SEPARATOR . 'lang_inc.php' ) ) {
    Index: issues_rss.php

    --- issues_rss.php (revision 376)
    +++ issues_rss.php (working copy)
    @@ -175,7 +175,7 @@
    $description = string_rss_links( $t_bug->description );

    # subject is category.
  • $subject = string_rss_links( $t_bug->category );
  • $subject = string_rss_links( lang_get_defaulted($t_bug->category) );

    # optional DC value
    $date = date( 'Y-m-d\TH:i:sO', $t_bug->last_updated );

    Index: print_all_bug_page_excel.php

    --- print_all_bug_page_excel.php (revision 376)
    +++ print_all_bug_page_excel.php (working copy)
    @@ -173,7 +173,7 @@

    <?php if ( ( $name_index < $field_name_count ) && ( !isset( $t_prefs[$name_index] ) || ( 1 == $t_prefs[$name_index] ) ) ) { ?>
    <td class=xl2216681 nowrap style='border-top:none;border-left:none'>

  • <?php echo $v_category;
  • <?php echo lang_get_defaulted($v_category);
    echo "</td>";
    }
    $name_index++; ?>
    Index: print_all_bug_page_word.php

    --- print_all_bug_page_word.php (revision 376)
    +++ print_all_bug_page_word.php (working copy)
    @@ -148,7 +148,7 @@
    <?php echo $v_id ?>
    </td>
    <td class="print">

  • <?php echo "[$t_project_name] $v_category" ?>
  • <?php echo "[$t_project_name]" . lang_get_defaulted($v_category) ?>
    </td>
    <td class="print">
    <?php echo get_enum_element( 'severity', $v_severity ) ?>
    Index: print_bug_page.php

    --- print_bug_page.php (revision 376)
    +++ print_bug_page.php (working copy)
    @@ -104,7 +104,7 @@
    <?php echo $v_id ?>
    </td>
    <td class="print">

  • <?php echo $v_category ?>
  • <?php echo lang_get_defaulted($v_category) ?>
    </td>
    <td class="print">
    <?php echo get_enum_element( 'severity', $v_severity ) ?>

you have to add the categories like cat_bug, cat_todo, ...

TagsNo tags attached.

Relationships

related to 0020305 new Create localization framework for user created objects 

Activities

There are no notes attached to this issue.