1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Attempt to make sync status message less confusing

This commit is contained in:
Henry Heino 2024-12-10 21:00:09 -08:00
parent e0ad9eae5a
commit 2a38994554

View File

@ -32,6 +32,7 @@ import syncDeleteStep from './services/synchronizer/utils/syncDeleteStep';
import { ErrorCode } from './errors';
import { SyncAction, SyncReport, SyncReportItemCounts } from './services/synchronizer/utils/types';
import checkDisabledSyncItemsNotification from './services/synchronizer/utils/checkDisabledSyncItemsNotification';
import { substrWithEllipsis } from './string-utils';
const { sprintf } = require('sprintf-js');
const { Dirnames } = require('./services/synchronizer/utils/types');
@ -204,7 +205,7 @@ export default class Synchronizer {
sum += value;
if (key === 'Revision') {
includedKeyNames.push(_('revisions'));
includedKeyNames.push(_('old note versions'));
} else if (key === 'Note') {
includedKeyNames.push(_('notes'));
} else if (key === 'Resource') {
@ -224,7 +225,8 @@ export default class Synchronizer {
}
if (includedKeyNames.length > 0) {
return _('%d (%s)', sum, includedKeyNames.join(', '));
const shortenedDescription = substrWithEllipsis(includedKeyNames.join(', '), 0, 24);
return _('%d (%s)', sum, shortenedDescription);
} else {
return _('%d', sum);
}