Skip to content

Commit

Permalink
lint & build
Browse files Browse the repository at this point in the history
  • Loading branch information
selul committed Jun 11, 2021
1 parent c14b4a2 commit 9cdcbe1
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 53 deletions.
2 changes: 1 addition & 1 deletion build/build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
"build:makepot": "docker run --user root --rm --volume \"$(pwd):/var/www/html/otter-blocks\" wordpress:cli bash -c 'php -d memory_limit=1024M \"$(which wp)\" i18n make-pot ./otter-blocks/ ./otter-blocks/languages/otter-blocks.pot --merge=./otter-blocks/vendor/codeinwp/gutenberg-blocks/languages/otter-blocks.pot --allow-root --exclude=dist,build,bundle --include=vendor '",
"lint": "eslint src/**.js",
"lint": "eslint src/*/**.js",
"release": "semantic-release",
"dist": "bash bin/dist.sh",
"dev": "cross-env BABEL_ENV=default NODE_ENV=development webpack --watch"
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Footer = () => {
return (
<footer className="otter-footer">
<div className="otter-container">
{ __( 'No otters were harmed during the making of this plugin.','otter-blocks' ) }
{ __( 'No otters were harmed during the making of this plugin.', 'otter-blocks' ) }
</div>
</footer>
);
Expand Down
2 changes: 1 addition & 1 deletion src/Components/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const Headers = () => {
<div className="otter-logo">
<img
src={ otterObj.assetsPath + 'images/logo.png' }
title={ __( 'Gutenberg Blocks and Template Library by Otter','otter-blocks' ) }
title={ __( 'Gutenberg Blocks and Template Library by Otter', 'otter-blocks' ) }
/>

<abbr
Expand Down
62 changes: 31 additions & 31 deletions src/Components/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const Main = () => {
const changeOptions = ( option, state, value ) => {
setAPISaving( true );

addNotification( __( 'Updating settings…','otter-blocks' ), 'info' );
addNotification( __( 'Updating settings…', 'otter-blocks' ), 'info' );

const model = new wp.api.models.Settings({
// eslint-disable-next-line camelcase
Expand All @@ -95,14 +95,14 @@ const Main = () => {
setOptions( state, response[option]);

setTimeout( () => {
addNotification( __( 'Settings saved.','otter-blocks' ), 'success' );
addNotification( __( 'Settings saved.', 'otter-blocks' ), 'success' );
setAPISaving( false );
}, 800 );
}

if ( 'error' === status ) {
setTimeout( () => {
addNotification( __( 'An unknown error occurred.','otter-blocks' ), 'danger' );
addNotification( __( 'An unknown error occurred.', 'otter-blocks' ), 'danger' );
setAPISaving( false );
}, 800 );
}
Expand All @@ -114,7 +114,7 @@ const Main = () => {
store.removeNotification( notification );

setTimeout( () => {
addNotification( response.responseJSON.message ? response.responseJSON.message : __( 'An unknown error occurred.','otter-blocks' ), 'danger' );
addNotification( response.responseJSON.message ? response.responseJSON.message : __( 'An unknown error occurred.', 'otter-blocks' ), 'danger' );
setAPISaving( false );
}, 800 );
});
Expand Down Expand Up @@ -188,11 +188,11 @@ const Main = () => {
<div className="otter-main">
<div className="otter-step-two">
<PanelBody
title={ __( 'Modules','otter-blocks' ) }
title={ __( 'Modules', 'otter-blocks' ) }
>
<PanelRow>
<ToggleControl
label={ __( 'Enable Custom CSS Module','otter-blocks' ) }
label={ __( 'Enable Custom CSS Module', 'otter-blocks' ) }
help={ 'Custom CSS module allows to add custom CSS to each block in Block Editor.' }
checked={ cssModule }
onChange={ () => changeOptions( 'themeisle_blocks_settings_css_module', 'cssModule', ! cssModule ) }
Expand All @@ -201,7 +201,7 @@ const Main = () => {

<PanelRow>
<ToggleControl
label={ __( 'Enable Blocks Animation Module','otter-blocks' ) }
label={ __( 'Enable Blocks Animation Module', 'otter-blocks' ) }
help={ 'Blocks Animation module allows to add CSS animations to each block in Block Editor.' }
checked={ blocksAnimation }
onChange={ () => changeOptions( 'themeisle_blocks_settings_blocks_animation', 'blocksAnimation', ! blocksAnimation ) }
Expand All @@ -211,7 +211,7 @@ const Main = () => {
{ Boolean( otterObj.navExists ) && (
<PanelRow>
<ToggleControl
label={ __( 'Enable Menu Icons Module','otter-blocks' ) }
label={ __( 'Enable Menu Icons Module', 'otter-blocks' ) }
help={ 'Menu Icons module allows to add icons to navigation menu items in Block Editor.' }
checked={ menuIcons }
onChange={ () => changeOptions( 'themeisle_blocks_settings_menu_icons', 'menuIcons', ! menuIcons ) }
Expand All @@ -223,11 +223,11 @@ const Main = () => {

<div className="otter-step-three">
<PanelBody
title={ __( 'Section','otter-blocks' ) }
title={ __( 'Section', 'otter-blocks' ) }
>
<PanelRow>
<ToggleControl
label={ __( 'Make Section your default block for Pages','otter-blocks' ) }
label={ __( 'Make Section your default block for Pages', 'otter-blocks' ) }
help={ 'Everytime you create a new page, Section block will be appended there by default.' }
checked={ isDefaultSection }
onChange={ () => changeOptions( 'themeisle_blocks_settings_default_block', 'isDefaultSection', ! isDefaultSection ) }
Expand All @@ -238,11 +238,11 @@ const Main = () => {

<div className="otter-step-four">
<PanelBody
title={ __( 'Maps','otter-blocks' ) }
title={ __( 'Maps', 'otter-blocks' ) }
>
<PanelRow>
<BaseControl
label={ __( 'Google Maps API','otter-blocks' ) }
label={ __( 'Google Maps API', 'otter-blocks' ) }
help={ 'In order to use Google Maps block, you need to use Google Maps and Places API.' }
id="otter-options-google-map-api"
className="otter-button-field"
Expand All @@ -251,7 +251,7 @@ const Main = () => {
type="text"
id="otter-options-google-map-api"
value={ googleMapsAPI }
placeholder={ __( 'Google Maps API Key','otter-blocks' ) }
placeholder={ __( 'Google Maps API Key', 'otter-blocks' ) }
disabled={ isAPISaving }
onChange={ e => setGoogleMapsAPI( e.target.value ) }
/>
Expand All @@ -263,14 +263,14 @@ const Main = () => {
disabled={ isAPISaving }
onClick={ () => changeOptions( 'themeisle_google_map_block_api_key', 'googleMapsAPI', googleMapsAPI ) }
>
{ __( 'Save','otter-blocks' ) }
{ __( 'Save', 'otter-blocks' ) }
</Button>

<ExternalLink
href="https://developers.google.com/maps/documentation/javascript/get-api-key"
className="otter-step-five"
>
{ __( 'Get API Key','otter-blocks' ) }
{ __( 'Get API Key', 'otter-blocks' ) }
</ExternalLink>
</div>
</BaseControl>
Expand All @@ -280,11 +280,11 @@ const Main = () => {

<div className="otter-step-six">
<PanelBody
title={ __( 'Other','otter-blocks' ) }
title={ __( 'Other', 'otter-blocks' ) }
>
<PanelRow>
<ToggleControl
label={ __( 'Anonymous Data Tracking.','otter-blocks' ) }
label={ __( 'Anonymous Data Tracking.', 'otter-blocks' ) }
help={ 'Become a contributor by opting in to our anonymous data tracking. We guarantee no sensitive data is collected.' }
checked={ 'yes' === isLoggingData ? true : false }
onChange={ () => changeOptions( 'otter_blocks_logger_flag', 'isLoggingData', ( 'yes' === isLoggingData ? 'no' : 'yes' ) ) }
Expand All @@ -293,7 +293,7 @@ const Main = () => {

<PanelRow>
<ToggleControl
label={ __( 'Allow JSON Uploads.','otter-blocks' ) }
label={ __( 'Allow JSON Uploads.', 'otter-blocks' ) }
help={ 'This option allows JSON files to be uploaded to the media library to use in Lottie Block. Only enable this option if you want to use custom JSON uploads in Lottie Block.' }
checked={ allowJSONUploads }
onChange={ () => changeOptions( 'themeisle_allow_json_upload', 'allowJSONUploads', ! allowJSONUploads ) }
Expand All @@ -302,9 +302,9 @@ const Main = () => {

<PanelRow>
<ButtonControl
label={ __( 'Regenerate Styles','otter-blocks' ) }
label={ __( 'Regenerate Styles', 'otter-blocks' ) }
help={ 'Clicking on this will delete all the Otter generated CSS files.' }
buttonLabel={ __( 'Regenerate','otter-blocks' ) }
buttonLabel={ __( 'Regenerate', 'otter-blocks' ) }
disabled={ isRegeneratedDisabled }
action={ () => setOpen( true ) }
/>
Expand All @@ -313,9 +313,9 @@ const Main = () => {
<PanelRow>
<div>
{ [
__( 'Let us know how we can improve. Vote on existing ideas or suggest new ones.','otter-blocks' ),
__( 'Let us know how we can improve. Vote on existing ideas or suggest new ones.', 'otter-blocks' ),
' ',
<ExternalLink href="https://otter.nolt.io/">{ __( 'Give feedback!','otter-blocks' ) }</ExternalLink>
<ExternalLink href="https://otter.nolt.io/">{ __( 'Give feedback!', 'otter-blocks' ) }</ExternalLink>
] }
</div>
</PanelRow>
Expand All @@ -324,9 +324,9 @@ const Main = () => {

<PanelBody>
<div className="otter-info">
<h2>{ __( 'Got a question for us?','otter-blocks' ) }</h2>
<h2>{ __( 'Got a question for us?', 'otter-blocks' ) }</h2>

<p>{ __( 'We would love to help you out if you need any help with Otter.','otter-blocks' ) }</p>
<p>{ __( 'We would love to help you out if you need any help with Otter.', 'otter-blocks' ) }</p>

<div className="otter-info-button-group">
<Button
Expand All @@ -336,7 +336,7 @@ const Main = () => {
href="https://wordpress.org/support/plugin/otter-blocks"
className="otter-step-seven"
>
{ __( 'Ask a question','otter-blocks' ) }
{ __( 'Ask a question', 'otter-blocks' ) }
</Button>

<Button
Expand All @@ -346,7 +346,7 @@ const Main = () => {
href="https://wordpress.org/support/plugin/otter-blocks/reviews/#new-post"
className="otter-step-eight"
>
{ __( 'Leave a review','otter-blocks' ) }
{ __( 'Leave a review', 'otter-blocks' ) }
</Button>
</div>
</div>
Expand All @@ -355,19 +355,19 @@ const Main = () => {

{ isOpen && (
<Modal
title={ __( 'Are you sure?','otter-blocks' ) }
title={ __( 'Are you sure?', 'otter-blocks' ) }
onRequestClose={ () => setOpen( false ) }
>
<p>{ __( 'Are you sure you want to delete all Otter generated CSS files?','otter-blocks' ) }</p>
<p>{ __( 'Note: Styles will be regenerated as users start visiting your pages.','otter-blocks' ) }</p>
<p>{ __( 'Are you sure you want to delete all Otter generated CSS files?', 'otter-blocks' ) }</p>
<p>{ __( 'Note: Styles will be regenerated as users start visiting your pages.', 'otter-blocks' ) }</p>

<div className="otter-modal-actions">
<Button
isSecondary
isLarge
onClick={ () => setOpen( false ) }
>
{ __( 'Cancel','otter-blocks' ) }
{ __( 'Cancel', 'otter-blocks' ) }
</Button>

<Button
Expand All @@ -377,7 +377,7 @@ const Main = () => {
isBusy={ isAPISaving }
onClick={ regenerateStyles }
>
{ __( 'Confirm','otter-blocks' ) }
{ __( 'Confirm', 'otter-blocks' ) }
</Button>
</div>
</Modal>
Expand Down
36 changes: 18 additions & 18 deletions src/Components/Onboarding.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,40 +37,40 @@ const Onboarding = () => {
const steps = [
{
target: '.otter-step-one',
content: __( 'Howdy, I\','otter-blocks'm Ollie The Otter! I will help you configure your Otter experience. So let\'s start the magic!' ),
content: __( 'Howdy, I\'m Ollie The Otter! I will help you configure your Otter experience. So let\'s start the magic!', 'otter-blocks' ),
disableBeacon: true
},
{
target: '.otter-step-two',
content: __( 'Jazz up your blocks with some sparkly custom CSS or Blocks Animation right inside the block. Here you can enable modules to enhance your experience with Block Editor.','otter-blocks' )
content: __( 'Jazz up your blocks with some sparkly custom CSS or Blocks Animation right inside the block. Here you can enable modules to enhance your experience with Block Editor.', 'otter-blocks' )
},
{
target: '.otter-step-three',
content: __( 'Section Block is the signature feature of Otter. It allows you to build beautiful layouts right inside the Block Editor. You can set Section Block as the default block for your new Pages.','otter-blocks' )
content: __( 'Section Block is the signature feature of Otter. It allows you to build beautiful layouts right inside the Block Editor. You can set Section Block as the default block for your new Pages.', 'otter-blocks' )
},
{
target: '.otter-step-four',
content: __( 'We love maps! Here you can set your Google Maps API key for Otter\','otter-blocks's Map Block.' )
content: __( 'We love maps! Here you can set your Google Maps API key for Otter\'s Map Block.', 'otter-blocks' )
},
{
target: '.otter-step-five',
content: __( 'If you don\','otter-blocks't have an API key, you can register one by clicking here.' )
content: __( 'If you don\'t have an API key, you can register one by clicking here.', 'otter-blocks' )
},
{
target: '.otter-step-six',
content: __( 'Help us in making our plugin better with anonymous data tracking.','otter-blocks' )
content: __( 'Help us in making our plugin better with anonymous data tracking.', 'otter-blocks' )
},
{
target: '.otter-step-seven',
content: __( 'If you ever need any help, we are a team of real Otter-lovers who would love to help you out.','otter-blocks' )
content: __( 'If you ever need any help, we are a team of real Otter-lovers who would love to help you out.', 'otter-blocks' )
},
{
target: '.otter-step-eight',
content: __( 'And if you love what we do, please leave us a review at WordPress.org. Your review keeps us motivated to make awesome things.','otter-blocks' )
content: __( 'And if you love what we do, please leave us a review at WordPress.org. Your review keeps us motivated to make awesome things.', 'otter-blocks' )
},
{
target: '.otter-step-one',
content: __( 'That\','otter-blocks's it for now! Hope you enjoy Otter and love it as much as we do.' )
content: __( 'That\'s it for now! Hope you enjoy Otter and love it as much as we do.', 'otter-blocks' )
}
];

Expand Down Expand Up @@ -103,12 +103,12 @@ const Onboarding = () => {
<Fragment>
{ isOpen && (
<Modal
title={ __( 'Welcome to Otter!','otter-blocks' ) }
title={ __( 'Welcome to Otter!', 'otter-blocks' ) }
isDismissible={ false }
className="otter-onboarding-modal"
>
<div className="otter-onboarding-modal-content">
{ __( 'Would you like to start the onboarding wizard which will help you personalize the plugin for yourself?','otter-blocks' ) }
{ __( 'Would you like to start the onboarding wizard which will help you personalize the plugin for yourself?', 'otter-blocks' ) }
</div>

<div className="otter-onboarding-modal-action">
Expand All @@ -120,15 +120,15 @@ const Onboarding = () => {
setRunTour( true );
} }
>
{ __( 'Start','otter-blocks' ) }
{ __( 'Start', 'otter-blocks' ) }
</Button>

<Button
isSecondary
isLarge
onClick={ () => skipTour( 'skipped' ) }
>
{ __( 'Skip','otter-blocks' ) }
{ __( 'Skip', 'otter-blocks' ) }
</Button>
</div>
</Modal>
Expand All @@ -141,11 +141,11 @@ const Onboarding = () => {
scrollToFirstStep
showSkipButton
locale={ {
back: __( 'Back','otter-blocks' ),
close: __( 'Close','otter-blocks' ),
last: __( 'Finish','otter-blocks' ),
next: __( 'Next','otter-blocks' ),
skip: __( 'Skip','otter-blocks' )
back: __( 'Back', 'otter-blocks' ),
close: __( 'Close', 'otter-blocks' ),
last: __( 'Finish', 'otter-blocks' ),
next: __( 'Next', 'otter-blocks' ),
skip: __( 'Skip', 'otter-blocks' )
} }
callback={ data => skipTour( data.status )}
/>
Expand Down

0 comments on commit 9cdcbe1

Please sign in to comment.