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

feat: disable language/translations selection #14539

Conversation

caybro
Copy link
Member

@caybro caybro commented Apr 29, 2024

What does the PR do

  • make it conditionally available for testing via Settings/Advanced/Enable translations
  • display a tooltip and infobox explaining the current and future situation
  • upon app start, force the language to "en" if the translations are not enabled; and suggest app restart when they get disabled

Fixes #14527

Affected areas

Settings/[Language,Advanced]

Screenshot of functionality (including design for comparison)

  • I've checked the design and this PR matches it

Defaults:
image

Advanced toggle:
image

Translations enabled:
image

@status-im-auto
Copy link
Member

status-im-auto commented Apr 29, 2024

Jenkins Builds

Click to see older builds (3)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ d76b0aa #1 2024-04-29 12:31:03 ~6 min macos/aarch64 🍎dmg
✔️ d76b0aa #1 2024-04-29 12:33:13 ~8 min tests/nim 📄log
✔️ d76b0aa #1 2024-04-29 12:35:05 ~10 min macos/x86_64 🍎dmg
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 89e9b28 #2 2024-04-29 12:39:58 ~4 min macos/aarch64 🍎dmg
✔️ 89e9b28 #2 2024-04-29 12:43:13 ~7 min macos/x86_64 🍎dmg
✔️ 89e9b28 #2 2024-04-29 12:44:57 ~9 min tests/nim 📄log
✔️ 89e9b28 #2 2024-04-29 12:51:39 ~15 min linux/x86_64 📦tgz
✔️ 89e9b28 #2 2024-04-29 12:52:51 ~16 min tests/ui 📄log
✔️ 89e9b28 #2 2024-04-29 13:10:08 ~34 min windows/x86_64 💿exe
✔️ ae6c4d8 #3 2024-04-29 13:59:56 ~4 min macos/aarch64 🍎dmg
✔️ ae6c4d8 #3 2024-04-29 14:01:12 ~5 min tests/nim 📄log
✔️ ae6c4d8 #3 2024-04-29 14:02:45 ~7 min macos/x86_64 🍎dmg
✔️ ae6c4d8 #3 2024-04-29 14:12:46 ~17 min tests/ui 📄log
✔️ ae6c4d8 #3 2024-04-29 14:13:16 ~17 min linux/x86_64 📦tgz
✔️ ae6c4d8 #3 2024-04-29 14:26:53 ~31 min windows/x86_64 💿exe

@caybro caybro force-pushed the 14527-disable-language-selector-set-english-as-default-language-and-add-option-in-advanced-settings-to-manually-enable-its-visualization branch from d76b0aa to 89e9b28 Compare April 29, 2024 12:35

Button {
StatusButton {
Copy link
Member Author

Choose a reason for hiding this comment

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

The main purpose here is to allow having a tooltip over a disabled (non-interactive) button

width: 20
height: 20
imgIsIdenticon: false
}

enum Type {
enum PickerType {
Copy link
Member Author

Choose a reason for hiding this comment

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

Fixing enum name clash

y: parent.height + Style.current.padding
margins: 0
visible: !root.languageSelectionEnabled && languagePicker.button.hovered
orientation: StatusToolTip.Orientation.Bottom
Copy link
Member Author

@caybro caybro Apr 29, 2024

Choose a reason for hiding this comment

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

Can't put the tooltip above the button... the z order is totally messed up here due to bad StatusListPicker design

Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

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

LGTM! Minor comment on the Learn more link

Tested

ui/app/AppLayouts/Profile/views/LanguageView.qml Outdated Show resolved Hide resolved
- make it conditionally available for testing via
Settings/Advanced/Enable translations
- display a tooltip and infobox explaining the current and future
situation
- upon app start, force the language to "en" if the translations are not
enabled; and suggest app restart when they get disabled

Fixes #14527
@caybro caybro force-pushed the 14527-disable-language-selector-set-english-as-default-language-and-add-option-in-advanced-settings-to-manually-enable-its-visualization branch from 89e9b28 to ae6c4d8 Compare April 29, 2024 13:55
@caybro caybro merged commit d0658fe into master Apr 30, 2024
8 checks passed
@caybro caybro deleted the 14527-disable-language-selector-set-english-as-default-language-and-add-option-in-advanced-settings-to-manually-enable-its-visualization branch April 30, 2024 11:25
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