getodk / collect

ODK Collect is an Android app for filling out forms. It's been used to collect billions of data points in challenging environments around the world. Contribute and make the world a better place! ✨📋✨
https://docs.getodk.org/collect-intro
Other
718 stars 1.38k forks source link

Datetime stamps use device locale, not Collect locale #6256

Open lognaturel opened 4 months ago

lognaturel commented 4 months ago

ODK Collect version

v2024.2.0

Android version

14, One UI 6.0

Device used

Galaxy A13

Problem description

When Collect fills in a datetime stamp to a string, it seems to use the device locale rather than the language set in Collect. This is at least the case for the savepoint recovery dialog and the subtext in the form menu screens (e.g. drafts listing).

Steps to reproduce the problem

  1. Set your device language to LanguageA
  2. Set the Collect language to LanguageB
  3. Start filling out a form, enter in some data
  4. Force close Collect
  5. Reopen Collect and the form you were filling
  6. See that the savepoint dialog shows the datetime in LanguageA

Expected behavior

The datetime should be in LanguageB

dbemke commented 2 months ago

Another example:

The gregorian date (21 Aug 2024) is displayed instead of (21 ago. 2024) if in Collect we use Spanish but English is set in the device.

ODK Collect version

the store version 2024.2.3, the master version https://github.com/getodk/collect/commit/30f759c4afb6ddabafc6b00ee7f7bbe62ed262cd

Steps to reproduce

  1. In the the device set English as a language.
  2. In Collect set Spanish.
  3. Go to All widgets form to e.g. coptic calendar