[squeak-dev] The Trunk: System-mt.1325.mcz

christoph.thiede at student.hpi.uni-potsdam.de christoph.thiede at student.hpi.uni-potsdam.de
Mon Mar 28 11:47:04 UTC 2022


Hi Marcel,

just to be clear: Do you think someone (maybe me) bother to replace all senders systematically or isn't this worth the effort? :-)

Best,
Christoph

> (Btw: I think that "Debug invocation" needs another tweak. It filters out too much quite frequently...)

Yes, if you can record any concrete situations where it behaves unexpectedly, please report them. :-)

---
Sent from Squeak Inbox Talk

On 2022-03-28T09:26:52+02:00, marcel.taeumel at hpi.de wrote:

> Hi Christoph --
> 
> I just converted the dialog texts that pop up in my image on a regular basis. Maybe browsing senders of #withCRs and #withNoLineLongerThan: could help to find them all. Maybe filter for those methods who also have #translated?
> 
> (Btw: I think that "Debug invocation" needs another tweak. It filters out too much quite frequently...)
> 
> Best,
> Marcel
> Am 26.03.2022 16:36:27 schrieb Thiede, Christoph <christoph.thiede at student.hpi.uni-potsdam.de>:
> Just for interest, did you automate these rewrites or did you go through all senders of #inform:, #request:, etc. manually? If you still have any scripts, it would be nice if you could share them. :-)
> 
> Best,
> Christoph
> Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von commits at source.squeak.org <commits at source.squeak.org>
> Gesendet: Montag, 14. März 2022 16:34:43
> An: squeak-dev at lists.squeakfoundation.org; packages at lists.squeakfoundation.org
> Betreff: [squeak-dev] The Trunk: System-mt.1325.mcz
>  
> Marcel Taeumel uploaded a new version of System to project The Trunk:
> http://source.squeak.org/trunk/System-mt.1325.mcz [http://source.squeak.org/trunk/System-mt.1325.mcz]
> 
> ==================== Summary ====================
> 
> Name: System-mt.1325
> Author: mt
> Time: 14 March 2022, 4:34:33.986786 pm
> UUID: 0499f29c-88b0-dc40-8c69-a97e5ffe4321
> Ancestors: System-mt.1324
> 
> Remove manual line breaks in dialog texts. Keep double-breaks (i.e., '\\' or '<br><br>') as visual gap. Complements Morphic-mt.1935.
> 
> =============== Diff against System-mt.1324 ===============
> 
> Item was changed:
>   ----- Method: ChangeSet>>fileOut (in category 'fileIn/Out') -----
>   fileOut
>          "File out the receiver, to a file whose name is a function of the 
>          change-set name and either of the date & time or chosen to have a 
>          unique numeric tag, depending on the preference 
>          'changeSetVersionNumbers'"
>          | slips nameToUse |
>          self checkForConversionMethods.
>          ChangeSet promptForDefaultChangeSetDirectoryIfNecessary.
>          nameToUse := Preferences changeSetVersionNumbers
>                                  ifTrue: [self defaultChangeSetDirectory nextNameFor: self name extension: FileStream cs]
>                                  ifFalse: [self name , FileDirectory dot , Utilities dateTimeSuffix, FileDirectory dot , FileStream cs].
>          Cursor write showWhile: [ | internalStream |
>                          internalStream := WriteStream on: (String new: 10000).
>                          internalStream header; timeStamp.
>                          self fileOutPreambleOn: internalStream.
>                          self fileOutOn: internalStream.
>                          self fileOutPostscriptOn: internalStream.
>                          internalStream trailer.
>  
>                          FileStream writeSourceCodeFrom: internalStream baseName: (nameToUse copyFrom: 1 to: nameToUse size - 3) isSt: false useHtml: false.
>          ].
>          Preferences checkForSlips
>                  ifFalse: [^ self].
>          slips := self checkForSlips.
>          (slips size > 0
> +                        and: [Project uiManager confirm: 'Changeset was filed out. Still, methods in this file-out have <b>halts</b> or references to the <b>Transcript</b> or other ''slips'' in them.<br><br>Would you like to browse them?' translated asTextFromHtml
> +                                title: 'Browse Slips?' translated])
> -                        and: [UIManager default confirm: 'Changeset was filed out. Still, methods in this fileOut have halts\or references to the Transcript or other ''slips'' in them.\Would you like to browse them?' withCRs
> -                                title: 'Browse Slips?'])
>                  ifTrue: [self systemNavigation browseMessageList: slips name: 'Possible slips in ' , name]!
> 
> Item was changed:
>   ----- Method: DeepCopier>>warnIverNotCopiedIn:sel: (in category 'like fullCopy') -----
>   warnIverNotCopiedIn: aClass sel: sel
>          "Warn the user to update veryDeepCopyWith: or veryDeepInner:"
>  
> +        self inform: ('An instance variable was added to to class <b>{1}</b> and it is not copied in the method <b>{2}</b>.<br><br>Please rewrite it to handle all instance variables. See DeepCopier class comment.' translated format: { aClass name . sel}) asTextFromHtml.
> -        self inform: ('An instance variable was added to to class ', aClass name, ',\and it is not copied in the method ', sel, '.\Please rewrite it to handle all instance variables.\See DeepCopier class comment.') withCRs.
>          ToolSet browse: aClass selector: sel!
> 
> Item was changed:
>   ----- Method: Preferences class>>initializeParameters (in category 'parameters') -----
>   initializeParameters
>          "Preferences initializeParameters"
>          Parameters := IdentityDictionary new.
> +        Parameters at: #maxBalloonHelpLineLength put: 45.!
> -        Parameters at: #maxBalloonHelpLineLength put: 28.!
> 
> Item was changed:
>   ----- Method: Preferences class>>maxBalloonHelpLineLength (in category 'prefs - misc') -----
>   maxBalloonHelpLineLength
> +        ^ Parameters at: #maxBalloonHelpLineLength ifAbsent: [45]!
> -        ^ Parameters at: #maxBalloonHelpLineLength!
> 
> Item was added:
> + ----- Method: Preferences class>>maxBalloonHelpLineLength: (in category 'prefs - misc') -----
> + maxBalloonHelpLineLength: numChars
> +
> +        Parameters
> +                at: #maxBalloonHelpLineLength
> +                put: numChars.!
> 
> Item was changed:
>   ----- Method: SmalltalkImage>>openSourcesAndChanges:forImage: (in category 'image, changes names') -----
>   openSourcesAndChanges: changesName forImage: imageName
>          "Open the changes and sources files and install them in SourceFiles. Inform the user of problems regarding write permissions or CR/CRLF mixups."
>          "Note: SourcesName and imageName are full paths; changesName is a 
>          local name."
>          | sources changes msg wmsg |
> +        msg := 'Squeak cannot locate {1}.
> -        msg := 'Squeak cannot locate &fileRef.
>  
> + Please check that the file is named properly and is in the same directory as this image.'.
> +        wmsg := 'Squeak cannot write to {1}.
> - Please check that the file is named properly and is in the
> - same directory as this image.'.
> -        wmsg := 'Squeak cannot write to &fileRef.
>  
>   Please check that you have write permission for this file.
>  
>   You won''t be able to save this image correctly until you fix this.'.
>  
>          sources := Smalltalk openSources.
>          sources ifNotNil: [sources setConverterForCode].
>          changes := Smalltalk openChanges: changesName forImage: imageName.
>          changes ifNotNil: [changes setConverterForCode].
>  
>          ((sources == nil or: [sources atEnd])
>                          and: [Preferences valueOfFlag: #warnIfNoSourcesFile])
>                  ifTrue: [Smalltalk platformName = 'Mac OS'
>                                  ifTrue: [msg := msg , '
>   Make sure the sources file is not an Alias.'].
> + self inform: (msg format: { 'the sources file named ' , self sourcesName })].
> - self inform: (msg copyReplaceAll: '&fileRef' with: 'the sources file named ' , self sourcesName)].
>  
>          (changes == nil
>                          and: [Preferences valueOfFlag: #warnIfNoChangesFile])
> +                ifTrue: [self inform: (msg format: { 'the changes file named ' , changesName })].
> -                ifTrue: [self inform: (msg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].
>  
>          ((Preferences valueOfFlag: #warnIfNoChangesFile) and: [changes notNil])
>                  ifTrue: [changes isReadOnly
> +                                ifTrue: [self inform: (wmsg format: { 'the changes file named ' , changesName })].
> -                                ifTrue: [self inform: (wmsg copyReplaceAll: '&fileRef' with: 'the changes file named ' , changesName)].
>  
>                          ((changes next: 200)
>                                          includesSubstring: String crlf)
> +                                ifTrue: [self inform: ('The changes file named <b>{1}</b> has been injured by an unpacking utility. Line endings were changed from Cr to CrLf.<br><br>Please set the preferences in your decompressing program to
> + <b>do not convert text files</b> and unpack the system again.' translated format: { changesName }) asTextFromHtml]].
> -                                ifTrue: [self inform: 'The changes file named ' , changesName , '
> - has been injured by an unpacking utility.  Crs were changed to CrLfs.
> - Please set the preferences in your decompressing program to
> - "do not convert text files" and unpack the system again.']].
>  
>          SourceFiles := Array with: sources with: changes!
> 
> Item was changed:
>   ----- Method: SystemNavigation>>confirmAndRemoveClass: (in category 'ui') -----
>   confirmAndRemoveClass: aClass
>  
>          | allCalls subclasses hasForeignCalls className numberOfMethods allChoices yourChoice remove browse|
>          allCalls := self allCallsOnClass: aClass.
>          subclasses := aClass subclasses.
>          hasForeignCalls := allCalls anySatisfy: [:ea | ea actualClass ~= aClass].
>         
>          className := aClass name.
>          numberOfMethods := aClass methodDict size + aClass class methodDict size.
>  
>          allChoices := OrderedDictionary new.
>          allChoices at: 'Yes, remove it' translated put: [remove := true. browse := false].
>          (allCalls notEmpty or: [subclasses notEmpty]) ifTrue: [
>                  allChoices at: 'Yes, remove it, then browse references' translated put: [remove := true. browse := true].
>                  allChoices at: 'No, don''t remove it, but browse references' translated put: [remove := false. browse := true]].
>          allChoices at: 'No, don''t remove it' translated put: [remove := false. browse := false].
>                 
>          yourChoice := Project uiManager
>                  chooseFromLabeledValues: allChoices
> +                title: ('Are you sure that you want to remove the class\\       {1}\\and all its {2} methods? Maybe save your image before doing this.{3}{4}' translated withCRs asText format: {
> -                title: ('Are you sure that you want to remove\the class\\       {1}\\and all its {2} methods? Maybe save\your image before doing this.{3}{4}' translated withCRs asText format: {
>                          className asText allBold.
>                          numberOfMethods asString asText allBold.
>                          hasForeignCalls ifFalse: [''] ifTrue: [
>                                  '\\(There are {1} references to this class.)' translated withCRs asText
>                                          format: { allCalls size asString asText allBold }].
>                          subclasses ifEmpty: [''] ifNotEmpty: [
> +                                '\\(There are {1} subclasses, whose superclass must be updated manually after this.)' translated withCRs asText
> -                                '\\(There are {1} subclasses, whose superclass\must be updated manually after this.)' translated withCRs asText
>                                          format: { subclasses size asString asText allBold }] }).
>  
>          remove := browse := false. "Defaults"
>          yourChoice value. "Supports nil because of defaults above."
>         
>          remove ifTrue: [
>                  aClass removeFromSystem].
>          browse ifTrue: [
>                  hasForeignCalls ifTrue: [
>                          self browseAllCallsOnClass: aClass].
>                  subclasses ifNotEmpty: [
>                          self
>                                  browseMessageList: (subclasses collect: [:subclass | MethodReference class: subclass selector: #Definition environment: self environment])
>                                  name: ('Subclasses of {1}' translated format: {className})
>                                  autoSelect: className]].
>         
>          ^ remove!
> 
> Item was changed:
>   ----- Method: SystemNavigation>>confirmAndRemoveMessageCategory:class: (in category 'ui') -----
>   confirmAndRemoveMessageCategory: aCategory class: aClass
>  
>          | categoryList |
>          categoryList := aClass organization listAtCategoryNamed: aCategory.
>         
>          (categoryList isEmpty
> +                or: [Project uiManager confirm: ('Are you sure you want to remove the message category\\        {1}\    from {2}\\and all its {3} methods? Maybe save your image before doing this.' translated withCRs asText format: {
> -                or: [Project uiManager confirm: ('Are you sure you want to remove\the message category\\        {1}\    from {2}\\and all its {3} methods? Maybe save\your image before doing this.' translated withCRs asText format: {
>                                  aCategory asText allBold.
>                                  aClass name.
>                                  categoryList size asString asText allBold
>                                         
>                                          }) title: 'Remove Message Category' translated])
>                  ifFalse: [^ false].
>                 
>          aClass removeCategory: aCategory.
>          ^ true!
> 
> Item was changed:
>   ----- Method: SystemNavigation>>confirmAndRemoveSelector:class: (in category 'ui') -----
>   confirmAndRemoveSelector: selector class: aClass
>  
>          | method allCalls remove browse |
>          method := MethodReference class: aClass selector: selector environment: self environment.
>          allCalls := self allCallsOn: selector.
>         
>          (allCalls anySatisfy: [:ea | ea ~= method])
>                  ifFalse: [remove := true. browse := false]
>                  ifTrue: [ | allChoices yourChoice |
>  
>                          allChoices := OrderedDictionary new.
>                          allChoices at: 'Yes, remove it' translated put: [remove := true. browse := false].
>                          allChoices at: 'Yes, remove it, then browse senders' translated put: [remove := true. browse := true].
>                          allChoices at: 'No, don''t remove it, but browse senders' translated put: [remove := false. browse := true].
>                          allChoices at: 'No, don''t remove it' translated put: [remove := false. browse := false].
>         
>                          yourChoice := Project uiManager
>                                  chooseFromLabeledValues: allChoices
> +                                title: ('Are you sure that you want to remove the message {1} from {2}?\\The message has {3} senders.' translated withCRs asText format: {
> -                                title: ('Are you sure that you want to remove the message\{1} from {2}?\\The message has {3} senders.' translated withCRs asText format: {
>                                          selector asText allBold.
>                                          aClass name asText allBold.
>                                          allCalls size asString asText allBold }).
>  
>                          remove := browse := false. "Defaults"
>                          yourChoice value. "Supports nil because of defaults above."].
>         
>          remove ifTrue: [
>                  aClass removeSelector: selector].
>          browse ifTrue: [
>                  self headingAndAutoselectForLiteral: selector do: [ :label :autoSelect |
>                          self
>                                  browseMessageList: allCalls
>                                  name: label
>                                  autoSelect: autoSelect]].
>         
>          ^ remove!
> 
> Item was changed:
>   ----- Method: SystemNavigation>>confirmAndRemoveSystemCategory: (in category 'ui') -----
>   confirmAndRemoveSystemCategory: aCategory
>  
>          | systemOrganizer categoryList |
>          systemOrganizer := self environment organization.
>          categoryList := systemOrganizer listAtCategoryNamed: aCategory.
>         
>          (categoryList isEmpty
>                  or: [Project uiManager
> +                        confirm: ('Are you sure you want to remove the system category\\        {1}\\and all its {2} classes? Maybe save your image before doing this.' translated withCRs asText
> -                        confirm: ('Are you sure you want to remove\the system category\\        {1}\\and all its {2} classes? Maybe save\your image before doing this.' translated withCRs asText
>                                  format: {
>                                          aCategory asText allBold.
>                                          categoryList size asString asText allBold})
>                          title: 'Remove System Category' translated])
>                  ifFalse: [^ false].
>          systemOrganizer removeSystemCategory: aCategory.
>          ^ true!
> 
> Item was changed:
>   ----- Method: SystemVersion>>description (in category 'printing') -----
>   description
>  
> +        self isAlpha ifTrue: [^ 'ALPHA. New features which are not stable yet may come in with each update. Also, existing features might not work reliably due to updates and related changes.' translated withCRs].
> -        self isAlpha ifTrue: [^ 'ALPHA. New features which are not stable yet may come in\with each update. Also, existing features might not work\reliably due to updates and related changes.' translated withCRs].
>         
> +        (self isFeatureFreeze and: [self isCodeFreeze not]) ifTrue: [^ 'FEATURE FREEZE. A new release is being prepared. There will be only bugfixes, but no new features.' translated withCRs].
> -        (self isFeatureFreeze and: [self isCodeFreeze not]) ifTrue: [^ 'FEATURE FREEZE. A new release is being prepared.\There will be only bugfixes, but no new features.' translated withCRs].
>         
> +        self isCodeFreeze ifTrue: [^ 'RELEASE CANDIDATE. The new release is almost ready. There will be only bugfixes, if any.' translated withCRs].
> -        self isCodeFreeze ifTrue: [^ 'RELEASE CANDIDATE. The new release is almost ready.\There will be only bugfixes, if any.' translated withCRs].
>                 
>          self isRelease ifTrue: [^ ''].!
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220328/de1ab591/attachment-0001.html>
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220328/4507ab38/attachment.html>


More information about the Squeak-dev mailing list