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

Fix/timer/extract strings #331

Merged
merged 4 commits into from
Dec 18, 2024
Merged

Fix/timer/extract strings #331

merged 4 commits into from
Dec 18, 2024

Conversation

taghizadlaura
Copy link
Contributor

@taghizadlaura taghizadlaura commented Dec 17, 2024

Timer texts in string.xml

Description

This PR introduces string resources for the TimerScreen to improve the readability and maintainability of the app. It closes issue #329 (and part of #328). The strings include a title, instructional text, useful tips, and labels for buttons (START, RESET, STOP). This update also adapts the TimerScreen to use the newly added string resources.

Changes

  • Added string resources for TimerScreen, including the title, instructions, useful tips, and button labels (START, RESET, STOP).
  • Updated TimerScreen to use the new string resources, ensuring the content is consistent and more easily manageable through the strings.xml.

Files

Added

  • No files added.

Modified

  • TimerScreen.kt (updated to use string resources from strings.xml)
  • TimerScreenTest.kt (updated the existing tests)
  • res/values/strings.xml (new strings added)

Removed

  • No files removed.

Dependencies Added

  • No new dependencies added.

Testing

The TimerScreen has been updated to ensure the correct string resources are being used.

- Add string resources for TimerScreen including title, start text, useful tip, and button labels (START, RESET, STOP).
- Adapt TimerScreen to use the new string resources.
@taghizadlaura taghizadlaura added the clean up Clean up of already written code label Dec 17, 2024
@taghizadlaura taghizadlaura self-assigned this Dec 17, 2024
@taghizadlaura taghizadlaura linked an issue Dec 17, 2024 that may be closed by this pull request
@taghizadlaura taghizadlaura changed the title fix: add TimerScreen strings to strings.xml Fix/timer/extract strings Dec 17, 2024
…re being used.

Also refactor `displayed_text_start` into `timer_displayed_text_start` for better consistency.
@taghizadlaura taghizadlaura marked this pull request as ready for review December 17, 2024 19:30
Copy link
Contributor

@lazarinibruno lazarinibruno left a comment

Choose a reason for hiding this comment

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

I verified and the text in timer screen is still correct.

LGMT.

Copy link
Contributor

@Harrish92 Harrish92 left a comment

Choose a reason for hiding this comment

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

LGTM ! Just remove unused TimerScreen tags in app/src/main/java/com/android/periodpals/resources/C.kt

@taghizadlaura taghizadlaura merged commit 55ab7f4 into main Dec 18, 2024
3 checks passed
@taghizadlaura taghizadlaura deleted the fix/timer/extract-strings branch December 18, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean up Clean up of already written code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timer texts in string.xml
3 participants