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

Follow up of #34853 - The metric index value isn't matches the primary language set in the browser #36529

Closed
GeetaSarvadnya opened this issue Mar 4, 2024 · 3 comments

Comments

@GeetaSarvadnya
Copy link

Description

Follow up of #34853 - The metric value index isn't matches the primary language set in the browser

Steps to Reproduce

  1. Clean profile 1.64.x
  2. Open brave://local-state
  3. Look for the metrics Brave.Core.PrimaryLang
  4. Confirmed that the metrics Brave.Core.PrimaryLang is shown under logs_constellation_prep_slow and constellation_logs_slow blocks
  5. The metrics Brave.Core.PrimaryLang value 37 corresponds to Azerbaijani but the primary language set at the browser English (United States)
step 4 step 4 (1)
image image

Actual result:

The metrics Brave.Core.PrimaryLang value 37 corresponds to Azerbaijani but the primary language set at the browser English (United States)

Example Example
image image

Expected result:

The metric index value should match the primary language set in the browser

Reproduces how often:

Easy

Brave version (brave://version info)

Version/Channel Information:

  • Can you reproduce this issue with the current release? NA
  • Can you reproduce this issue with the beta channel? Yes
  • Can you reproduce this issue with the nightly channel? Yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? NA
  • Does the issue resolve itself when disabling Brave Rewards? NA
  • Is the issue reproducible on the latest version of Chrome? NA

Miscellaneous Information:

cc: @brave/qa-team @mattmcalister @DJAndries

@GeetaSarvadnya
Copy link
Author

Similarly, If I set the browser language as Marathi I get the metrics Brave.Core.PrimaryLang response value as 106 but the index value corresponds to Marathi language is 133 via brave-core/components/misc_metrics/language_metrics.cc

Example Example Example
image image image

@DJAndries
Copy link
Collaborator

@GeetaSarvadnya You will want to refer to the actual index within kOrderedLangCodes, rather than the line number. If you'd like to use the line number, you could subtract 26 from the line number to get the index. If the language occurs after line 55, subtract 1 in addition to account for the comment on line 55.

@GeetaSarvadnya
Copy link
Author

Thanks @DJAndries !
Verified the issue again on Windows 10 x64 1.64.90 , comparing the actau langcodes matching with reponse value and browser language. It's working as expected

English:

langcodes local state browser language
image image image

Germany:

langcodes local state browser language
image image image

France:

langcodes local state browser language
image image image

Kannada:

langcodes local state browser language
image image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants