Skip to content

Commit

Permalink
support for dynamic locale, #319
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 27, 2022
1 parent b933df5 commit 9fc22dc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/common/view/PlayButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PlayButtonGroup extends Node {
}, options );

// 'Add a Mate' push button, for when the initial population consists of a single bunny.
const addAMateButton = new TextPushButton( naturalSelectionStrings.addAMate, {
const addAMateButton = new TextPushButton( naturalSelectionStrings.addAMateProperty, {
listener: () => {
options.addAMate();
simulationModeProperty.value = SimulationMode.ACTIVE;
Expand All @@ -53,7 +53,7 @@ class PlayButtonGroup extends Node {
} );

// 'Play' push button, for when the initial population consists of more than one bunny.
const playButton = new TextPushButton( naturalSelectionStrings.play, {
const playButton = new TextPushButton( naturalSelectionStrings.playProperty, {
listener: () => {
options.play();
simulationModeProperty.value = SimulationMode.ACTIVE;
Expand All @@ -63,7 +63,7 @@ class PlayButtonGroup extends Node {

// 'Start Over' push button, displayed after the game ends (bunnie take over the world, or all bunnies die),
// while the user is reviewing the final state.
const startOverButton = new TextPushButton( naturalSelectionStrings.startOver, {
const startOverButton = new TextPushButton( naturalSelectionStrings.startOverProperty, {
listener: () => {
options.startOver();
simulationModeProperty.value = SimulationMode.STAGED;
Expand Down Expand Up @@ -135,10 +135,10 @@ class PlayButtonGroup extends Node {
class TextPushButton extends RectangularPushButton {

/**
* @param {string} label
* @param {TReadOnlyProperty<string>} stringProperty
* @param {Object} [options]
*/
constructor( label, options ) {
constructor( stringProperty, options ) {

options = merge( {
textOptions: {
Expand All @@ -158,7 +158,7 @@ class TextPushButton extends RectangularPushButton {

assert && assert( !options.content, 'TextPushButton sets content' );
assert && assert( !options.textOptions.tandem, 'TextPushButton sets textOptions.tandem' );
options.content = new Text( label, merge( {}, options.textOptions, {
options.content = new Text( stringProperty, merge( {}, options.textOptions, {
tandem: options.tandem.createTandem( 'textNode' )
} ) );

Expand Down

0 comments on commit 9fc22dc

Please sign in to comment.