easy_localization icon indicating copy to clipboard operation
easy_localization copied to clipboard

How to add dot character right after linked translation?

Open minhdanh opened this issue 1 year ago • 2 comments

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.

minhdanh avatar Aug 26 '24 05:08 minhdanh

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.

hsynksahin avatar Aug 26 '24 13:08 hsynksahin

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.

with interpolation: print("${"someKey".tr()} @addition!! ${"anotherKey".tr()} $intVariable - end!"); without interpolation print("someKey".tr() + "@addition!!" +anotherKey.tr() + intVariable.toString() + " - end!");

YahalomsGuy avatar Jun 08 '25 10:06 YahalomsGuy