Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unused sounds and strings #335

Closed
pixelzoom opened this issue Jul 13, 2023 · 1 comment
Closed

Unused sounds and strings #335

pixelzoom opened this issue Jul 13, 2023 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 13, 2023

For code review #331 ...

  • Does the sim build without warnings or errors?

Building the sim results in a lot of warnings about unused sounds and strings -- see Details below. Perhaps there are related to the Micro screen? Creating this issue in case they indeed vestigial.

% grunt --brands=phet
...
>> Unused sounds module: greenhouse-effect/sounds/absorbPhoton_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/breakApart_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/energized_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonEmitIr_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonEmitMicrowave_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonEmitUv_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonEmitVisible_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonReleaseIr_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonReleaseMicrowave_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonReleaseUv_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/photonReleaseVisible_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/rotationClockwiseSlowMotion_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/rotationClockwise_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/rotationCounterclockwiseSlowMotion_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/rotationCounterclockwise_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/vibrationSlowMotion_mp3.js
>> Unused sounds module: greenhouse-effect/sounds/vibration_mp3.js
>> Unused mipmaps module: greenhouse-effect/mipmaps/flashlight_png.js
>> Unused mipmaps module: greenhouse-effect/mipmaps/infraredSource_png.js
>> Unused mipmaps module: greenhouse-effect/mipmaps/microwaveSource_png.js
>> Unused mipmaps module: greenhouse-effect/mipmaps/uvSource_png.js
>> Unused string: key=screen.micro, value=Micro
>> Unused string: key=fluxMeter.sunlight, value=Sunlight
>> Unused string: key=fluxMeter.infrared, value=Infrared
>> Unused string: key=QuadWavelengthSelector.Microwave, value=Microwave
>> Unused string: key=QuadWavelengthSelector.Infrared, value=Infrared
>> Unused string: key=QuadWavelengthSelector.Visible, value=Visible
>> Unused string: key=QuadWavelengthSelector.Ultraviolet, value=Ultraviolet
>> Unused string: key=QuadWavelengthSelector.HigherEnergy, value=Higher Energy
>> Unused string: key=molecularNamePattern, value={0} ({1})
>> Unused string: key=ControlPanel.CarbonMonoxide, value=Carbon Monoxide
>> Unused string: key=ControlPanel.Nitrogen, value=Nitrogen
>> Unused string: key=ControlPanel.Oxygen, value=Oxygen
>> Unused string: key=ControlPanel.CarbonDioxide, value=Carbon Dioxide
>> Unused string: key=ControlPanel.Methane, value=Methane
>> Unused string: key=ControlPanel.NitrogenDioxide, value=Nitrogen Dioxide
>> Unused string: key=ControlPanel.Ozone, value=Ozone
>> Unused string: key=ControlPanel.Water, value=Water
>> Unused string: key=ButtonNode.ReturnMolecule, value=Reset Molecule
>> Unused string: key=SpectrumWindow.buttonCaption, value=Light Spectrum Diagram
>> Unused string: key=SpectrumWindow.title, value=Light Spectrum
>> Unused string: key=SpectrumWindow.frequencyArrowLabel, value=Increasing frequency and energy
>> Unused string: key=SpectrumWindow.wavelengthArrowLabel, value=Increasing wavelength
>> Unused string: key=SpectrumWindow.radioBandLabel, value=Radio
>> Unused string: key=SpectrumWindow.microwaveBandLabel, value=Microwave
>> Unused string: key=SpectrumWindow.infraredBandLabel, value=Infrared
>> Unused string: key=SpectrumWindow.ultravioletBandLabel, value=Ultra-
>> violet
>> Unused string: key=SpectrumWindow.xrayBandLabel, value=X-ray
>> Unused string: key=SpectrumWindow.gammaRayBandLabel, value=Gamma
>> ray
>> Unused string: key=SpectrumWindow.visibleBandLabel, value=Visible
>> Unused string: key=SpectrumWindow.cyclesPerSecondUnits, value=Hz
>> Unused string: key=SpectrumWindow.metersUnits, value=m
>> Unused string: key=openSciEd.energySource, value=Energy from Earth’s Surface
>> Unused string: key=a11y.energyLegend.sunlightRadiation, value=Sunlight radiation: yellow waves, wavelength shorter than infrared
>> Unused string: key=a11y.energyLegend.infraredRadiation, value=Infrared radiation: red waves, wavelength longer than sunlight
>> Unused string: key=a11y.infraredRadiationRedirectingWithTemperaturePattern, value={{moreOrLess}} infrared radiation redirecting back to surface, now {{quantitativeTemperature}}.
>> Unused string: key=a11y.infraredRadiationEmittedFromSurfaceWithTemperaturePattern, value={{moreOrLess}} infrared radiation emitting from surface, now {{quantitativeTemperature}}.
>> Unused string: key=a11y.nowRelativeLevelOfConcentrationPattern, value=Now {{value}} levels of greenhouse gases.
>> Unused string: key=a11y.unchanged, value=unchanged
>> Unused string: key=a11y.warmingStatement, value=Warming.
>> Unused string: key=a11y.coolingStatement, value=Cooling.
>> Unused string: key=a11y.concentrationPanel.concentration.label, value=Concentration
>> Unused string: key=a11y.playAreaSummary, value=The Play Area is an observation window set up with a light source and a molecule. It has options for light source and molecule.
>> Unused string: key=a11y.controlAreaSummary, value=The Control Area has options for how fast the action happens in the observation window including buttons to pause and step forward. You can also access details about the light spectrum and reset the sim.
>> Unused string: key=a11y.dynamicPlayingScreenSummaryPattern, value=Currently, {{lightSource}} light source {{emissionDescription}} directly at {{target}}.
>> Unused string: key=a11y.dynamicPausedScreenSummaryPattern, value=Currently, {{playingState}}. {{lightSource}} light source {{emissionDescription}} directly at {{target}}.
>> Unused string: key=a11y.simIsPaused, value=sim is paused
>> Unused string: key=a11y.simIsPausedOnSlowSpeed, value=sim is paused on slow speed
>> Unused string: key=a11y.screenSummaryWithHintPattern, value={{summary}} Reset or change molecule.
>> Unused string: key=a11y.interactionHint, value=Turn light source on to explore.
>> Unused string: key=a11y.lightSource.buttonLabelPattern, value={{lightSource}} Light Source
>> Unused string: key=a11y.lightSource.buttonPressedHelpText, value=Turn light source off to stop photons.
>> Unused string: key=a11y.lightSource.buttonUnpressedHelpText, value=Turn light source on to start photons.
>> Unused string: key=a11y.lightSources, value=Light Sources
>> Unused string: key=a11y.isOffAndPoints, value=is off and points
>> Unused string: key=a11y.emitsPhotons, value=emits photons
>> Unused string: key=a11y.emitsPhotonsOnSlowSpeed, value=emits photons on slow speed
>> Unused string: key=a11y.photonEmitterOffDescriptionPattern, value={{lightSource}} light source is off and points directly at {{target}}.
>> Unused string: key=a11y.inactiveAndPassesPhaseDescriptionPattern, value={{lightSource}} photon passes through {{target}}.
>> Unused string: key=a11y.targetMoleculePattern, value={{photonTarget}} molecule
>> Unused string: key=a11y.absorptionPhaseBondsDescriptionPattern, value={{lightSource}} photon absorbed, bonds of {{photonTarget}} molecule {{excitedRepresentation}}.
>> Unused string: key=a11y.absorptionPhaseMoleculeDescriptionPattern, value={{lightSource}} photon absorbed, {{photonTarget}} molecule {{excitedRepresentation}}.
>> Unused string: key=a11y.breakApartPhaseDescriptionPattern, value={{lightSource}} photon absorbed, {{photonTarget}} molecule breaks into {{firstMolecule}} and {{secondMolecule}}.
>> Unused string: key=a11y.emissionPhaseDescriptionPattern, value=Absorbed  {{lightSource}} photon emitted from {{photonTarget}} molecule {{direction}}.
>> Unused string: key=a11y.bendUpAndDown, value=bend up and down
>> Unused string: key=a11y.stretchBackAndForth, value=stretch back and forth
>> Unused string: key=a11y.rotatesClockwise, value=rotates clockwise
>> Unused string: key=a11y.rotatesCounterClockwise, value=rotates counter-clockwise
>> Unused string: key=a11y.glowsString, value=glows
>> Unused string: key=a11y.breaksApart, value=breaks apart
>> Unused string: key=a11y.emptySpace, value=empty space
>> Unused string: key=a11y.lightSourceRadioButtonHelpText, value=Choose light source for observation window ordered low to high energy.
>> Unused string: key=a11y.molecules, value=Molecules
>> Unused string: key=a11y.moleculesRadioButtonHelpText, value=Choose molecule for observation window.
>> Unused string: key=a11y.moleculeButtonLabelPattern, value={{molecularName}}, {{molecularFormula}}, {{geometryTitle}}
>> Unused string: key=a11y.spectrumButtonLabel, value=Light Spectrum Diagram
>> Unused string: key=a11y.spectrumButtonDescription, value=Examine details of full light spectrum.
>> Unused string: key=a11y.spectrumWindowDescription, value=The Light Spectrum shows the relative energy of the different classifications of light waves as defined by their characteristic wavelengths (measured in meters) and frequencies (measured in Hertz or inverse seconds).
>> Unused string: key=a11y.spectrumWindowEnergyDescription, value=The order from lowest energy (lowest frequency and largest wavelength) to highest energy (highest frequency and smallest wavelength) is Radio, Microwave, Infrared, Visible, Ultraviolet, X-ray, and Gamma ray.
>> Unused string: key=a11y.spectrumWindowSinWaveDescription, value=A sine wave decreasing in wavelength (as measured by the distance from peak to peak) and increasing frequency (as measured by the number of waves per time interval) from Radio to Gamma Ray.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumLabel, value=Frequency and Wavelength Ranges
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumDescription, value=In detail, the frequency and wavelength ranges for each spectrum, listed from lowest to highest energy
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumRadioLabel, value=Radio, large range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumMicrowaveLabel, value=Microwave, medium range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumInfraredLabel, value=Infrared, medium range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumVisibleLabel, value=Visible, tiny range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumUltravioletLabel, value=Ultraviolet, small range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumXRayLabel, value=X-ray, medium range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumGammaRayLabel, value=Gamma ray, medium range:
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumRadioFrequencyDescription, value=Frequencies less than 10 to the 4 Hertz to 10 to the 9 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumRadioWavelengthDescription, value=Wavelengths greater than 10 to the 4 meters to 5 times 10 to the negative 1 meters.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumMicrowaveFrequencyDescription, value=Frequencies 10 to the 9 to 5 times 10 to the 11 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumMicrowaveWavelengthDescription, value=Wavelengths 10 to the negative 1 to 10 to the negative 3 meters.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumInfraredFrequencyDescription, value=Frequencies 5 times 10 to the 11 to 4 times 10 to the 14 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumInfraredWavelengthDescription, value=Wavelengths 10 to the negative 3 to 7 times 10 to the negative 7 meters.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumVisibleFrequencyDescription, value=Frequencies 4 times 10 to the 14 to 7 times 10 to the 14 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumVisibleWavelengthDescription, value=Wavelengths 7 times 10 to the negative 7 to 4 times 10 to the negative 7 meters.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumVisibleGraphicalDescription, value=Shown as a rainbow starting with red and ending with violet (red, yellow, green, blue, indigo, violet).
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumUltravioletFrequencyDescription, value=Frequencies 10 to the 15 to 10 to the 16 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumUltravioletWavelengthDescription, value=Wavelengths 4 times 10 to the negative 7 to 10 to the negative 8 meters.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumXRayFrequencyDescription, value=Frequencies 10 to the 16 to 10 to the 19 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumXRayWavelengthDescription, value=Wavelengths 10 to the negative 8 to 5 times 10 to the negative 11 meters.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumGammaRayFrequencyDescription, value=Frequencies 10 to the 19 Hertz to greater than 10 to the 20 Hertz.
>> Unused string: key=a11y.spectrumWindowLabelledSpectrumGammaRayWavelengthDescription, value=Wavelengths 5 times 10 to the negative 11 meters to less than 10 to the negative 12 meters.
>> Unused string: key=a11y.carbonMonoxide, value=Carbon Monoxide
>> Unused string: key=a11y.nitrogen, value=Nitrogen
>> Unused string: key=a11y.oxygen, value=Oxygen
>> Unused string: key=a11y.diatomicOxygen, value=Diatomic Oxygen
>> Unused string: key=a11y.carbonDioxide, value=Carbon Dioxide
>> Unused string: key=a11y.nitrogenDioxide, value=Nitrogen Dioxide
>> Unused string: key=a11y.water, value=Water
>> Unused string: key=a11y.ozone, value=Ozone
>> Unused string: key=a11y.methane, value=Methane
>> Unused string: key=a11y.linear, value=linear
>> Unused string: key=a11y.bent, value=bent
>> Unused string: key=a11y.tetrahedral, value=tetrahedral
>> Unused string: key=a11y.diatomic, value=diatomic
>> Unused string: key=a11y.geometryLabelPattern, value=This molecule has {{geometry}} geometry.
>> Unused string: key=a11y.linearGeometryDescription, value=Linear, a molecule with two or three atoms bonded to form a straight line. Bond angle is 180 degrees.
>> Unused string: key=a11y.bentGeometryDescription, value=Bent, molecule with a central atom bonded to two other atoms that form an angle. Bond angle varies below 120 degrees.
>> Unused string: key=a11y.tetrahedralGeometryDescription, value=Tetrahedral, molecule with a central atom bonded to four other atoms forming a tetrahedron with 109.5° angles between them, like four-sided dice.
>> Unused string: key=a11y.shortStretchingAlert, value=Stretching.
>> Unused string: key=a11y.longStretchingAlert, value=Bonds of molecule stretch back and forth.
>> Unused string: key=a11y.shortBendingAlert, value=Bending.
>> Unused string: key=a11y.longBendingAlert, value=Bonds of molecule bend up and down.
>> Unused string: key=a11y.shortRotatingAlert, value=Rotating.
>> Unused string: key=a11y.longRotatingAlert, value=Molecule rotates.
>> Unused string: key=a11y.shortGlowingAlert, value=Glowing.
>> Unused string: key=a11y.longGlowingAlert, value=Molecule glows.
>> Unused string: key=a11y.breaksApartAlertPattern, value=Molecule breaks apart into {{firstMolecule}} and {{secondMolecule}}.
>> Unused string: key=a11y.pausedEmittingPattern, value=Absorbed photon emitted from molecule {{direction}}.
>> Unused string: key=a11y.pausedPassingPattern, value={{lightSource}} photon passes through {{molecularName}} molecule.
>> Unused string: key=a11y.slowMotionPassingPattern, value={{lightSource}} photons passing through {{molecularName}} molecule.
>> Unused string: key=a11y.photonPasses, value=Photon passes.
>> Unused string: key=a11y.photonsPassing, value=Photons passing.
>> Unused string: key=a11y.slowMotionVibratingPattern, value=Photon absorbed. Bonds of molecule {{excitedRepresentation}}.
>> Unused string: key=a11y.slowMotionAbsorbedMoleculeExcitedPattern, value=Photon absorbed. Molecule {{excitedRepresentation}}.
>> Unused string: key=a11y.slowMotionAbsorbedShortPattern, value=Photon absorbed. {{excitedRepresentation}}
>> Unused string: key=a11y.slowMotionBreakApartPattern, value=Photon absorbed. Molecule breaks apart. {{firstMolecule}} and {{secondMolecule}} float away.
>> Unused string: key=a11y.moleculesFloatingAwayPattern, value={{firstMolecule}} and {{secondMolecule}} floating away.
>> Unused string: key=a11y.breakApartDescriptionWithFloatPattern, value={{description}} {{floatDescription}}
>> Unused string: key=a11y.moleculePiecesGone, value=Molecule pieces gone. Reset or change molecule.
>> Unused string: key=a11y.slowMotionEmittedPattern, value=Photon emitted {{direction}}.
>> Unused string: key=a11y.resetOrChangeMolecule, value=Reset or change molecule.
>> Unused string: key=a11y.photonEmitter.alerts.photonsOff, value=Photons off.
>> Unused string: key=a11y.photonEmitter.alerts.photonsOn, value=Photons on.
>> Unused string: key=a11y.photonEmitter.alerts.photonsOnSlowSpeed, value=Photons on slow speed.
>> Unused string: key=a11y.photonEmitter.alerts.photonsOnSimPaused, value=Photons on. Sim paused.
>> Unused string: key=a11y.photonEmitter.alerts.photonsOnSlowSpeedSimPaused, value=Photons on slow speed. Sim paused.
>> Unused string: key=a11y.photonEmitter.alerts.pausedPhotonEmittedPattern, value={{lightSource}} photon leaves light source.
>> Unused string: key=a11y.timeControls.simPausedEmitterOffAlert, value=Sim paused. Light source off.
>> Unused string: key=a11y.timeControls.simPlayingHintAlert, value=Turn light source on to play sim.
>> Unused string: key=a11y.timeControls.playPauseButtonPlayingWithSpeedDescription, value=Pause sim to step forward little by little, or keep playing sim at chosen sim speed.
>> Unused string: key=a11y.timeControls.playPauseButtonPausedWithSpeedDescription, value=Step forward little by little, or play sim at chosen sim speed.
>> Unused string: key=a11y.timeControls.stepHintAlert, value=Turn light source on to use Step Forward.
@jbphet
Copy link
Contributor

jbphet commented Jul 14, 2023

The list above is long, and I didn't want to try to go through them individually, so I temporarily added back the "Micro" screen and ran a build. Below is the list of unused resources - all strings - that resulted from that build.

>> Unused string: key=fluxMeter.sunlight, value=Sunlight
>> Unused string: key=fluxMeter.infrared, value=Infrared
>> Unused string: key=a11y.energyLegend.sunlightRadiation, value=Sunlight radiation: yellow waves, wavelength shorter than infrared
>> Unused string: key=a11y.energyLegend.infraredRadiation, value=Infrared radiation: red waves, wavelength longer than sunlight
>> Unused string: key=a11y.infraredRadiationRedirectingWithTemperaturePattern, value={{moreOrLess}} infrared radiation redirecting back to surface, now {{quantitativeTemperature}}.
>> Unused string: key=a11y.infraredRadiationEmittedFromSurfaceWithTemperaturePattern, value={{moreOrLess}} infrared radiation emitting from surface, now {{quantitativeTemperature}}.
>> Unused string: key=a11y.nowRelativeLevelOfConcentrationPattern, value=Now {{value}} levels of greenhouse gases.
>> Unused string: key=a11y.unchanged, value=unchanged
>> Unused string: key=a11y.warmingStatement, value=Warming.
>> Unused string: key=a11y.coolingStatement, value=Cooling.
>> Unused string: key=a11y.concentrationPanel.concentration.label, value=Concentration

I have removed all of these string and regression tested Molecules and Light and Greenhouse Effect (mostly just launched them and poked around a bit). They seem fine. A build with these strings removed and the "Micro" screen present now shows no unused resources.

Unfortunately most of the items on this list will still show up until the Micro screen is integrated with Greenhouse Effect, which will probably be a while. However, I don't think there is much to be done about it, so I'm going to go ahead and close this.

@jbphet jbphet closed this as completed Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants