-
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.
Fix tests for WAGettextExporter to adaptations done in commit ef074d9 …
…and added interface to create an exporter on a RBBrowserEnvironment
- Loading branch information
Showing
11 changed files
with
33 additions
and
47 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.../Seaside-Pharo-Gettext-Core.package/WAGetTextExporter.class/class/newForRBEnvironment..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 @@ | ||
instance creation | ||
newForRBEnvironment: aRBEnvironment | ||
^ self new rbEnvironment: aRBEnvironment |
12 changes: 6 additions & 6 deletions
12
...tory/Seaside-Pharo-Gettext-Core.package/WAGetTextExporter.class/instance/exportCatalog.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,8 +1,8 @@ | ||
exporting | ||
exportCatalog | ||
"WAGetTextExporter new exportTemplate" | ||
| translationLiterals | "translationLiterals is a dictionary of keyword ->#(MethodReference...)." | ||
exportCatalog | ||
|
||
| translationLiterals | | ||
translationLiterals := self gatherTranslations. | ||
[stream := exportFile asFileReference ensureDelete; writeStream. | ||
self exportLiteralsDict: translationLiterals] | ||
ensure: [stream close] | ||
[ | ||
stream := exportFile asFileReference ensureDelete; writeStream. | ||
self exportLiteralsDict: translationLiterals ] ensure: [ stream close ] |
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
3 changes: 3 additions & 0 deletions
3
...ory/Seaside-Pharo-Gettext-Core.package/WAGetTextExporter.class/instance/rbEnvironment..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 | ||
rbEnvironment: aRBBrowserEnvironment | ||
rbEnvironment := aRBBrowserEnvironment |
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
6 changes: 3 additions & 3 deletions
6
...Tests-Pharo-Gettext.package/WAGetTextExporterTest.class/instance/fileContentsOfPOTFile.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
5 changes: 2 additions & 3 deletions
5
...easide-Tests-Pharo-Gettext.package/WAGetTextExporterTest.class/instance/sortedTriplets.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 @@ | ||
tests - test data | ||
sortedTriplets | ||
|
||
^ #(#('Seaside-Gettext-Examples,WAGettextExample>>#renderContentOn:,fontsize' 'Seaside-Gettext-Examples,WAGettextExample>>renderContentOn:,WAGettextExample>>renderContentOn:,WAGettextExample>>renderContentOn:,WAGettextExample>>renderContentOn:' 'fontsize') | ||
#('Seaside-Gettext-Examples,WAGettextExample>>#renderLocaleSelectionOn:,Select a locale below' 'Seaside-Gettext-Examples,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:' 'Select a locale below') | ||
#('Seaside-Gettext-Examples,WAGettextExample>>#renderLocaleSelectionOn:,locale' 'Seaside-Gettext-Examples,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:' 'locale')) | ||
^ #( | ||
#('WAGettextExample>>#renderContentOn:,fontsize' 'WAGettextExample>>renderContentOn:' 'fontsize') #('WAGettextExample>>#renderLocaleSelectionOn:,Select a locale below' 'WAGettextExample>>renderLocaleSelectionOn:' 'Select a locale below') #('WAGettextExample>>#renderLocaleSelectionOn:,locale' 'WAGettextExample>>renderLocaleSelectionOn:' 'locale')) |
6 changes: 3 additions & 3 deletions
6
...-Tests-Pharo-Gettext.package/WAGetTextExporterTest.class/instance/sortedTripletsString.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,12 +1,12 @@ | ||
tests - test data | ||
sortedTripletsString | ||
|
||
^ '#: Seaside-Gettext-Examples,WAGettextExample>>renderContentOn:,WAGettextExample>>renderContentOn:,WAGettextExample>>renderContentOn:,WAGettextExample>>renderContentOn:', String lf, | ||
^ '#: WAGettextExample>>renderContentOn:', String lf, | ||
'msgid "fontsize"', String lf, | ||
'msgstr ""', String lf, String cr, | ||
'#: Seaside-Gettext-Examples,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:', String lf, | ||
'#: WAGettextExample>>renderLocaleSelectionOn:', String lf, | ||
'msgid "Select a locale below"', String lf, | ||
'msgstr ""', String lf, String cr, | ||
'#: Seaside-Gettext-Examples,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:,WAGettextExample>>renderLocaleSelectionOn:', String lf, | ||
'#: WAGettextExample>>renderLocaleSelectionOn:', String lf, | ||
'msgid "locale"', String lf, | ||
'msgstr ""', String lf, String cr. |
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
33 changes: 5 additions & 28 deletions
33
....package/WAGetTextExporterTest.class/instance/translationLiteralsArrayAsCompiledMethod.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,30 +1,7 @@ | ||
tests - test data | ||
translationLiteralsArrayAsCompiledMethod | ||
^ { | ||
'Select a locale below'->(OrderedCollection newFrom: { | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
}). | ||
'fontsize'->(OrderedCollection newFrom: { | ||
(WAGettextExample>>#renderContentOn:). | ||
(WAGettextExample>>#renderContentOn:). | ||
(WAGettextExample>>#renderContentOn:). | ||
(WAGettextExample>>#renderContentOn:). | ||
}). | ||
'locale'->(OrderedCollection newFrom: { | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
(WAGettextExample>>#renderLocaleSelectionOn:). | ||
}) | ||
}. | ||
|
||
^ { | ||
('Select a locale below' -> (Set newFrom: { (WAGettextExample >> #renderLocaleSelectionOn:) })). | ||
('fontsize' -> (Set newFrom: { (WAGettextExample >> #renderContentOn:) })). | ||
('locale' -> (Set newFrom: { (WAGettextExample >> #renderLocaleSelectionOn:) })) } |