Fix values in parentheses

This commit is contained in:
Ilia Rostovtsev
2020-03-06 01:42:36 +03:00
parent 2ab3d68a50
commit cdfd246a00

View File

@@ -508,10 +508,12 @@ sub translated_substitute
$translated =~ s/(^[ ]+\$)/\$/gi;
# Get rid from undesirable spaces in parentheses
$translated =~ s/\([ ]+\$(\d+)[ ]*\)/(\$$1)/gi;
$translated =~ s/\([ ]+\$(\d+.*?)\)/(\$@{[trim($1)]})/gi;
# Print actual values with percent sign
$translated =~ s/\([ ]+\$(\d+)[ ]*%\)/(\$$1 %)/gi;
# There are different typeы of parentheses in eastern languages
# There are different types of parentheses in eastern languages
$translated =~ s/\[ ]+\$(\d+)[ ]*\/\$$1/gi;
# The following, is abnormal way to make things work, around of the bugs produced by Google Translate API for (bg).