SRGSSR / srgappearance-apple

The appearance toolbox for SRG SSR applications
MIT License
0 stars 1 forks source link

Weight adjustments not working on devices with language not set to English #10

Closed defagos closed 2 years ago

defagos commented 2 years ago

On devices set to a language different from English weight adjustments do not work. This is because the variation axis name is localized and we are looking for Weight. For example on a device set to French:

{
    NSCTVariationAxisDefaultValue = 500;
    NSCTVariationAxisIdentifier = 2003265652;
    NSCTVariationAxisMaximumValue = 900;
    NSCTVariationAxisMinimumValue = 300;
    NSCTVariationAxisName = "\U00c9paisseur";
}

Issue type

Incorrect behavior

Environment information

Reproducibility

Always reproducible

Steps to reproduce

  1. Run the demo on a device set to French, e.g.
  2. Open the playground and change the weight. Nothing happens.
  3. Set the language to English and repeat. Now weight changes are applied correctly.
defagos commented 2 years ago

Fixed on feature/variation-axis-fix.