Skip to content
Snippets Groups Projects
Commit b0075eec authored by dyszczo's avatar dyszczo
Browse files

translation

parent 7ca50698
No related branches found
No related tags found
2 merge requests!3Merge of devel to master,!2translation
......@@ -17,7 +17,7 @@ class InfoBuilder extends AbstractBuilder {
*
* @return AbstractPlugin
*/
public function build_from_info( \WPDesk_Plugin_Info $info ) {
public function build_from_info( \WPDesk_Buildable $info ) {
$class_name = apply_filters( self::FILTER_PLUGIN_CLASS, $info->get_class_name() );
/** @var AbstractPlugin $plugin */
......
......@@ -8,7 +8,7 @@ namespace WPDesk\PluginBuilder\Plugin;
* @author Grzegorz
*
*/
abstract class AbstractPlugin {
abstract class AbstractPlugin implements \WPDesk_Translable {
/** @var \WPDesk_Plugin_Info */
protected $plugin_info;
......@@ -52,7 +52,7 @@ abstract class AbstractPlugin {
* @return string
*/
public function get_text_domain() {
return $this->get_namespace();
return $this->plugin_info->get_text_domain();
}
/**
......@@ -127,20 +127,20 @@ abstract class AbstractPlugin {
$support_link = get_locale() === 'pl_PL' ? 'https://www.wpdesk.pl/support/' : 'https://www.wpdesk.net/support';
$plugin_links = array(
'<a href="' . $support_link . '">' . __( 'Support', 'wpdesk-plugin' ) . '</a>',
'<a href="' . $support_link . '">' . __( 'Support', $this->get_text_domain() ) . '</a>',
);
$links = array_merge( $plugin_links, $links );
if ( $this->docs_url ) {
$plugin_links = array(
'<a href="' . $this->docs_url . '">' . __( 'Docs', 'wpdesk-plugin' ) . '</a>',
'<a href="' . $this->docs_url . '">' . __( 'Docs', $this->get_text_domain() ) . '</a>',
);
$links = array_merge( $plugin_links, $links );
}
if ( $this->settings_url ) {
$plugin_links = array(
'<a href="' . $this->settings_url . '">' . __( 'Settings', 'wpdesk-plugin' ) . '</a>',
'<a href="' . $this->settings_url . '">' . __( 'Settings', $this->get_text_domain() ) . '</a>',
);
$links = array_merge( $plugin_links, $links );
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment