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

How to add dot character right after linked translation? #705

Open
minhdanh opened this issue Aug 26, 2024 · 1 comment
Open

How to add dot character right after linked translation? #705

minhdanh opened this issue Aug 26, 2024 · 1 comment

Comments

@minhdanh
Copy link

minhdanh commented Aug 26, 2024

In my case:

title: Enable repayment
...
description: Please turn off @:title.

If I use 'description'.tr(), I expect it to render Please turn off Enable repayment.
But this is rendered instead: Please turn off @:title.

@hsynksahin
Copy link

hsynksahin commented Aug 26, 2024

I've checked the regex finds the links inside the translation which is this:
(?:@(?:\.[a-z]+)?:(?:[\w\-_|.]+|\([\w\-_|.]+\)))
The regex will consider any . as part of link so, it will removed no mater how many you put there.
I guess that regex needs to be changed or maybe a if check to see if it ends with a dot.

My suggestion just make another translation like titleWithDot temporarily.

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

No branches or pull requests

2 participants