Skip to content

Commit

Permalink
Merge pull request #110 from ba-st/localization_support
Browse files Browse the repository at this point in the history
Localization support
  • Loading branch information
mtabacman authored Aug 23, 2024
2 parents 43141db + e5cc46c commit 46972d7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ Class {
{ #category : 'instance creation' }
CriteriaBasedConflictCheckingStrategy class >> accordingTo: aBlockOrMatchingCriteria [

^ self
accordingTo: aBlockOrMatchingCriteria
explainingConflictWith: [ :objectInMemory |
'Something is in conflict with <1p>' expandMacrosWith:
objectInMemory ]
^ self accordingTo: aBlockOrMatchingCriteria explainingConflictWith: [ :objectInMemory |
'Something is in conflict with {1}' localizedWithAll: { objectInMemory printString } ]
]

{ #category : 'instance creation' }
Expand Down
11 changes: 7 additions & 4 deletions source/Sagan-Core/RepositoryBehavior.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@ RepositoryBehavior >> assertBoundariesAreValidFrom: aStartingPosition upTo: aMax
{ #category : 'private - preconditions' }
RepositoryBehavior >> assertIncludes: inMemoryObject [

AssertionChecker
enforce: [ ( self countMatching: [ :objectInRepository :criteria | criteria does: objectInRepository equal: inMemoryObject ] ) strictlyPositive ]
because: [ '<1p> was not found.' expandMacrosWith: inMemoryObject ]
raising: ObjectNotFound
AssertionChecker
enforce: [
( self countMatching: [ :objectInRepository :criteria |
criteria does: objectInRepository equal: inMemoryObject ] ) strictlyPositive
]
because: [ '{1} was not found.' localizedWithAll: { inMemoryObject printString } ]
raising: ObjectNotFound
]

{ #category : 'private - preconditions' }
Expand Down

0 comments on commit 46972d7

Please sign in to comment.