apache / cordova-android

Apache Cordova Android
https://cordova.apache.org/
Apache License 2.0
3.59k stars 1.52k forks source link

Mixed translations for native date picker on Android #1684

Closed mciupka-dibit closed 5 months ago

mciupka-dibit commented 5 months ago

Bug Report

Problem

What is expected to happen?

The translation of the date picker should be completely in German.

What does actually happen?

2 buttons of the date picker are translated into English. The rest is German.

Samsung S23 App Debug

Information

Create new cordova project: "cordova create example-project" Add platform: "cordova platform add android@latest" At the example www folder: index.html: Insert cordova run android Click on datepicker The datepicker looks like the image above. The buttons marked with red circles are translated to english. Expected behaviour: Buttons have the same language (german) than the rest.

Environment, Platform, Device

Devices with error: Samsung Galaxy S23 / Samsung Galaxy S22 Android 14 One UI 6.0

Devices with no error: Samsung Galaxy XCover Pro Android 13 One UI 5.1

Seems to ab an issue with Android 14. Tested with language German (Germany). Please be aware that the emulator shows the correct translations. Only happens on real devices. The devices have the standard configuration and there are no language addons etc. active.

Checklist

breautek commented 5 months ago

This is likely an issue with the underlying webview rather than Cordova itself.

Cordova doesn't implement a date picker or any other HTML-DOM features, nor does it have any translations; that's provided by the webview. Some plugins may implement native UI but that doesn't seem to be the case here.

Since you have 2 Samsung devices where one exhibits the issue and the other doesn't. I'd start by recording the current Android System Webview version of both devices, then ensure both are up to date and at the same webview version. Android 13 and Android 14 devices both should have access to the same webview via Google Play. Then we can determine if the issue is either fixed, or if one breaks, either way I'd expect they will have consistent behaviour at this point.

Moving this issue to the cordova-android repo.

mciupka-dibit commented 5 months ago

Samsung Galaxy S23 Android System Webview: Version 119.0.6045.67 => Problem exists Samsung Galaxy XCover Pro Android System Webview: 115.0.5790.166 => No Problem

Samsung Galaxy XCover Pro Android System Webview: UPDATE to 119.0.6045.163 => Problem exists

Issue seems not to be fixed

breautek commented 5 months ago

Yes, it does seem to have been recently introduced by the webview, as you can observe going from 115 to 119 breaks the language. It would probably be best to report your findings at https://bugs.chromium.org/p/chromium/issues/list

Please be aware that the emulator shows the correct translations. Only happens on real devices.

On this note, your current observations may also explain why it doesn't reproduce on the simulators. Android simulators ships with AOSP android, so they tend to have a really old version of the webview installed. If you install a Google Play enabled simulator with a Google Play enabled image, then the simulator will have Google Play and behave more closely to a retail device. You'll have the ability to login to a google account and update the webview to the latest version available. If you do this, I'd suspect you'll also observe the language issue on the simulator.

mciupka-dibit commented 5 months ago

Thanks. I will report the issue there.

Here is the issue: https://bugs.chromium.org/p/chromium/issues/detail?id=1504549

jcesarmobile commented 5 months ago

closing since it's a bug in the WebView and it's already reported on the chromium repository, follow the linked issue for updates