Skip to content

Refactor: Improve String resources#723

Merged
yusufnasserdev merged 11 commits intodevelopfrom
refactor/string-resources
Aug 26, 2025
Merged

Refactor: Improve String resources#723
yusufnasserdev merged 11 commits intodevelopfrom
refactor/string-resources

Conversation

@yusufnasserdev
Copy link
Collaborator

Improve String resources & Reduce resources redundancy

This PR includes a series of cleanups and improvements across the app resources, focusing on string consistency, image resource management, and minor UI text updates.

Main focus

  • String Categorization: Categorized presentation strings into logical groups for easier management.
  • String Standardization: Updated labels for consistency and clarity. Improved phrasing in onboarding, search, and account sections.
  • Empty States: Enhanced user guidance with clearer messages replacing generic placeholders.
  • Accessibility: Improved content descriptions for better screen reader support.
  • Localization: Added Arabic translations for new and updated strings, ensuring UI consistency across languages.

Cleanup

  • Code: Removed deprecated strings and aligned naming conventions.
  • Icons: Moved icons from design system to presentation module.
  • Images: Deleted several unused images, reduced redundancy.

These changes enhance usability, maintainability, and reduce app size.

This commit removes several unused PNG image files from the `designSystem` and `presentation` modules to clean up the project and reduce application size.

Deleted files:
- `designSystem/src/main/res/drawable/frame1597883073.png`
- `presentation/src/main/res/drawable-hdpi/img_no_reviews.png`
- `presentation/src/main/res/drawable-mdpi/img_no_reviews.png`
- `presentation/src/main/res/drawable-xhdpi/img_no_reviews.png`
- `presentation/src/main/res/drawable-xxhdpi/img_no_reviews.png`
- `presentation/src/main/res/drawable-xxxhdpi/img_no_reviews.png`
- `presentation/src/main/res/drawable-hdpi/img_onboarding_glow.png`
- `presentation/src/main/res/drawable-mdpi/img_onboarding_glow.png`
- `presentation/src/main/res/drawable-xhdpi/img_onboarding_glow.png`
- `presentation/src/main/res/drawable-xxhdpi/img_onbaording_glow.png`
- `presentation/src/main/res/drawable-xxxhdpi/img_onboarding_glow.png`
- `presentation/src/main/res/drawable-xxxhdpi/img_onboarding_first.png`
- `presentation/src/main/res/drawable-xxxhdpi/img_onboarding_second.png`
- `presentation/src/main/res/drawable-xxxhdpi/img_onboarding_third.png`
Moved drawable resources from the `designSystem` module to the `presentation` module.
Added new drawables `img_no_reviews.webp` and `img_onboarding_glow.webp` to the `presentation` module.
This commit updates various string resources across the presentation layer to improve consistency and clarity.

Key changes include:
- Standardizing terminology for lists (e.g., "Add new list" to "list_add_new").
- Improving empty state messages for categories and lists.
- Refining snackbar messages for success and error states.
- Updating content descriptions for better accessibility.
- Removing an unused "filter" string.
- Enhancing Arabic translations for better accuracy and natural language.
This commit reorganizes the `strings.xml` file by grouping related strings under comments for better readability and maintainability. It also adds new strings to support upcoming features and cleans up some existing string definitions.

Specifically, the following changes were made:
- Grouped strings by feature/screen (e.g., Essentials, Home, Search, Bookmarks).
- Added new strings for various features like "Lists", "Movie/Shows/Actor Details", "Welcome", "Onboarding", "Login", "Account", "Ratings", "Theme", "Language", "Moderation", and "Categories & Genres".
- Standardized the naming and content of some existing strings.
- Corrected a minor typo in the Arabic translation (`values-ar/strings.xml`).
This commit revises various user-facing strings related to list and item management, aiming for clearer and more concise messaging. The changes include:

-   Updated success and failure messages for adding and deleting lists and items.
-   Refined messages for rating deletion.
-   Added missing apostrophe in the English welcome description string.
-   Equivalent updates were made to the Arabic translations.
This commit standardizes the usage of string resources across the presentation layer and updates the corresponding Arabic translations for consistency and clarity.

Specifically, it addresses the following:
- Updates string resource keys (e.g., `Movies` to `movies`, `TV_Shows` to `tv_shows`).
- Replaces direct string literals with string resource references in various screens and components.
- Improves the wording and consistency of several string values in both English and Arabic.
- Corrects minor grammatical issues in some translations.
@yusufnasserdev yusufnasserdev requested review from a team August 23, 2025 18:49
@yusufnasserdev yusufnasserdev self-assigned this Aug 23, 2025
@london-bot
Copy link
Contributor

london-bot bot commented Aug 23, 2025

[London Bot] Metrics Update Status

📊 PR metrics successfully updated for event: closed.

@london-bot
Copy link
Contributor

london-bot bot commented Aug 23, 2025

[London Bot] Auto-update Status

✅ Branch successfully updated from develop.

This commit involves the following changes:

- Deleted `designSystem/src/main/res/values/font_certs.xml`.
- Removed network-related string resources from `designSystem/src/main/res/values-ar/strings.xml` and `designSystem/src/main/res/values/strings.xml`.
- Updated `NetworkErrorScreen.kt` to use string resources from the presentation module.
- Added the removed network-related string resources to `presentation/src/main/res/values/strings.xml` and `presentation/src/main/res/values-ar/strings.xml`.
- Updated `UserProfileSection.kt` to use drawable resource `R.drawable.user` from the presentation module instead of `dsR.drawable.user`.
- Deleted the `user.webp` drawable from the `presentation/src/main/res/drawable` directory as it is now referenced from within the presentation module.
@github-actions
Copy link

Code Coverage Summary

Total Project Coverage 60.68%

@yusufnasserdev yusufnasserdev marked this pull request as ready for review August 24, 2025 11:57
This commit refactors the string resources used in the `NetworkErrorScreen`.
- Renames `you_are_offline` to `offline_title`.
- Renames `check_your_connection` to `offline_description`.
- Updates the text for `something_went_wrong` in both English and Arabic resource files to be more user-friendly.
@yusufnasserdev yusufnasserdev enabled auto-merge (squash) August 25, 2025 06:03
@yusufnasserdev yusufnasserdev merged commit 7ecad0e into develop Aug 26, 2025
12 checks passed
@yusufnasserdev yusufnasserdev deleted the refactor/string-resources branch August 26, 2025 16:48
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