Closed leccio closed 1 week ago
@leccio
Are you seeing this on web platform ?
If so, can you provide flutter doctor -v
? A couple of related issues were fixed earlier this year that you can check and confirm.
https://github.com/flutter/flutter/issues/143852 https://github.com/flutter/flutter/issues/132264
@darshankawar no I am on mobile, both ios and android, the screen reader reads everything with the correct language except for the ExpansionTile widget which for some reason is reads the state always in English.
Below the flutter doctor -v
`[✓] Flutter (Channel stable, 3.22.3, on macOS 14.6.1 23G93 darwin-arm64, locale en-IT)
• Flutter version 3.22.3 on channel stable at /Users/cdottor001/fvm/versions/3.22.0
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision b0850beeb2 (6 weeks ago), 2024-07-16 21:43:41 -0700
• Engine revision 235db911ba
• Dart version 3.4.4
• DevTools version 2.34.3
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/cdottor001/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• ANDROID_HOME = /Users/cdottor001/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2024.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
[✓] VS Code (version 1.92.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.94.0
[✓] Connected device (3 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.6.1 23G93 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 128.0.6613.86
! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area
network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
• All expected network resources are available.
• No issues found!`
Thanks for the update. I verified this on iOS by changing device language to Spanish for example, and then tapping on ExpansionTile reads most of the text in Spanish, but the state of the Tile is read in English, for example:
Collapsed, double tap to expand
. Whereas, it should read the entire text in Spanish. Same goes for the expanded state.
I also checked using SwitchListTile, with which the activate and deactivate states are properly read in Spanish.
Stable : 3.24.1
Master: 3.25.0-1.0.pre.169
You need to add locales to the app inorder to get the translation
e.g.
MaterialApp(
title: 'Localizations Sample App',
localizationsDelegates: [ // Need to add these
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
supportedLocales: [
Locale('en'), // English
Locale('es'), // Spanish
],
home: MyHomePage(),
);
@chunhtai it worked, thanks!
Steps to reproduce
Expected results
The screen reader should read "... expand for more details" in the current locale language
Actual results
The screen reader reads the last part of the message "... expand for more details" always in English, regardless of the current locale language.
Code sample
Code sample
```dart const ExpansionTile( title: Text('Testo scritto e letto in italiano'), subtitle: Text('Sottotitolo in italiano'), children:Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
Doctor output
```console [Paste your output here] ```