Open pixelzoom opened 5 months ago
Fixed above. Thanks!
Reopening.
I recommend changing the subdirectory names to camelcase, to match the tokens used in code. Here's why:
After digging deeper into this for https://github.com/phetsims/graphing-lines/issues/143, I discovered that the supported region tokens (currently in RegionAndCulturePortrayal) use camelcase:
export const USA_REGION_AND_CULTURE_ID = 'usa';
export const AFRICA_REGION_AND_CULTURE_ID = 'africa';
export const AFRICA_MODEST_REGION_AND_CULTURE_ID = 'africaModest';
export const ASIA_REGION_AND_CULTURE_ID = 'asia';
export const LATIN_AMERICA_REGION_AND_CULTURE_ID = 'latinAmerica';
export const OCEANIA_REGION_AND_CULTURE_ID = 'oceania';
export const MULTICULTURAL_REGION_AND_CULTURE_ID = 'multi';
But the subdirectory names use dash separators instead of camelcase: images/africa-modest
, images/latin-america
.
Besides the confusion factor, and the fact that there's no good reason for these naming conventions to be different... If PhET ever wants to automate discovery of images, or use grunt modulify
to generate LocalizedImageProperty (analgous to LocalizedStringProperty), then life will be be a lot simpler if the same naming convention is used for tokens and directory names.
In soccer-common, I see:
In all other sims with this region, I see:
Is there a naming convention that soccer-common (and hence CAV) is not following? This caused confusion when I was trying to help @amanda-phet set up images/ subdirectories for another sim.