Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Translation): Make it possible to translate the plugin's texts #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions admin/_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
<div id="stylepress-header">
<a href="https://stylepress.org" target="_blank" class="stylepress-logo"><img src="<?php echo esc_url( DTBAKER_ELEMENTOR_URI . 'assets/img/logo-stylepress-sml.png' );?>"></a>
<div class="icons">
<a href="https://stylepress.org" target="_blank">StylePress by dtbaker</a>
<a href="https://stylepress.org" target="_blank"><?php _e('StylePress by dtbaker', 'stylepress'); ?></a>
<a href="https://stylepress.org" target="_blank">v<?php echo DTBAKER_ELEMENTOR_VERSION;?></a>
<a href="https://twitter.com/WPStylePress" target="_blank"><i class="fa fa-twitter"></i></a>
<a href="https://github.com/dtbaker/stylepress" target="_blank"><i class="fa fa-github"></i></a>
<br/><br/>
<em>StylePress is BETA - there are bugs!</em><br/>
<em><a href="https://github.com/dtbaker/stylepress/issues" target="_blank">Report issues and feedback on github</a></em>
<em><?php _e('StylePress is BETA - there are bugs!', 'stylepress'); ?></em><br/>
<em><a href="https://github.com/dtbaker/stylepress/issues" target="_blank"><?php _x('Report issues and feedback on github', 'stylepress'); ?></a></em>
</div>
<?php /*switch($_GET['page']) {
case 'dtbaker-stylepress': ?>
<div class="buttons">
<a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=dtbaker_style' ) ); ?>" class="button">Import</a>
<a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=dtbaker_style' ) ); ?>" class="button"><?php _e('Import', 'stylepress'); ?></a>
<a href="<?php echo esc_url( admin_url( 'post-new.php?post_type=dtbaker_style' ) ); ?>"
class="button button-primary">Create New Style</a>
class="button button-primary"><?php _e('Create New Style', 'stylepress'); ?></a>
</div>
<?php
break;
Expand Down
24 changes: 12 additions & 12 deletions admin/_help_text.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

ob_start();
?>
<h3>Getting Started</h3>
<h3><?php _e('Getting Started', 'stylepress'); ?></h3>
<ol>
<li>Create your "Site Style" in Elementor from the <a href="<?php echo esc_url( admin_url('admin.php?page=dtbaker-stylepress'));?>">Styles</a> page.</li>
<li>Choose which Outer Styles to apply to your site using the options below. The Outer Style is the header/sidebar/footer that wraps around your page content.</li>
<li>Choose which Inner Styles to apply to your site components. The Inner Styles are dynamic layouts that replace the default <code>the_content()</code> output.</li>
<li>When editing individual pages you can apply a different style to the default, look in the page metabox area.</li>
<li>Disable Theme CSS if the page layout looks funky (recommended).</li>
<li>View more help and videos at <a href="https://stylepress.org/help/" target="_blank">https://stylepress.org/help/</a> </li>
<li><?php _e('Create your "Site Style" in Elementor from the ', 'stylepress'); ?><a href="<?php echo esc_url( admin_url('admin.php?page=dtbaker-stylepress'));?>"><?php _e('Styles', 'stylepress'); ?></a> <?php _e('page.', 'stylepress'); ?></li>
<li><?php _e('Choose which Outer Styles to apply to your site using the options below. The Outer Style is the header/sidebar/footer that wraps around your page content.', 'sylepress'); ?></li>
<li><?php _e('Choose which Inner Styles to apply to your site components. The Inner Styles are dynamic layouts that replace the default <code>the_content()</code> output.', 'stylepress'); ?></li>
<li><?php _e('When editing individual pages you can apply a different style to the default, look in the page metabox area.', 'stylepress'); ?></li>
<li><?php _e('Disable Theme CSS if the page layout looks funky (recommended).', 'stylepress'); ?></li>
<li><?php _e('View more help and videos at', 'stylepress'); ?> <a href="https://stylepress.org/help/" target="_blank">https://stylepress.org/help/</a> </li>
</ol>
<?php

Expand All @@ -33,12 +33,12 @@

ob_start();
?>
<h3>Recommended Plugins:</h3>
<p>It is recommended to install these plugins to get best results:</p>
<h3><?php _e('Recommended Plugins:', 'stylepress'); ?></h3>
<p><?php _e('It is recommended to install these plugins to get best results:', 'stylepress'); ?></p>
<ol>
<li><a href="https://elementor.com/pro/?ref=1164&campaign=pluginget" target="_blank">Elementor Pro</a></li>
<li><a href="https://wordpress.org/plugins/megamenu/" target="_blank">Max Mega Menu</a></li>
<li><a href="https://wordpress.org/plugins/easy-google-fonts/" target="_blank">Easy Google Fonts</a></li>
<li><a href="https://elementor.com/pro/?ref=1164&campaign=pluginget" target="_blank"><?php _e('Elementor Pro', 'stylepress'); ?></a></li>
<li><a href="https://wordpress.org/plugins/megamenu/" target="_blank"><?php _e('Max Mega Menu', 'stylepress'); ?></a></li>
<li><a href="https://wordpress.org/plugins/easy-google-fonts/" target="_blank"><?php _e('Easy Google Fonts', 'stylepress'); ?></a></li>
</ol>
<?php

Expand Down
40 changes: 20 additions & 20 deletions admin/addons-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,33 @@
<?php require_once DTBAKER_ELEMENTOR_PATH . 'admin/_header.php'; ?>

<?php if(isset($_GET['saved'])){ ?>
<div id="message" class="updated notice notice-success is-dismissible"><p>Settings updated.</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>
<div id="message" class="updated notice notice-success is-dismissible"><p><?php _e('Settings updated.', 'stylepress'); ?></p><button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'stylepress'); ?></span></button></div>
<?php } ?>

<div class="notice notice-error"><p>TODO: Create a toggle button to enable/disable these. </p></div>
<div class="notice notice-error"><p>TODO: Include the rest of these missing plugins into this package. </p></div>
<div class="notice notice-error"><p><?php _e('TODO: Create a toggle button to enable/disable these.', 'stylepress'); ?> </p></div>
<div class="notice notice-error"><p><?php _e('TODO: Include the rest of these missing plugins into this package.', 'stylepress'); ?> </p></div>

<h3>Current add-ons:</h3>
<h3><?php _e('Current add-ons:', 'stylepress'); ?></h3>
<ul>
<li>Dynamic Field: enable dynamic fields on text boxes, headings, buttons, images etc..</li>
<li>Modal Popup/Slide In: turn any link into a modal popup</li>
<li>Menu / Navbar: insert a fixed navbar, create a megamenu layout</li>
<li>Page Slider: design each slide in its own Elementor page</li>
<li>Styled Google Maps: change the colors of embedded Google Maps</li>
<li>Mailchimp Email Subscribe Box</li>
<li>Form Fields: Text Description, Date Picker, Toggle Block</li>
<li>StylePress Loop: Design your grid layout (currently Elementor Pro only)</li>
<li>Tooltip: add a hover tooltip to buttons and links</li>
<li><?php _e('Dynamic Field: enable dynamic fields on text boxes, headings, buttons, images etc..', 'stylepress'); ?></li>
<li><?php _e('Modal Popup/Slide In: turn any link into a modal popup', 'stylepress'); ?></li>
<li><?php _e('Menu / Navbar: insert a fixed navbar, create a megamenu layout', 'stylepress'); ?></li>
<li><?php _e('Page Slider: design each slide in its own Elementor page', 'stylepress'); ?></li>
<li><?php _e('Styled Google Maps: change the colors of embedded Google Maps', 'stylepress'); ?></li>
<li><?php _e('Mailchimp Email Subscribe Box', 'stylepress'); ?></li>
<li><?php _e('Form Fields: Text Description, Date Picker, Toggle Block', 'stylepress'); ?></li>
<li><?php _e('StylePress Loop: Design your grid layout (currently Elementor Pro only)', 'stylepress'); ?></li>
<li><?php _e('Tooltip: add a hover tooltip to buttons and links', 'stylepress'); ?></li>
</ul>

<h3>Pending add-ons:</h3>
<h3><?php _e('Pending add-ons:', 'stylepress'); ?></h3>
<ul>
<li>Insert Page</li>
<li>Post Slider</li>
<li>WooCommerce Product Slider</li>
<li>Blog Post Output</li>
<li>Single Image Lightbox</li>
<li>Individual Links for Slider Images</li>
<li><?php _e('Insert Page', 'stylepress'); ?></li>
<li><?php _e('Post Slider', 'stylepress'); ?></li>
<li><?php _e('WooCommerce Product Slider', 'stylepress'); ?></li>
<li><?php _e('Blog Post Output', 'stylepress'); ?></li>
<li><?php _e('Single Image Lightbox', 'stylepress'); ?></li>
<li><?php _e('Individual Links for Slider Images', 'stylepress'); ?></li>
</ul>


Expand Down
14 changes: 7 additions & 7 deletions admin/payment-modal.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,34 @@
<div class="loadingbar"></div>
<div class="form-row">
<label for="card-name">
Your Name
<?php _e('Your Name', 'stylepress'); ?>
</label>
<input type="text" size="50" class="name text-field" name="name" placeholder="Your Name" value="<?php echo esc_attr($name);?>">
<input type="text" size="50" class="name text-field" name="name" placeholder="<?php _e('Your Name', 'stylepress'); ?>" value="<?php echo esc_attr($name);?>">
</div>
<div class="form-row">
<label for="card-email">
Your Email
<?php _e('Your Email', 'stylepress'); ?>
</label>
<input type="email" size="50" class="email text-field" name="email" placeholder="Your Email" value="<?php echo esc_attr($current_user->user_email);?>">
<input type="email" size="50" class="email text-field" name="email" placeholder="<?php _e('Your Email', 'stylepress'); ?>" value="<?php echo esc_attr($current_user->user_email);?>">
</div>
<div class="form-row">
<label for="stylepress-card-amount">
Payment Amount = <span id="stylepress-amount-update"></span> USD
<?php _e('Payment Amount', 'stylepress'); ?> = <span id="stylepress-amount-update"></span> USD
</label>
<div id="stylepress-card-amount" class="wrap"></div>
<input type="hidden" name="amount" class="stylepress-card-amount-value" value="1">
</div>
<div class="form-row">
<label for="card-element">
Credit or Debit Card
<?php _e('Credit or Debit Card', 'stylepress'); ?>
</label>
<div class="stripe-card-element">
</div>
<!-- Used to display form errors -->
<div id="card-errors"></div>
</div>

<button class="button button-primary stylepress-final-purchase-button">Purchase Style</button>
<button class="button button-primary stylepress-final-purchase-button"><?php _e('Purchase Style', 'stylepress'); ?></button>
</div>
</div>

Expand Down
26 changes: 13 additions & 13 deletions admin/settings-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@


<?php if(isset($_GET['saved'])){ ?>
<div id="message" class="updated notice notice-success is-dismissible"><p>Settings updated.</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>
<div id="message" class="updated notice notice-success is-dismissible"><p><?php _e('Settings updated.', 'stylepress'); ?></p><button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'stylepress'); ?></span></button></div>
<?php } ?>

<?php if(isset($_GET['imported'])){ ?>
<div id="message" class="updated notice notice-success is-dismissible"><p><strong>Style Imported!</strong> Your new style has been imported. Please assign it to your site below (hint: Start with "Global" and test from there).</p><button type="button" class="notice-dismiss"><span class="screen-reader-text">Dismiss this notice.</span></button></div>
<div id="message" class="updated notice notice-success is-dismissible"><p><?php _e('<strong>Style Imported!</strong> Your new style has been imported. Please assign it to your site below (hint: Start with "Global" and test from there).', 'stylepress'); ?></p><button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.', 'stylepress'); ?>.</span></button></div>
<?php } ?>

<form method="POST" action="<?php echo admin_url( 'admin.php' ); ?>">
Expand All @@ -42,8 +42,8 @@


<h3 class="stylepress-header">
<span>Configure Website Styles</span>
<small>Choose which styles to apply on various parts of your website. See the help menu above for more details.</small>
<span><?php _e('Configure Website Styles', 'stylepress'); ?></span>
<small><?php _e('Choose which styles to apply on various parts of your website. See the help menu above for more details.', 'stylepress'); ?></small>
</h3>


Expand All @@ -55,10 +55,10 @@
<table class="widefat striped">
<thead>
<tr>
<th>Page Type</th>
<th>Outer Style <small>(Header/Footer)</small></th>
<th>Inner Style <small>(Page + CPT Layouts)</small></th>
<th>Remove Theme CSS?</th>
<th><?php _e('Page Type', 'stylepress'); ?></th>
<th><?php _e('Outer Style <small>(Header/Footer)</small>', 'stylepress'); ?></th>
<th><?php _e('Inner Style <small>(Page + CPT Layouts)</small>', 'stylepress'); ?></th>
<th><?php _e('Remove Theme CSS?', 'stylepress'); ?></th>
</tr>
</thead>
<tbody>
Expand Down Expand Up @@ -118,13 +118,13 @@

<div>
<div style="text-align: center">
<p><strong>Need help?</strong>
<p><strong><?php _e('Need help?', 'stylepress'); ?></strong>
<small>
<br/>
The "Outer" style is generally the same on every page of the site. <br/>
It contains your logo, header, footer and sidebars. <br/>
The "Inner" style is can be different for posts, pages and CPT's. <br/>
It contains a page title area and other dynamic fields.
<?php _e('The "Outer" style is generally the same on every page of the site. ', 'stylepress'); ?><br/>
<?php _e('It contains your logo, header, footer and sidebars.', 'stylepress'); ?> <br/>
<?php _e('The "Inner" style is can be different for posts, pages and CPT\'s.', 'stylepress'); ?> <br/>
<?php _e('It contains a page title area and other dynamic fields.', 'stylepress'); ?>
</small>
</p>
<p>&nbsp;</p>
Expand Down
Loading