Skip to content

Commit

Permalink
"Vectors" -> "Force arrows" see phetsims/gravity-force-lab-basics#88
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 19, 2019
1 parent ea4a758 commit 607e0b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion js/ISLCA11yStrings.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ define( require => {
value: 'Vectors {{size}}.'
},
vectorSizeForcesValuePattern: {
value: 'Vectors {{size}}, forces now {{forceValue}} {{units}}.'
value: '{{vectorsCapitalized}} {{size}}, forces now {{forceValue}} {{units}}.'
},
vectorsSizeClausePattern: {
value: '{{vectors}} {{size}}'
Expand Down
9 changes: 5 additions & 4 deletions js/view/describers/ForceDescriber.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ define( require => {
const valuePatternString = ISLCA11yStrings.valuePattern.value;

// helper functions


const getScientificNotationTextFromPattern = ( forceValue, mantissaDecimalPlaces, pattern ) => {
const { mantissa, exponent } = ScientificNotationNode.toScientificNotation( forceValue, { mantissaDecimalPlaces: mantissaDecimalPlaces } );
const mantissaPattern = mantissa < 0 ? negativeValuePatternString : valuePatternString; // negative values are possible in Coulomb's Law
Expand Down Expand Up @@ -144,6 +142,9 @@ define( require => {
this.vectorChangeForcesNowValuePatternString = StringUtils.fillIn( vectorChangeForcesNowValuePatternString, {
vectorsCapitalized: options.vectorsCapitalizedString
} );
this.vectorSizeForcesValuePatternString = StringUtils.fillIn( vectorSizeForcesValuePatternString, {
vectorsCapitalized: options.vectorsCapitalizedString
} );
this.vectorsSizeClausePatternString = StringUtils.fillIn( vectorsSizeClausePatternString, {
vectors: options.forceArrowsLower
} );
Expand Down Expand Up @@ -293,15 +294,15 @@ define( require => {
}

/**
* Returns the string 'Vectors {{size}}, forces {{forceValue}} {{units}}.'
* Returns the string 'Vectors {{size}}, forces now {{forceValue}} {{units}}.'
*
* @returns {string}
*/
getVectorSizeForceValueText() {
const size = this.vectorSize;
const forceValue = this.formattedForce;
const units = this.units;
return StringUtils.fillIn( vectorSizeForcesValuePatternString, { size: size, forceValue: forceValue, units: units } );
return StringUtils.fillIn( this.vectorSizeForcesValuePatternString, { size: size, forceValue: forceValue, units: units } );
}

/**
Expand Down

0 comments on commit 607e0b7

Please sign in to comment.