diff --git a/Source/Source.API.php b/Source/Source.API.php index a98fd8b50..4e4a79307 100644 --- a/Source/Source.API.php +++ b/Source/Source.API.php @@ -10,6 +10,33 @@ * @author John Reese */ +if (!function_exists('plugin_lang_get_defaulted')) { + /** + * Get a language string for the plugin. + * - If found, return the appropriate string. + * - If not found, no default supplied, return the supplied string as is. + * - If not found, default supplied, return default. + * Automatically prepends plugin_ to the string requested. + * @param string $p_name Language string name. + * @param string $p_default The default value to return. + * @param string $p_basename Plugin basename. + * @return string Language string + */ + function plugin_lang_get_defaulted( $p_name, $p_default = null, $p_basename = null ) { + if( !is_null( $p_basename ) ) { + plugin_push_current( $p_basename ); + } + $t_basename = plugin_get_current(); + $t_name = 'plugin_' . $t_basename . '_' . $p_name; + $t_string = lang_get_defaulted( $t_name, $p_default ); + + if( !is_null( $p_basename ) ) { + plugin_pop_current(); + } + return $t_string; + } +} + # branch mapping strategies define( 'SOURCE_EXPLICIT', 1 ); define( 'SOURCE_NEAR', 2 ); diff --git a/Source/pages/repo_manage_page.php b/Source/pages/repo_manage_page.php index 6900f1def..2d7784b9e 100644 --- a/Source/pages/repo_manage_page.php +++ b/Source/pages/repo_manage_page.php @@ -8,6 +8,7 @@ $f_repo_id = gpc_get_int( 'id' ); $t_repo = SourceRepo::load( $f_repo_id ); +$t_vcs = SourceVCS::repo( $t_repo ); $t_type = SourceType($t_repo->type); $t_mappings = $t_repo->load_mappings(); @@ -74,6 +75,7 @@ function convert_to_key_value( $p_array ) { return $t_result; } + layout_page_header( plugin_lang_get( 'title' ) ); layout_page_begin(); ?> @@ -121,8 +123,8 @@ function convert_to_key_value( $p_array ) { foreach( $t_formatted_array as $t_key => $t_value ) { ?> - - + basename ) ?> +