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

Can use the lodash's template() function to handle the translated string #48

Open
bigBear713 opened this issue Jul 12, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@bigBear713
Copy link
Owner

version: v16.0.0
The lib support the template with params, like This is a {{param1}}, and the {{param1}} with be replaced as param value.

Now it is handled by RegExp, it is ok now, but it's a bit complicated. I think we can simplify the process, using a third-party lib to do it.

The lodash you know is a powful third-party lib, and provide template() to handle template string. I think we can try to use it to help us to handle the translated string, we only need to provide the translated string and params value. It can make the process be more simple.

Of course, it's not always the best way, so try it and discuss it

@bigBear713 bigBear713 added enhancement New feature or request question Further information is requested labels Jul 12, 2023
@bigBear713 bigBear713 self-assigned this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant