Skip to content

Conversation

@liang-work
Copy link
Contributor

Added localization support to the software. Currently supports Chinese and English.

Screenshot_3

Copy link
Contributor

@LittleSheep2Code LittleSheep2Code left a comment

Choose a reason for hiding this comment

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

In order to follow the standard of Solsynth's products. We prefer to use easy_localization and json to load the content. Use contextless tr method and avoid using flutter native arb since it's lack of supports by other editors and platforms, the hot-restart supports was limited as well.

Besides, the localization files should be present in the assets folder instead of the lib folder, the lib folder is only for the code related to flutter / dart vm side.

@LittleSheep2Code LittleSheep2Code changed the title Localization support Draft: Localization support Jan 6, 2026
@liang-work liang-work changed the title Draft: Localization support Localization support Jan 8, 2026
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this is the separate file? It should be in the settings provider, isn't it? And the easy_localization also include built-in locale persistence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So I should merge the files into the settings provider and use the built-in locale persistence in Easy_localization?

Copy link
Contributor

Choose a reason for hiding this comment

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

since the easy_localization provided the persistence, why you need another riverpod for that? For further details, you can check the Solsynth/Solian's implementation.

Copy link
Contributor

Choose a reason for hiding this comment

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

Didn't I told you to use contextless translation method?

Copy link
Contributor

Choose a reason for hiding this comment

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

The other files as well

Copy link
Contributor Author

@liang-work liang-work Jan 9, 2026

Choose a reason for hiding this comment

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

The other files as well

I have changed the settings screen and the player screen. Are there any other changes needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

You wrote the code, how could you don't know which places use context.tr() method?
And you can use Search across files to do so. Why ask me?

For real, people should pay before asking project maintainer to review their PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You wrote the code, how could you don't know which places use context.tr() method? And you can use Search across files to do so. Why ask me?

For real, people should pay before asking project maintainer to review their PR.

Do you mean using .tr(args: ['dynamic content']) instead of .replaceAll for translation? If you think this question is silly, you can just reply y/n.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait what, you're been using replace to fill the template? Please, read the docs.

@liang-work liang-work marked this pull request as draft January 12, 2026 11:58
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