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

Tab Switcher Animation: Translations #5724

Conversation

mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Mar 3, 2025

Task/Issue URL: https://app.asana.com/0/1207908166761516/1209560463368002

Description

Added localized strings for tracker blocking statistics animation in the tab switcher across multiple languages. The strings display the number of trackers blocked in the last 7 days.

Steps to test this PR

Verify translations

  • Switch device language to different supported locales and verify the tracker blocking statistics text appears correctly
  • Verify placeholder formatting works correctly with different numeric values
  • Check that HTML formatting (bold tags) renders properly across languages

Verify string usage

  • Open tab switcher and confirm tracker blocking statistics are displayed
  • Verify the "in the last 7 days" text appears correctly below the main statistics

Copy link
Contributor Author

mikescamell commented Mar 3, 2025

@mikescamell mikescamell changed the title Tab Switcher Tile Animation: Translations Tab Switcher Animation: Translations Mar 3, 2025
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/translations branch from c60974a to fa5ceaf Compare March 4, 2025 14:23
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from f4309c1 to c5263f4 Compare March 4, 2025 14:23
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from c5263f4 to b005223 Compare March 6, 2025 17:16
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/translations branch 2 times, most recently from 6b63d29 to a5c2d0d Compare March 6, 2025 18:07
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from b005223 to 4fe8ab9 Compare March 6, 2025 18:08
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/translations branch from a5c2d0d to faeee79 Compare March 7, 2025 07:50
@0nko 0nko self-assigned this Mar 7, 2025
Copy link
Member

@0nko 0nko left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/translations branch from da791c6 to 4196975 Compare March 11, 2025 08:52
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from 1fcf730 to aab5219 Compare March 11, 2025 08:52
Comment on lines +87 to +88
val formattedTrackerCount = trackerCountNumberFormatter.format(trackerCount)
val text = context.getString(stringRes, formattedTrackerCount)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@0nko We're adding a change to format the string based on Locale, e.g. 1000 becomes 1,000

I added it here so we can get all the properly translated strings

@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from aab5219 to 8aa0824 Compare March 12, 2025 10:19
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/translations branch 2 times, most recently from ee7bb0e to a66cf46 Compare March 12, 2025 15:08
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from 8aa0824 to f2828b6 Compare March 12, 2025 15:08
daxmobile and others added 18 commits March 17, 2025 17:26
We want to add commas or whatever is appropriate to the number for cases where it goes to 1,000 and above
Translate strings to values-es
Translate strings to values-ro
Translate strings to values-tr
Translate strings to values-sk
Translate strings to values-ru
Translate strings to values-et
Translate strings to values-it
Translate strings to values-pl
Translate strings to values-bg
Translate strings to values-lv
Translate strings to values-fi
Translate strings to values-sl
Translate strings to values-nl
Translate strings to values-hr
Translate strings to values-hu
Translate strings to values-nb
Translate strings to values-sv
Translate strings to values-da
Translate strings to values-el
Translate strings to values-fr
Translate strings to values-lt
Translate strings to values-pt
Translate strings to values-cs
Translate strings to values-cs
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from f2828b6 to bf8dd2b Compare March 17, 2025 17:28
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/translations branch from 52a92a5 to 406b808 Compare March 17, 2025 17:28
daxmobile and others added 2 commits March 17, 2025 13:46
Translate strings to values-es
Translate strings to values-ro
Translate strings to values-tr
Translate strings to values-sk
Translate strings to values-ru
Translate strings to values-et
Translate strings to values-it
Translate strings to values-pl
Translate strings to values-bg
Translate strings to values-lv
Translate strings to values-fi
Translate strings to values-sl
Translate strings to values-nl
Translate strings to values-hr
Translate strings to values-hu
Translate strings to values-nb
Translate strings to values-sv
Translate strings to values-da
Translate strings to values-el
Translate strings to values-fr
Translate strings to values-lt
Translate strings to values-pt
Translate strings to values-cs
Task/Issue URL:
https://app.asana.com/0/1207908166761516/1209368500700767

### Description

Added show/hide logic for the animated tile. The tile appears when users
have blocked at least 10 trackers and have 2 or more tabs open.

Once visible the tile does not get removed unless:
- The user dismisses it
- The user clears data either manually or automatically through data
clearing settings

Once dismissed, the tile will not reappear until explicitly re-enabled
or reset through dev settings.

### Steps to test this PR

Pre-requisites: `tabSwitcherAnimation` feature toggle is turned on 

_Tab Switcher Animated Tile Showing_
- [x] Open the TabSwitcher
- [x] The animated tile should not should be visible
- [x] Open a website in the new tab (bbc.com for example)
- [x] Add another tab and open another website (cnn.com for example)
- [x] Open the TabSwitcher
- [x] The Animation Tile should be visible
- [x] If it's not visible it is probably because you do not have enough
trackers. Open another website in either one of the tabs (ign.com for
example)
- [x] The Animation Tile should now be visible and display the tracker
count

_Tab Switcher Animated Tile Stays Visible Once Seen_
- [x] Delete one of the tabs
- [x] The animated tile should still be visible
- [x] Leave the Tab Switcher
- [x] Re-enter
- [x] The animated tile should still be visible

_Tab Switcher Animated Tile Dismissal_
- [x] Dismiss the animated tile
- [x] Leave the Tab Switcher
- [x] Re-enter
- [x] The animated tile should not be visible

_Tab Switcher Animated Tile Clearing Data_
- [x] Go to Dev Settings 
- [x] Click "Reset TabSwitcher Animated Tile"
- [x] Open the TabSwitcher
- [x] Open a new tab and load a website
- [x] Go back to the TabSwitcher
- [x] The animated tile should be visible
- [x] Open Settings
- [x] Open Data Clearing 
- [x] Click "Automatically Clear Data"
- [x] Select "App exit only"
- [x] Leave Settings
- [x] Exit the app
- [x] Swipe the app away from recents
- [x] Open the app 
- [x] Open the Tab Switcher
- [x] The animated tile and all tabs should no longer exist

_Tab Switcher Animated Tile Show Again After  Clearing Data_
- [x] Repeat steps for _Tab Switcher Animated Tile Showing_
- [x] Animated tile should show again

_Tab Switcher Animated Tile Close All Tabs_
- [x] Open the TabSwitcher
- [x] The animated tile should be visible
- [x] Press the overflow menu button 
- [x] Click "Close All Tabs" 
- [x] Click "Close" in the dialog
- [x] The animated tile and all tabs should no longer exist

_Tab Switcher Animated Tile Show Again After Close Tabs_
- [x] Repeat steps for _Tab Switcher Animated Tile Showing_
- [x] Animated tile should show again

### Demo


https://github.com/user-attachments/assets/2652888b-80fa-45de-b3df-10d59eb54e29
@mikescamell mikescamell merged commit 9787f01 into feature/mike/tab-switcher-tile-animation/display-real-tracker-count Mar 17, 2025
4 of 5 checks passed
@mikescamell mikescamell deleted the feature/mike/tab-switcher-tile-animation/translations branch March 17, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants