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

Localization and layout fixes #2763

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

tyiu
Copy link
Collaborator

@tyiu tyiu commented Dec 11, 2024

Summary

Disallow adding text with only whitespaces

Before After
Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 32 42 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 44 07 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 35 45

Fix AddMuteItemView to trim leading and trailing whitespaces from mute text

Before After
Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 36 32 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 41 06 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 36 32 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 36 45

Fix SideMenuView text to autoscale and limit to 1 line

Before After
Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 32 19 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 35 19

Fix GradientFollowButton to have consistent width and autoscale text limited to 1 line, Fix suggested users category titles to be localizable

Before After
Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 31 28 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 31 39 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 34 41 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 34 54

Fix right-to-left localization issues

Before After
Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 34 04 Simulator Screenshot - iPhone SE (3rd generation) - 2024-12-10 at 21 37 34

Checklist

  • I have read (or I am familiar with) the Contribution Guidelines
  • I have tested the changes in this PR
  • My PR is either small, or I have split it into smaller logical commits that are easier to review
  • I have added the signoff line to all my commits. See Signing off your work
  • I have added appropriate changelog entries for the changes in this PR. See Adding changelog entries
    • I do not need to add a changelog entry. Reason: [Please provide a reason]
  • I have added appropriate Closes: or Fixes: tags in the commit messages wherever applicable, or made sure those are not needed. See Submitting patches

Test report

Please provide a test report for the changes in this PR. You can use the template below, but feel free to modify it as needed.

Device: iPhone SE (3rd generation)

iOS: 18.1

Damus: 8ed2395

Setup: N/A

Steps:

Disallow adding text with only whitespaces

  1. Open side menu.
  2. Tap Muted.
  3. Tap + button on top right.
  4. Enter multiple whitespaces in the text entry.
  5. Observe that the Add mute item opacity decreases by 50% and is disabled (not tappable), and the X button to clear the text box is hidden.

Fix AddMuteItemView to trim leading and trailing whitespaces from mute text

  1. Open side menu.
  2. Tap Muted.
  3. Tap + button on top right.
  4. Enter leading and trailing spaces in the text entry.
  5. Tap the Add mute item button.
  6. Scroll to the bottom of the view.
  7. Observe that leading and trailing spaces has been added as a mute phrase but with the leading and trailing spaces trimmed.

Fix SideMenuView text to autoscale and limit to 1 line

  1. iOS Settings -> Apps -> Damus -> Language -> German
  2. Open Damus.
  3. Open side menu.
  4. Notice that the German translation for Muted does not wrap and autoscales down to fit.

Fix GradientFollowButton to have consistent width and autoscale text limited to 1 line, Fix suggested users category titles to be localizable

  1. Go to Damus settings.
  2. Settings -> Developer -> Enable Always show onboarding.
  3. iOS Settings -> Apps -> Damus -> Language -> Portuguese (Portugal)
  4. Open Damus.
  5. Observe that the onboarding view is displayed.
  6. Observe that the button width for the Portuguese translations of Unfollow and Follow are consistent.
  7. Observe that the text for the Portuguese translation of Unfollow does not wrap despite its length and autoscales down to fit.
  8. Observe that PERMACULTURE, LIVESTOCK & GARDENING is the second category (where previously the category title was PERMACULTURE & LIVESTOCK & GARDENING), which means that the string is being read from the Localizable.strings.

Fix right-to-left localization issues

  1. iOS Settings -> Apps -> Damus -> Language -> Arabic
  2. Open Damus
  3. Tap the notifications tab item on the bottom bar
  4. Observe that names of profiles in the notification text are listed on the right side of the strings instead of the left

Results:

  • PASS
  • Partial PASS
    • Details: [Please provide details of the partial pass]

tyiu added 6 commits December 9, 2024 18:36
Changelog-Fixed: Fixed SideMenuView text to autoscale and limit to 1 line

Signed-off-by: Terry Yiu <[email protected]>
…e text and disallow adding text with only whitespaces

Changelog-Fixed: Fixed AddMuteItemView to trim leading and trailing whitespaces from mute text and disallow adding text with only whitespaces

Signed-off-by: Terry Yiu <[email protected]>
Changelog-Fixed: Fixed right-to-left localization issues

Signed-off-by: Terry Yiu <[email protected]>
…limited to 1 line

Changelog-Fixed: Fixed GradientFollowButton to have consistent width and autoscale text limited to 1 line

Signed-off-by: Terry Yiu <[email protected]>
Changelog-Fixed: Fixed suggested users category titles to be localizable

Signed-off-by: Terry Yiu <[email protected]>
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.

1 participant