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

The name of the unit for the font size in the formatting information provided by NVDA is not localized #13573

Closed
k-kolev1985 opened this issue Apr 2, 2022 · 5 comments · Fixed by #13575
Labels
good first issue github features these at https://github.com/nvaccess/nvda/contribute triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@k-kolev1985
Copy link

Steps to reproduce:

  1. Start NVDA.
  2. Switch NVDA's interface language from english to another one (preferably one that you are familiar with) and restart NVDA when prompted.
  3. Open a text editor like Notepad or a similar one, from which text formatting information can be retrieved by NVDA.
  4. Type some text in it.
  5. Move the system caret on one of the typed characters.
  6. Invoke the NVDA script for reporting formatting information (e.g. NVDA+F for the desktop keyboard layout).
  7. Press the same command twice, to display the information in a browse mode window.
  8. Observe how NVDA reports the information, specially the name of the font size unit.

Actual behavior:

NVDA reports the font size unit in english as "pt" (which means "points"), instead of in the language in which NVDA is set to.

Expected behavior:

NVDA should report the font size unit in the language in NVDA's interface language is set to.

System configuration

  • Operating system: Windows 11 Pro version 21H2 (build 22000.556), 64-bit, in Bulgarian with all locale settings set to "Bulgarian".
  • NVDA version: alpha-25159,c4466885, 2021.3.5 (both set to "Bulgarian").
  • Processor: Intel Core i5-9400F at 2.90GHz.
  • RAM Memory: 16.00GB.
  • Graphics: MSI GeForce GTX-1050TI Gaming X 4G, 4096MB dedicated memory, desktop resolution set to 1920x1080.
  • Sound Card: Realtek ALC892 at Intel Cannon Point PCH.

Other questions

Does the issue still occur after restarting your computer?

Yes, it does.

Have you tried any other versions of NVDA? If so, please report their behaviors.

Both the latest alpha build and 2021.3.5 behave the same.

If NVDA add-ons are disabled, is your problem still occurring?

Yes, it is.

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

I haven't tried it, because the issues that the COM Registration Fixing Tool aims to fix are not related to the issue I'm describing here.

@CyrilleB79
Copy link
Collaborator

In notepad (at least on Windows 10), there is no such formatting information.
However in WordPad or MS Word, there is this information.

On my system, I have no translation issue since I am using NVDA in French; in this language, the unit is also called "point' and the abbreviation "pt" is used for it. It can be seen in Word when you get information for a style from the style management window.

As an example, could you please indicate what would be the translated abbreviation in Bulgarian? I imagine it is written in Cyrillic? Are you able to see this abbreviation written somewhere, e.g. in Word's style definition?

@k-kolev1985
Copy link
Author

In bulgarian, the abbreviated variant of the font size unit is "пкт". The whole word is "пункта", which means "points".

I thought that the information might be extracted directly (including locale names) from the program in which the command for formatting information is requested and therefore the issue might be caused by broken bulgarian localization in the specific program, but this occurs in every program that I've tested (both built-in and external ones) and this makes this theory highly unlikely. Unless, the information, although taken from the specific program, is provided by the system on a system level and the bulgarian localization for this is broken on a system level. But to be honest, I doubt it - I think this is just hard-coded in NVDA and it is not localizable at the moment.

@CyrilleB79
Copy link
Collaborator

Yes, I have seen that it is hard-coded and not localizable in NVDA, at least for some applications or interface. I think that it could be localized quite easily.

This issue may be a good canditate for labels such as "good for new dev" or "good first issue".
Cc @seanbudd, @feerrenrut.

If no one volunteers to fix this issue, I may have a look at it when I have more time. Feel free to ping me again.

@gregjozk
Copy link
Contributor

gregjozk commented Apr 3, 2022

in slovenian there is simular problem.
tested in web browsers, word etc.
this bug exist a longtime, but users easily dismiss it during hard work.
simular bug is in word on "page break". this string is translatable and in slovenian translated, but when UIA is disabled for word, NVDA still speaks page break...

@CyrilleB79
Copy link
Collaborator

@gregjozk you write:

simular bug is in word on "page break". this string is translatable and in slovenian translated, but when UIA is disabled for word, NVDA still speaks page break...

A similar bug, yes, but maybe not with the same type of cause.
In French, "page break" is localized; tested in Word.
Thus if you want to have the "page break" untranslated issue looked at, you should open a separate issue for it.

@seanbudd seanbudd added the good first issue github features these at https://github.com/nvaccess/nvda/contribute label Apr 4, 2022
@feerrenrut feerrenrut added the triaged Has been triaged, issue is waiting for implementation. label Apr 12, 2022
seanbudd added a commit that referenced this issue Jun 17, 2022
Fixes #13573

Summary of the issue:
"pt" when reporting font size measurements is not translatable.
Font size measurements are reported inconsistently, for example in excel and PowerPoint are reported as "11.0" instead of "11 pt".

Description of how this pull request fixes the issue:
Makes the font size measurement "pt" translatable across APIs.

Browsers provide "font-size" attribute directly as "12pt|px|em|%|rem|ex" or "large", "small", etc.
This requires a more strategic approach for catching each font-size case and replacing it with a translated string.
Documentation has been added for this.
https://developer.mozilla.org/en-US/docs/Web/CSS/font-size
@nvaccessAuto nvaccessAuto modified the milestone: 2022.3 Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue github features these at https://github.com/nvaccess/nvda/contribute triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants