Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Date Picker] ContentDescription for "DayName" is not properly getting read by talkback for the German language #3051

Conversation

kavitamp
Copy link
Contributor

@kavitamp kavitamp commented Oct 24, 2022

closes #3050

Description: The content description(Talkback) for the "day-name" is not properly getting read in the German language for the date picker dialog, for English, it is working fine but not for the German language.
For example: Sometimes dates are getting read as:

  • Mi, Zweite November instead of Mittwoch, zweite November
  • Du, drei, N.O.V. instead of Donnerstag, dritte November
  • Frau, vier, N.O.V instead of Freitag, vierte November
  • S.A, fünf, N.O.V instead of Samstag, fünfte November
  • So. sechs, N.O.V instead of Sonntag. sechste November
  • Mo, sieben, N.O.V instead of Montag, siebte November

Bug screen recording:

DatePicker.mp4

Expected behavior:
Dates should be getting read as:

  • Mittwoch, zweite November
  • Donnerstag, dritte November
  • Freitag, vierte November
  • Samstag, fünfte November
  • Sonntag. sechste November*
  • Montag, siebte November

Expected behavior after fixing the issue:

DatePickerFix.mp4

I have fixed the test cases of class DateStringsTest in the same MR as they were relevant to my changes and were failing.
Please let me know if you have any feedback.
Thank you!

@google-cla
Copy link

google-cla bot commented Oct 24, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@kavitamp
Copy link
Contributor Author

Hi @pekingme,
Can you take a look at this MR?
Thanks!

@raajkumars
Copy link
Contributor

Thanks for the PR. Looking at the changes, I am wondering if this PR will affect the talkback for other languages such as English. Can you provide a before and after video recording for English?

@kavitamp
Copy link
Contributor Author

kavitamp commented Nov 8, 2022

Hi @raajkumars,
Thanks for your reply.
It should not affect the talkback for other languages as in my PR I have used a complete date format (MONTH_WEEKDAY_DAY) instead of the abbreviation(ABBR_MONTH_WEEKDAY_DAY).

For example:
In the case of English,
MONTH_WEEKDAY_DAY, returns Wednesday, November 2 and
ABBR_MONTH_WEEKDAY_DAY returns Wed, November 2
here both of them are getting pronounced properly.

But specifically for the German language,
MONTH_WEEKDAY_DAY, returns Mittwoch, 2. November and
ABBR_MONTH_WEEKDAY_DAY returns Mi., 2. Nov

As ABBR_MONTH_WEEKDAY_DAY returns Mi instead of Mittwoch, it's not getting pronounced as Mittwoch(Please refer to the screen recordings) talkback just says Mi. But using the MONTH_WEEKDAY_DAY date format solves the issue for the German language and does not affect the English/other talkbacks as well.

Here's the recording for English language:

Before(Master-Branch):

Master-English-Talkback.mp4

With new changes:

MyBranch_English-Talkback.mp4

Thanks!

…nthWeekdayDayFormat`

`getYearAbbrMonthWeekdayDayFormat` to `getYearMonthWeekdayDayFormat`
As I'm not using Abbreviations
@drchen
Copy link
Contributor

drchen commented Nov 17, 2022

Paul, can you take a look at the PR?

@kavitamp
Copy link
Contributor Author

Hi @drchen @raajkumars
Can someone take a look at this?
Thanks!

@@ -56,13 +56,13 @@ public void frYearMonthDayString() {
startDate = setupLocalizedCalendar(locale, CURRENT_YEAR, 10, 30);
assertThat(
DateStrings.getYearMonthDay(startDate.getTimeInMillis(), locale),
is("30 nov. " + CURRENT_YEAR));
is("29 nov. " + CURRENT_YEAR));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand the reason for changing these dates, is it a timezone issue?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it looks like a timezone issue. These test cases were failing, so I have fixed them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @paulfthomas do you have any feedback/suggestions regarding this change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kavitamp, we are looking into some other i18n issues that may be related. Thanks again for your contribution!

@drchen drchen closed this in 35bd1fc Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants