mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 09:35:56 -05:00
Merge pull request #1217 from mewtaylor/issue/gh-1196
Fix GH-1196: Don’t localize an empty string
This commit is contained in:
commit
abcb92243b
2 changed files with 8 additions and 4 deletions
|
@ -516,11 +516,10 @@ module.exports = {
|
||||||
'orgChoiceAfterschool',
|
'orgChoiceAfterschool',
|
||||||
'orgChoiceMuseum',
|
'orgChoiceMuseum',
|
||||||
'orgChoiceLibrary',
|
'orgChoiceLibrary',
|
||||||
'orgChoiceCamp',
|
'orgChoiceCamp'
|
||||||
'orgChoiceOther'
|
|
||||||
],
|
],
|
||||||
getOrganizationOptions: function () {
|
getOrganizationOptions: function () {
|
||||||
return this.organizationL10nStems.map(function (choice, id) {
|
var options = this.organizationL10nStems.map(function (choice, id) {
|
||||||
return {
|
return {
|
||||||
value: id,
|
value: id,
|
||||||
label: this.props.intl.formatMessage({
|
label: this.props.intl.formatMessage({
|
||||||
|
@ -528,6 +527,12 @@ module.exports = {
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
|
// Add "Other" option with empty string, since input field is used
|
||||||
|
var otherId = options.length;
|
||||||
|
options.push({value: otherId, label: ' '});
|
||||||
|
|
||||||
|
return options;
|
||||||
},
|
},
|
||||||
onChooseOrganization: function (name, values) {
|
onChooseOrganization: function (name, values) {
|
||||||
this.setState({otherDisabled: values.indexOf(this.organizationL10nStems.indexOf('orgChoiceOther')) === -1});
|
this.setState({otherDisabled: values.indexOf(this.organizationL10nStems.indexOf('orgChoiceOther')) === -1});
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
"teacherRegistration.orgChoiceMuseum": "Museum",
|
"teacherRegistration.orgChoiceMuseum": "Museum",
|
||||||
"teacherRegistration.orgChoiceLibrary": "Library",
|
"teacherRegistration.orgChoiceLibrary": "Library",
|
||||||
"teacherRegistration.orgChoiceCamp": "Camp",
|
"teacherRegistration.orgChoiceCamp": "Camp",
|
||||||
"teacherRegistration.orgChoiceOther": " ",
|
|
||||||
"teacherRegistration.notRequired": "Not Required",
|
"teacherRegistration.notRequired": "Not Required",
|
||||||
"teacherRegistration.addressValidationError": "This doesn't look like a real address",
|
"teacherRegistration.addressValidationError": "This doesn't look like a real address",
|
||||||
"teacherRegistration.addressLine1": "Address Line 1",
|
"teacherRegistration.addressLine1": "Address Line 1",
|
||||||
|
|
Loading…
Reference in a new issue