|
8 | 8 | $f_repo_id = gpc_get_int( 'id' );
|
9 | 9 |
|
10 | 10 | $t_repo = SourceRepo::load( $f_repo_id );
|
| 11 | +$t_vcs = SourceVCS::repo( $t_repo ); |
11 | 12 | $t_type = SourceType($t_repo->type);
|
12 | 13 |
|
13 | 14 | $t_mappings = $t_repo->load_mappings();
|
@@ -74,6 +75,22 @@ function convert_to_key_value( $p_array ) {
|
74 | 75 | return $t_result;
|
75 | 76 | }
|
76 | 77 |
|
| 78 | +function plugin_lang_get_defaulted( $p_name, $p_basename, $p_default = null, $p_lang = null ) { |
| 79 | + if( !is_null( $p_basename ) ) { |
| 80 | + plugin_push_current( $p_basename ); |
| 81 | + } |
| 82 | + |
| 83 | + $t_basename = plugin_get_current(); |
| 84 | + $t_name = 'plugin_' . $t_basename . '_' . $p_name; |
| 85 | + $t_string = lang_get_defaulted( $t_name, $p_default, $p_lang ); |
| 86 | + |
| 87 | + if( !is_null( $p_basename ) ) { |
| 88 | + plugin_pop_current(); |
| 89 | + } |
| 90 | + return $t_string; |
| 91 | +} |
| 92 | + |
| 93 | + |
77 | 94 | layout_page_header( plugin_lang_get( 'title' ) );
|
78 | 95 | layout_page_begin();
|
79 | 96 | ?>
|
@@ -119,10 +136,12 @@ function convert_to_key_value( $p_array ) {
|
119 | 136 | <?php
|
120 | 137 | $t_formatted_array = convert_to_key_value( $t_repo->info );
|
121 | 138 | foreach( $t_formatted_array as $t_key => $t_value ) {
|
| 139 | + # Extract the descriptive part of the $t_key lang entry |
| 140 | + list( $t_description ) = explode( "<br", plugin_lang_get_defaulted( $t_key, $t_vcs->basename, $t_key ) ); |
122 | 141 | ?>
|
123 | 142 | <tr>
|
124 |
| - <td class="category"><?php echo $t_key ?></td> |
125 |
| - <td><?php echo $t_value ?></td> |
| 143 | + <td class="category"><?php echo $t_description ?></td> |
| 144 | + <td><?php echo is_bool( $t_value ) ? trans_bool( $t_value ) : $t_value ?></td> |
126 | 145 | </tr>
|
127 | 146 | <?php } ?>
|
128 | 147 | </table>
|
|
0 commit comments