-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1346 from SeasideSt/gettext-testing-improvements
Gettext: fix for issue https://github.com/SeasideSt/Grease/issues/146…
- Loading branch information
Showing
49 changed files
with
241 additions
and
186 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"noMethodMetaData" : true, | ||
"separateMethodMetaAndSource" : false, | ||
"useCypressPropertiesFile" : true } | ||
"noMethodMetaData" : true, | ||
"useCypressPropertiesFile" : true | ||
} |
3 changes: 2 additions & 1 deletion
3
repository/Seaside-Gettext-Core.package/GRPackage.extension/properties.json
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
{ | ||
"name" : "GRPackage" } | ||
"name" : "GRPackage" | ||
} |
3 changes: 2 additions & 1 deletion
3
repository/Seaside-Gettext-Core.package/GRPlatform.extension/properties.json
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
{ | ||
"name" : "GRPlatform" } | ||
"name" : "GRPlatform" | ||
} |
19 changes: 8 additions & 11 deletions
19
...tory/Seaside-Gettext-Core.package/GetTextSucessfulTranslationResult.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "GetTextSucessfulTranslationResult", | ||
"pools" : [ | ||
], | ||
"super" : "GetTextTranslationResult", | ||
"type" : "normal" } | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GetTextSucessfulTranslationResult", | ||
"type" : "normal" | ||
} |
19 changes: 9 additions & 10 deletions
19
repository/Seaside-Gettext-Core.package/GetTextTranslationResult.class/properties.json
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"super" : "Object", | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"original", | ||
"translation" ], | ||
"translation" | ||
], | ||
"name" : "GetTextTranslationResult", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } | ||
"type" : "normal" | ||
} |
19 changes: 8 additions & 11 deletions
19
...ry/Seaside-Gettext-Core.package/GetTextUnsucessfulTranslationResult.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "GetTextUnsucessfulTranslationResult", | ||
"pools" : [ | ||
], | ||
"super" : "GetTextTranslationResult", | ||
"type" : "normal" } | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "GetTextUnsucessfulTranslationResult", | ||
"type" : "normal" | ||
} |
3 changes: 2 additions & 1 deletion
3
repository/Seaside-Gettext-Core.package/String.extension/properties.json
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
{ | ||
"name" : "String" } | ||
"name" : "String" | ||
} |
3 changes: 2 additions & 1 deletion
3
repository/Seaside-Gettext-Core.package/WAApplication.extension/properties.json
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
{ | ||
"name" : "WAApplication" } | ||
"name" : "WAApplication" | ||
} |
19 changes: 8 additions & 11 deletions
19
repository/Seaside-Gettext-Core.package/WACurrentLocalizationContext.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "JohanBrichau 7/23/2022 16:35", | ||
"instvars" : [ | ||
], | ||
"name" : "WACurrentLocalizationContext", | ||
"pools" : [ | ||
], | ||
"super" : "WADynamicVariable", | ||
"type" : "normal" } | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "WACurrentLocalizationContext", | ||
"type" : "normal" | ||
} |
19 changes: 8 additions & 11 deletions
19
repository/Seaside-Gettext-Core.package/WAGetTextConfiguration.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "WAGetTextConfiguration", | ||
"pools" : [ | ||
], | ||
"super" : "WASystemConfiguration", | ||
"type" : "normal" } | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "WAGetTextConfiguration", | ||
"type" : "normal" | ||
} |
6 changes: 6 additions & 0 deletions
6
...sitory/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslator.for..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,6 @@ | ||
translators registry | ||
addTranslator: aTranslator for: anApplicationName | ||
"Register translator for the named application" | ||
TranslatorRegistry | ||
at: anApplicationName | ||
put: aTranslator |
6 changes: 6 additions & 0 deletions
6
...aside-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFiles..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,6 @@ | ||
translators registry | ||
addTranslatorFor: anApplicationName fromFiles: aCollectionOfMOFiles | ||
"Create and register a translator for the named application with given gettext translation files" | ||
self | ||
addTranslator: (self newFromMOFiles: aCollectionOfMOFiles) | ||
for: anApplicationName |
7 changes: 7 additions & 0 deletions
7
...ide-Gettext-Core.package/WAGetTextTranslator.class/class/addTranslatorFor.fromFilesIn..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,7 @@ | ||
translators registry | ||
addTranslatorFor: anApplicationName fromFilesIn: aDirectoryPathString | ||
"Create and register a translator for the named application with gettext translation files located in the given directory. | ||
The argument directory is the top directory of the Gettext translation filestructure." | ||
self | ||
addTranslator: (self newFromMOFilesIn: aDirectoryPathString forName: anApplicationName) | ||
for: anApplicationName |
7 changes: 0 additions & 7 deletions
7
...-Gettext-Core.package/WAGetTextTranslator.class/class/createTranslatorFor.fromFilesIn..st
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/class/newFromMOFiles..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,7 @@ | ||
instance creation | ||
newFromMOFiles: aCollectionOfMOFiles | ||
| translator | | ||
translator := self new. | ||
aCollectionOfMOFiles do:[ :moFile | | ||
translator addMOFile: moFile forLocaleID: moFile localeId ]. | ||
^ translator |
5 changes: 5 additions & 0 deletions
5
...Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFile.forLocaleID..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,5 @@ | ||
private | ||
addMOFile: moFile forLocaleID: localeId | ||
^ moFilePerLocaleId | ||
at: localeId | ||
put: moFile |
28 changes: 14 additions & 14 deletions
28
...ide-Gettext-Core.package/WAGetTextTranslator.class/instance/addMOFileFromPath.forName..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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
private | ||
addMOFileFromPath: pathString forName: anApplicationName | ||
| locale fileName | | ||
locale := WALocale fromString: (GRPlatform current localNameOf: pathString). | ||
fileName := String | ||
streamContents: [ :str | | ||
str | ||
nextPutAll: pathString; | ||
nextPutAll: GRPlatform current pathSeparator; | ||
nextPutAll: 'LC_MESSAGES'; | ||
nextPutAll: GRPlatform current pathSeparator; | ||
nextPutAll: anApplicationName; | ||
nextPutAll: '.mo' ]. | ||
^ moFilePerLocaleId | ||
at: locale localeId | ||
put: (WAMOFile new initializeFromFile: fileName localeId: locale localeId) | ||
|
||
| locale fileName | | ||
locale := WALocale fromString: (GRPlatform current localNameOf: pathString). | ||
fileName := String streamContents: [ :str | | ||
str | ||
nextPutAll: pathString; | ||
nextPutAll: GRPlatform current pathSeparator; | ||
nextPutAll: 'LC_MESSAGES'; | ||
nextPutAll: GRPlatform current pathSeparator; | ||
nextPutAll: anApplicationName; | ||
nextPutAll: '.mo' ]. | ||
^ self | ||
addMOFile: (WAMOFile new initializeFromFile: fileName localeId: locale localeId) | ||
forLocaleID: locale localeId |
4 changes: 4 additions & 0 deletions
4
repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/instance/initialize.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,4 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
moFilePerLocaleId := Dictionary new. |
1 change: 0 additions & 1 deletion
1
...ttext-Core.package/WAGetTextTranslator.class/instance/initializeFromMOFilesIn.forName..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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
initialization | ||
initializeFromMOFilesIn: aDirectoryPathString forName: anApplicationName | ||
self initialize. | ||
moFilePerLocaleId := Dictionary new. | ||
(GRPlatform current directoriesIn: aDirectoryPathString) | ||
do: [ :dirPathString | self addMOFileFromPath: dirPathString forName: anApplicationName ] |
19 changes: 10 additions & 9 deletions
19
repository/Seaside-Gettext-Core.package/WAGetTextTranslator.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,15 @@ | ||
{ | ||
"commentStamp" : "MelvinRoest 3/25/2022 14:19", | ||
"super" : "Object", | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ | ||
"TranslatorRegistry" ], | ||
"commentStamp" : "MelvinRoest 3/25/2022 14:19", | ||
"TranslatorRegistry" | ||
], | ||
"instvars" : [ | ||
"moFilePerLocaleId" ], | ||
"moFilePerLocaleId" | ||
], | ||
"name" : "WAGetTextTranslator", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } | ||
"type" : "normal" | ||
} |
19 changes: 9 additions & 10 deletions
19
repository/Seaside-Gettext-Core.package/WALazyTranslatedString.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"super" : "WAObject", | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"key" ], | ||
"key" | ||
], | ||
"name" : "WALazyTranslatedString", | ||
"pools" : [ | ||
], | ||
"super" : "WAObject", | ||
"type" : "normal" } | ||
"type" : "normal" | ||
} |
19 changes: 9 additions & 10 deletions
19
repository/Seaside-Gettext-Core.package/WALocalizationContext.class/properties.json
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 |
---|---|---|
@@ -1,15 +1,14 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "MelvinRoest 3/25/2022 11:23", | ||
"super" : "WAObject", | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"translator", | ||
"locale" ], | ||
"locale" | ||
], | ||
"name" : "WALocalizationContext", | ||
"pools" : [ | ||
], | ||
"super" : "WAObject", | ||
"type" : "normal" } | ||
"type" : "normal" | ||
} |
19 changes: 8 additions & 11 deletions
19
repository/Seaside-Gettext-Core.package/WALocalizationContextFilter.class/properties.json
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
{ | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "MelvinRoest 3/25/2022 12:09", | ||
"instvars" : [ | ||
], | ||
"name" : "WALocalizationContextFilter", | ||
"pools" : [ | ||
], | ||
"super" : "WARequestFilter", | ||
"type" : "normal" } | ||
"category" : "Seaside-Gettext-Core", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ ], | ||
"name" : "WALocalizationContextFilter", | ||
"type" : "normal" | ||
} |
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
2 changes: 1 addition & 1 deletion
2
...ry/Seaside-Gettext-Core.package/WAMOFile.class/instance/initializeFromStream.localeId..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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
initialization | ||
initializeFromStream: aStream localeId: aLocaleString | ||
self initialize. | ||
localeString := aLocaleString. | ||
localeId := aLocaleString. | ||
self privateLoadStream: aStream |
3 changes: 3 additions & 0 deletions
3
repository/Seaside-Gettext-Core.package/WAMOFile.class/instance/localeId.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,3 @@ | ||
accessing | ||
localeId | ||
^ localeId |
Oops, something went wrong.