diff --git a/friction-strings_en.json b/friction-strings_en.json index 9fc6145f..5bf6c39c 100644 --- a/friction-strings_en.json +++ b/friction-strings_en.json @@ -96,7 +96,10 @@ "value": "cool" }, "statePattern": { - "value": "surface temperature {{thermometer}}is {{temp}}" + "value": "surface temperature is {{temp}}" + }, + "stateWithThermometerPattern": { + "value": "surface temperature thermometer is {{temp}}" }, "cooler": { "value": "cooler" @@ -117,9 +120,6 @@ "value": "now hotter" } }, - "thermometer": { - "value": "thermometer " - }, "droppingAsAtomsJiggleLess": { "value": "dropping as atoms jiggle less" }, diff --git a/js/friction/view/FrictionScreenSummaryNode.js b/js/friction/view/FrictionScreenSummaryNode.js index 4f136364..552d4a1e 100644 --- a/js/friction/view/FrictionScreenSummaryNode.js +++ b/js/friction/view/FrictionScreenSummaryNode.js @@ -14,14 +14,13 @@ define( require => { const Node = require( 'SCENERY/nodes/Node' ); const StringUtils = require( 'PHETCOMMON/util/StringUtils' ); - // a11y strings const summarySentencePatternString = require( 'string!FRICTION/a11y.summarySentencePattern' ); const droppingAsAtomsJiggleLessString = require( 'string!FRICTION/a11y.droppingAsAtomsJiggleLess' ); const atomsJigglePatternString = require( 'string!FRICTION/a11y.atomsJigglePattern' ); const jiggleClausePatternString = require( 'string!FRICTION/a11y.jiggleClausePattern' ); const jiggleTemperatureScaleSentenceString = require( 'string!FRICTION/a11y.jiggleTemperatureScaleSentence' ); - const thermometerString = require( 'string!FRICTION/a11y.thermometer' ); + const temperatureStateWithThermometerPatternString = require( 'string!FRICTION/a11y.temperature.stateWithThermometerPattern' ); const temperatureStatePatternString = require( 'string!FRICTION/a11y.temperature.statePattern' ); const moveChemistryBookSentenceString = require( 'string!FRICTION/a11y.moveChemistryBookSentence' ); const resetSimMoreObservationSentenceString = require( 'string!FRICTION/a11y.resetSimMoreObservationSentence' ); @@ -68,7 +67,7 @@ define( require => { // Not if it is completely cool, so we don't trigger the update too much. const amplitudeSettledButNotMin = amplitude < FrictionModel.AMPLITUDE_SETTLED_THRESHOLD && // considered in a "settled" state - amplitude !== FrictionModel.VIBRATION_AMPLITUDE_MIN; // not the minimum amplitude + amplitude !== FrictionModel.VIBRATION_AMPLITUDE_MIN; // not the minimum amplitude // nested if statements so that we don't have to calculate these strings as much if ( tempDecreasing || @@ -212,9 +211,9 @@ define( require => { } // Fill in the current temperature string - const tempString = StringUtils.fillIn( temperatureStatePatternString, { - temp: this.amplitudeToTempString( vibrationAmplitudeProperty.value ), - thermometer: inTransition ? '' : thermometerString + const tempString = StringUtils.fillIn( inTransition ? temperatureStatePatternString : + temperatureStateWithThermometerPatternString, { + temp: this.amplitudeToTempString( vibrationAmplitudeProperty.value ) } ); // Construct the final sentence from its parts