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',
|
'image',
|
||||||
'is_deleted',
|
'is_deleted',
|
||||||
'is_read',
|
'is_read',
|
||||||
|
'locale',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -186,6 +187,14 @@ const InboxPanel = ( { showHeader = true } ) => {
|
||||||
'YYYY-MM-DD'
|
'YYYY-MM-DD'
|
||||||
).valueOf();
|
).valueOf();
|
||||||
|
|
||||||
|
const supportedLocales = [
|
||||||
|
'en_US',
|
||||||
|
'en_AU',
|
||||||
|
'en_CA',
|
||||||
|
'en_GB',
|
||||||
|
'en_ZA',
|
||||||
|
];
|
||||||
|
|
||||||
return {
|
return {
|
||||||
notes: getNotes( INBOX_QUERY ).map( ( note ) => {
|
notes: getNotes( INBOX_QUERY ).map( ( note ) => {
|
||||||
const noteDate = moment(
|
const noteDate = moment(
|
||||||
|
@ -193,7 +202,10 @@ const InboxPanel = ( { showHeader = true } ) => {
|
||||||
'YYYY-MM-DD'
|
'YYYY-MM-DD'
|
||||||
).valueOf();
|
).valueOf();
|
||||||
|
|
||||||
if ( noteDate >= WC_VERSION_61_RELEASE_DATE ) {
|
if (
|
||||||
|
supportedLocales.includes( note.locale ) &&
|
||||||
|
noteDate >= WC_VERSION_61_RELEASE_DATE
|
||||||
|
) {
|
||||||
note.content = truncateRenderableHTML(
|
note.content = truncateRenderableHTML(
|
||||||
note.content,
|
note.content,
|
||||||
320
|
320
|
||||||
|
|
Loading…
Reference in New Issue