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 file tree view in FileBrowserWindow is not fully localized #1305

Closed
gexgd0419 opened this issue Oct 18, 2021 · 4 comments
Closed

The file tree view in FileBrowserWindow is not fully localized #1305

gexgd0419 opened this issue Oct 18, 2021 · 4 comments
Labels
Status: Fixed in Next Build Fixed in the next Sandboxie version Type: Localization Localization/translation issues User Interface Related to Plus and/or Classic UIs

Comments

@gexgd0419
Copy link
Contributor

Describe the bug
FileBrowserWindow is the window that shows the specified sandbox's content after you right click a sandbox then select Browse Content.

It contains a tree view that shows all files and subdirectories in the sandbox's directory. However, the column names and each item's "type" is always shown in English, as shown in the screenshot below.

image

My system language and the language set in Sandboxie are all Chinese Simplified.

  • The title ("DefaultBox - Files") is translated.
  • The column titles ("Name", "Size", "Type" and "Date Modified") are still in English.
  • The size of desktop.ini (218 bytes) is translated, but it follows the system language setting instead of Sandboxie's setting.
  • The item types are not translated. They are just "File Folder" or "<extension> File" in English.

From the code I can know that the tree view's content is provided by QFileSystemModel, but it's part of Qt library, so its strings won't appear in sandman's .ts files.

Sandboxie-Plus v0.9.8b

@DavidXanatos DavidXanatos added the User Interface Related to Plus and/or Classic UIs label Oct 18, 2021
@gexgd0419
Copy link
Contributor Author

Also I found that the Select Color dialog that shows up when you want to change the window border color is also always in English, except the OK and Cancel button.

image

It's QColorDialog, so the question is how to localize Qt's own components, I guess.

@DavidXanatos DavidXanatos added the Status: Fixed in Next Build Fixed in the next Sandboxie version label Oct 19, 2021
@gexgd0419
Copy link
Contributor Author

In changelog you said that this was fixed in v0.9.8b.

I've installed that version, but these dialogs still seems to be only partially localized in Simplified Chinese.

image

@DavidXanatos
Copy link
Member

see the \translations folder i added all the original qt translations, i see that thay only provide zh_TW and not _zh_CN so that might be the issue here

@gexgd0419
Copy link
Contributor Author

gexgd0419 commented Oct 20, 2021

It seems that the locale names for Simplified Chinese and Traditional Chinese used inside Sandboxie have been changed from zh-CN and zh-TW to zh_CN to zh_TW respectively. (which caused #1317 btw)

And I found the reason why Qt's translations wouldn't apply. My "UiLanguage" is zh-CN, but all translation files now have names like zh_CN.qm, so it wouldn't load.

To localize the two dialog boxes mentioned in this issue, the only group of translation files required is the qt_<lang>.qm one. There are groups that don't have a zh-CN version, but qt_zh_CN.qm exists, so it can work.

However, after loading the Qt translation file correctly, those two dialogs are more, but still partially, localized.

image

image

The translations are contributed by the Qt community, so there are missing translations and even incorrect ones. For example,

  • There's no translation for "File Folder", "<extension> File", and "Pick Screen Color".
  • The translation for "Date Modified" literally says "the date is modified".

It's Qt's issue, not Sandboxie's issue, though.

P.S. Just found that Qt 6 has more complete translations. There's no plan to upgrade Sandboxie to Qt 6, but maybe we can just use Qt 6's translation files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Fixed in Next Build Fixed in the next Sandboxie version Type: Localization Localization/translation issues User Interface Related to Plus and/or Classic UIs
Projects
None yet
Development

No branches or pull requests

3 participants