Before:



After:



However, I have follow-up questions:


A. Why do clients need to care about #withNoLineLongerThan:/word-wrapping stuff? Shouldn't this be a responsibility of UserDialogBoxMorph instead?


B. Should we maybe turn off this warning for commits to the MCRepository inbox? In this particular case, our declared workflow says that you should ignore this message anyway, doesn't it?


Best,

Christoph


Von: Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von commits@source.squeak.org <commits@source.squeak.org>
Gesendet: Donnerstag, 17. September 2020 19:04:57
An: squeak-dev@lists.squeakfoundation.org
Betreff: [squeak-dev] The Inbox: Monticello-ct.729.mcz
 
A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-ct.729.mcz

==================== Summary ====================

Name: Monticello-ct.729
Author: ct
Time: 17 September 2020, 7:04:53.385813 pm
UUID: 5eea47cc-405e-7841-9544-0f57a9b92fa0
Ancestors: Monticello-cmm.726

Proposal: Enhance truncation of "newer versions avaiable" warning (and make it multilingual-ready)

=============== Diff against Monticello-cmm.726 ===============

Item was changed:
  ----- Method: MCWorkingCopyBrowser>>checkForNewerVersions (in category 'actions') -----
  checkForNewerVersions
+        "Answer true if there are no newer versions preventing us from saving a version."
+
         | newer |
         newer := workingCopy possiblyNewerVersionsIn: self repository.
+       
+        newer ifEmpty: [^ true].
+       
+        ^ self confirm: ('CAUTION!! {1}:\{2}\Do you really want to save this version?' withCRs translated format: {
+                newer size = 1
+                        ifTrue: ['This version in the repository may be newer' translated]
+                        ifFalse: ['These {1} versions in the repository may be newer' translated format: {newer size}].
+                (newer size > 3
+                        ifFalse: [newer]
+                        ifTrue: [(newer first: 3) , {'...'} , {newer last}]) asCommaString withNoLineLongerThan: 150
+        })!
-        ^ newer isEmpty or: [
-                self confirm: 'CAUTION!! These versions in the repository may be newer:',
-                        String cr, ((newer asCommaString withNoLineLongerThan:  150) truncateWithElipsisTo: 5 * 149), String cr,
-                        'Do you really want to save this version?'].!