Skip to content

feat(fishing-ui): improve fish information and localization features#2

Open
SychO3 wants to merge 2 commits intoLetsTussleBoiz:masterfrom
SychO3:master
Open

feat(fishing-ui): improve fish information and localization features#2
SychO3 wants to merge 2 commits intoLetsTussleBoiz:masterfrom
SychO3:master

Conversation

@SychO3
Copy link
Copy Markdown

@SychO3 SychO3 commented Oct 21, 2025

  • Add localized strings for fish-related UI in zh.json
  • Enhance fish tab display by introducing dynamic names via DisplayName
  • Update fish caught status labels to support localization
  • Refactor fish spawn conditions to handle "Here" condition explicitly
  • Introduce cache mechanism for location display names to improve performance
  • Adjust VanillaProvider.cs parsing logic for better data handling
  • Improve UI elements in FishInformation.sml to use localized tooltips and labels

- Add localized strings for fish-related UI in `zh.json`
- Enhance fish tab display by introducing dynamic names via `DisplayName`
- Update fish caught status labels to support localization
- Refactor fish spawn conditions to handle "Here" condition explicitly
- Introduce cache mechanism for location display names to improve performance
- Adjust `VanillaProvider.cs` parsing logic for better data handling
- Improve UI elements in `FishInformation.sml` to use localized tooltips and labels
Copilot AI review requested due to automatic review settings October 21, 2025 13:26
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the fishing UI mod with comprehensive localization support and improved data handling. The changes add Chinese (zh) translations, refactor fish information display to use localized strings throughout the UI, and introduce performance optimizations through caching mechanisms.

Key Changes:

  • Added complete Chinese localization file with 91 translated strings covering all UI elements
  • Implemented localization for fish tab names, caught status labels, and tooltips in the fish information view
  • Introduced location display name caching to reduce redundant string parsing operations

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
MatrixFishingUI/i18n/zh.json Complete Chinese translation file with all UI strings
MatrixFishingUI/i18n/default.json Added new localization keys for tabs, caught status, and labels
MatrixFishingUI/assets/views/FishInformation.sml Updated UI elements to use localized strings instead of hardcoded text
MatrixFishingUI/Framework/Fish/VanillaProvider.cs Enhanced parsing logic to handle null/empty values and use DisplayName
MatrixFishingUI/Framework/Fish/HudMenuData.cs Added partial class modifier for code generation support
MatrixFishingUI/Framework/Fish/FishInfoData.cs Added localized properties for caught status and tab display names
MatrixFishingUI/Framework/Fish/FishHelper.cs Implemented location display name caching and improved "Here" season condition handling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

return result.Count == 0 ? null : result;
if (result.Count == 0)
{
if (sawHere) return Enum.GetValues<Season>().ToHashSet();
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

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

The expression Enum.GetValues<Season>().ToHashSet() is called every time 'Here' is encountered without explicit seasons. Consider caching this HashSet as a static readonly field to avoid repeated allocations and enum value retrievals.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants