Skip to content

Commit

Permalink
Searching terms in English only for now
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed May 31, 2021
1 parent f385e70 commit 9c09bb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* Author: @ramonopoly
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: definition
* Text Domain: a8c-definition-block
*
* @package create-block
* @package definition-block
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export default function DefinitionEdit( {

// Reset term data if term is deleted.
useEffect( () => {
console.log( 'term', term );
if ( ! term ) {
setAttributes( { partOfSpeech: '', definition: '', isAbbreviation: false, phoneticTranscription: '' } );
}
Expand Down
5 changes: 3 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getLocaleData } from '@wordpress/i18n';
* @return {string} The locale slug.
*/
export function getLocaleFromLocaleData() {
const localeData = getLocaleData();
return localeData['']?.lang || 'en';
return 'en';
/* const localeData = getLocaleData();
return localeData && localeData['']?.lang || 'en';*/
}

0 comments on commit 9c09bb6

Please sign in to comment.