File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change 10
10
* @author John Reese
11
11
*/
12
12
13
+ if (!function_exists ('plugin_lang_get_defaulted ' )) {
14
+ /**
15
+ * Get a language string for the plugin.
16
+ * - If found, return the appropriate string.
17
+ * - If not found, no default supplied, return the supplied string as is.
18
+ * - If not found, default supplied, return default.
19
+ * Automatically prepends plugin_<basename> to the string requested.
20
+ * @param string $p_name Language string name.
21
+ * @param string $p_default The default value to return.
22
+ * @param string $p_basename Plugin basename.
23
+ * @return string Language string
24
+ */
25
+ function plugin_lang_get_defaulted ( $ p_name , $ p_default = null , $ p_basename = null ) {
26
+ if ( !is_null ( $ p_basename ) ) {
27
+ plugin_push_current ( $ p_basename );
28
+ }
29
+ $ t_basename = plugin_get_current ();
30
+ $ t_name = 'plugin_ ' . $ t_basename . '_ ' . $ p_name ;
31
+ $ t_string = lang_get_defaulted ( $ t_name , $ p_default );
32
+
33
+ if ( !is_null ( $ p_basename ) ) {
34
+ plugin_pop_current ();
35
+ }
36
+ return $ t_string ;
37
+ }
38
+ }
39
+
13
40
# branch mapping strategies
14
41
define ( 'SOURCE_EXPLICIT ' , 1 );
15
42
define ( 'SOURCE_NEAR ' , 2 );
Original file line number Diff line number Diff line change 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,7 @@ function convert_to_key_value( $p_array ) {
74
75
return $ t_result ;
75
76
}
76
77
78
+
77
79
layout_page_header ( plugin_lang_get ( 'title ' ) );
78
80
layout_page_begin ();
79
81
?>
@@ -121,8 +123,8 @@ function convert_to_key_value( $p_array ) {
121
123
foreach ( $ t_formatted_array as $ t_key => $ t_value ) {
122
124
?>
123
125
<tr>
124
- <td class="category"><?php echo $ t_key ?> </td>
125
- <td><?php echo $ t_value ?> </td>
126
+ <td class="category"><?php echo plugin_lang_get_defaulted ( $ t_key, $ t_key , $ t_vcs -> basename ) ?> </td>
127
+ <td><?php echo is_bool ( $ t_value ) ? trans_bool ( $ t_value ) : $ t_value ?> </td>
126
128
</tr>
127
129
<?php } ?>
128
130
</table>
You can’t perform that action at this time.
0 commit comments