Skip to content

Add translation#25

Merged
ImaginativeShohag merged 17 commits into
devfrom
add-translation
Nov 17, 2025
Merged

Add translation#25
ImaginativeShohag merged 17 commits into
devfrom
add-translation

Conversation

@ImaginativeShohag
Copy link
Copy Markdown
Owner

No description provided.

Updated localizable strings for new features and existing entries across both targets, including version adjustments.
- Add proper error handling in DAOs with throws instead of silent failures
- Update insert/update methods to support createdAt and isCompleted fields
- Fix repository update method to use id instead of entity reference
- Make toggleTodoCompleteStatus async to properly persist changes to DB
- Improve error logging using SuperLog.e for errors instead of debug level
- Add consistent error handling across CoreData and SwiftData paths

Changes:
- CoreDataTodoDao: Add createdAt and isCompleted to insert/update
- SwiftDataTodoDao: Add createdAt and isCompleted to insert/update
- ITodoDao: Update interface signatures to throw errors
- TodoRepository: Add error handling with fallback to empty arrays
- TodoHomeViewModel: Make toggle async and persist to database
- ITodoRepository: Update method signature to use id instead of entity
- Remove force unwrap in Encodable.toJSONString() to prevent crashes
- Remove @unchecked Sendable from Backend class (not needed)
- Use user ID for profile image URLs instead of hardcoded ID
- Update localization: "jailbroken-status" to "Jailbroken Status"
- Fix trailing newline in Localizable.xcstrings

Safety improvements:
- Encodable+.swift: Return optional String instead of force unwrapping
- Backend.swift: Remove unsafe @unchecked Sendable conformance
- Store module: Dynamic profile images based on user ID
Add user-facing error handling with alert dialogs to provide feedback
when database operations fail.

Key improvements:
- Add showErrorAlert property for clean SwiftUI binding
- Add errorMessage property to store user-friendly error messages
- Fix critical bug: only update local state after successful DB operations
- Change add() to reload data from DB instead of appending to local list
- Use clearError() method consistently to avoid code duplication
- Display error alerts in TodoHomeScreen with native SwiftUI alert
- Improve error logging with descriptive messages

Error handling added for:
- Failed to add todo
- Failed to update todo
- Failed to toggle todo status

This addresses the code review feedback about missing user-facing
error handling in TodoHomeViewModel.
- Create MockCertificateStore extension with reusable certificate constants
- Move certificate constants from NetworkKitTests to centralized location
- Add mock certificate for httpbin.org (Amazon RSA 2048 M02)
- Update NetworkKitProdTests with improved test organization
- Fix error message assertions to match actual implementation
- Add tests for certificate pinning edge cases (no match, empty list)
- Improve test documentation for production environment setup
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @ImaginativeShohag, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces comprehensive localization support across the application's UI by externalizing numerous strings. It also includes a significant overhaul of the networking layer, enhancing its robustness with a new certificate pinning implementation and refined error handling. The Todo module's data persistence and UI logic have been updated for better data management and user feedback. Additionally, new utilities for UI testing have been integrated, and the project's build system configuration has been modernized to accommodate these changes and improve developer experience.

Highlights

  • Localization: Many UI strings across various screens in the Home module have been externalized using NSLocalizedString to support multiple languages.
  • NetworkKit Refactoring: The NetworkKit module underwent significant changes, including a refactored certificate pinning mechanism, improved cancellation handling in network requests, and updated Sendable conformance for ApiEndpoint and Backend.
  • Todo Module Enhancements: The Todo module's data access layer (CoreDataTodoDao, SwiftDataTodoDao) and repository (TodoRepository) were updated to include createdAt and isCompleted parameters for todos, and getAll methods now throw errors. The UI (TodoHomeScreen, TodoHomeViewModel) was adapted to these changes, including new error handling.
  • UI Testing Utilities: A new TestUtils module was introduced, containing extensions for XCUIApplication and XCUIElement to streamline UI testing with functionalities like launchApp(with:), isLoading(), and waitForElement().
  • Project Configuration Updates: Tuist project configuration files (Project.swift, Module.swift, Project+Templates.swift) were updated to support the new module structure, handle TargetDependency more explicitly, and include default known regions for localization.
  • Developer Documentation: A new CLAUDE.md file was added, providing detailed guidance and best practices for AI code assistants working with this repository.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a wide range of improvements across the project. The primary focus, as indicated by the title, is on localization, and it's great to see hardcoded strings being replaced with localized keys. Beyond that, there are significant and valuable refactorings in the networking layer, the Todo module's data persistence, and the Tuist project structure. These changes enhance security, modularity, and code quality.

My review has identified a few instances of incorrect localization keys, likely due to copy-paste errors, which I've flagged as high-severity issues. I've also included some medium-severity suggestions for improving the new documentation files to ensure they are clear and accurate. Overall, this is a substantial and positive contribution to the codebase.

Comment thread Targets/Home/Sources/UI/Screens/AppStorage/AppStorageScreen.swift Outdated
Comment thread Targets/Home/Sources/UI/Screens/BottomNavVsSideBar/BottomNavIOSScreen.swift Outdated
Comment thread Targets/Home/Sources/UI/Screens/BottomNavVsSideBar/SideBarIPadScreen.swift Outdated
Comment thread Targets/Home/Sources/UI/Screens/CoolToast/SuperToastScreen.swift Outdated
Comment thread CLAUDE.md Outdated
Comment thread CLAUDE.md Outdated
Comment thread Targets/Todo/Sources/DataSource/CoreData/CoreDataTodoDao.swift
Comment thread Targets/Todo/Sources/DataSource/SwiftData/SwiftDataTodoDao.swift
Comment thread Targets/Todo/Sources/UI/Home/TodoHomeViewModel.swift
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

func getAll() async -> [UITodo.Todo] {
return todos
}
func getBy(id: Int) async -> UITodo.Todo? {
return todos.first { $0.id == id }
}

P1 Badge Mock repository no longer satisfies throws requirement

The new ITodoRepository protocol (Targets/Todo/Sources/Repository/ITodoRepository.swift) now declares func getBy(id:) async throws, but MockTodoRepository still implements func getBy(id:) async -> UITodo.Todo? without throws. In Swift a non‑throwing implementation cannot satisfy a throwing requirement, so this class no longer conforms to the protocol and the project fails to build anywhere the mock is compiled (previews/tests). Update the mock’s signature to include throws (and adjust call sites if needed) so it matches the protocol.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Base automatically changed from store to dev November 14, 2025 01:42
- Move project documentation from CLAUDE.md to AGENTS.md for better organization
- Update CLAUDE.md to reference AGENTS.md
- Refactor ImageVideoCapturer to simplify image handling logic and add nil safety for video URLs
- Remove deprecated screenshot() and hideKeyboard() methods from View+ extension
- Update copyright year to 2025 in UIApplication+ extension
- Fix localization key inconsistencies in AppStorageScreen and SuperToastScreen
- Reorganize localization strings in Localizable.xcstrings
- Add missing tab item label for blue tab
- Improve code formatting and consistency across screens
@ImaginativeShohag ImaginativeShohag merged commit 7d2520e into dev Nov 17, 2025
1 check failed
@ImaginativeShohag ImaginativeShohag deleted the add-translation branch November 17, 2025 20:37
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