Do not truncate non-U.S notes. (https://github.com/woocommerce/woocommerce-admin/pull/8022)
* Do not truncate non-U.S notes. * Include en_AU, en_CA, en_GB, and en_ZA
This commit is contained in:
parent
85f7ee83f5
commit
149abf09bc
|
@ -164,6 +164,7 @@ const INBOX_QUERY = {
|
|||
'image',
|
||||
'is_deleted',
|
||||
'is_read',
|
||||
'locale',
|
||||
],
|
||||
};
|
||||
|
||||
|
@ -186,6 +187,14 @@ const InboxPanel = ( { showHeader = true } ) => {
|
|||
'YYYY-MM-DD'
|
||||
).valueOf();
|
||||
|
||||
const supportedLocales = [
|
||||
'en_US',
|
||||
'en_AU',
|
||||
'en_CA',
|
||||
'en_GB',
|
||||
'en_ZA',
|
||||
];
|
||||
|
||||
return {
|
||||
notes: getNotes( INBOX_QUERY ).map( ( note ) => {
|
||||
const noteDate = moment(
|
||||
|
@ -193,7 +202,10 @@ const InboxPanel = ( { showHeader = true } ) => {
|
|||
'YYYY-MM-DD'
|
||||
).valueOf();
|
||||
|
||||
if ( noteDate >= WC_VERSION_61_RELEASE_DATE ) {
|
||||
if (
|
||||
supportedLocales.includes( note.locale ) &&
|
||||
noteDate >= WC_VERSION_61_RELEASE_DATE
|
||||
) {
|
||||
note.content = truncateRenderableHTML(
|
||||
note.content,
|
||||
320
|
||||
|
|
Loading…
Reference in New Issue