-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add improvements based on code review feedback
- Loading branch information
Showing
17 changed files
with
250 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Extension { #name : 'LanguageRange' } | ||
|
||
{ #category : '*Buoy-Deprecated-V8' } | ||
LanguageRange class >> from: aSubtagCollection [ | ||
|
||
self | ||
deprecated: 'Use composedOf: instead' | ||
transformWith: '`@receiver from: `@subtags' -> '`@receiver composedOf: `@subtags'. | ||
^ self composedOf: aSubtagCollection | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Extension { #name : 'LanguageTag' } | ||
|
||
{ #category : '*Buoy-Deprecated-V8' } | ||
LanguageTag class >> from: aSubtagCollection [ | ||
|
||
self | ||
deprecated: 'Use composedOf: instead' | ||
transformWith: '`@receiver from: `@subtags' -> '`@receiver composedOf: `@subtags'. | ||
|
||
^ self composedOf: aSubtagCollection | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : 'Buoy-Deprecated-V8' } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 1 addition & 9 deletions
10
source/Buoy-Localization-GS64-Extensions/NaturalLanguageTranslator.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
source/Buoy-Localization-Pharo-Extensions/String.extension.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Extension { #name : 'String' } | ||
|
||
{ #category : '*Buoy-Localization-Pharo-Extensions' } | ||
String >> asLanguageRange [ | ||
|
||
^ LanguageRange fromString: self | ||
] | ||
|
||
{ #category : '*Buoy-Localization-Pharo-Extensions' } | ||
String >> asLanguageTag [ | ||
|
||
^ LanguageTag fromString: self | ||
] | ||
|
||
{ #category : '*Buoy-Localization-Pharo-Extensions' } | ||
String >> escaped [ | ||
|
||
^ EscapingAlgorithm new escape: self | ||
] | ||
|
||
{ #category : '*Buoy-Localization-Pharo-Extensions' } | ||
String >> localized [ | ||
|
||
^ self localizedWithAll: #( ) | ||
] | ||
|
||
{ #category : '*Buoy-Localization-Pharo-Extensions' } | ||
String >> localizedWithAll: collection [ | ||
|
||
^ NaturalLanguageTranslator current localize: self withAll: collection to: CurrentLocale value | ||
] | ||
|
||
{ #category : '*Buoy-Localization-Pharo-Extensions' } | ||
String >> unescaped [ | ||
|
||
^ EscapingAlgorithm new unescape: self | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.