* Do not truncate non-U.S notes.

* Include en_AU, en_CA, en_GB, and en_ZA
This commit is contained in:
Moon 2021-12-09 10:43:04 -08:00 committed by GitHub
parent 85f7ee83f5
commit 149abf09bc
1 changed files with 13 additions and 1 deletions

View File

@ -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