You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a syntax in .tr files to let the user say some translations are associated with a S(variable) call in a file. Since it is not trivial to detect variable content unless we run the script (and this is a bad idea), this kind of translations needs to be reviewed manually and not be confused with not used anymore translation. When detection of a S(variable) in a file occurs but no string is associated to the variable yet, the script could emit a warning and write a warning in the "not used anymore" section.
The text was updated successfully, but these errors were encountered:
To be clear, you're talking about a scenario like this?
local baseText = "this string should be translated"
local translatedText = S(baseText)
And then manually adding
#actuallyUsedTag
this string should be translated=
To the template and .tr files with this script recognizing #actuallyUsedTag (or whatever the tag turns out to be) and handling the line specially to keep it out of the not-used-anymore section?
The solution is to add a no-op function local NS = function(s) return s end at the top of your file and then mark the string literal you want to become translatable with it.
The above code could then be fixed like this:
local NS = function(s) return s end
local baseText = NS("this string should be translated")
local translatedText = S(baseText)
Add a syntax in
.tr
files to let the user say some translations are associated with aS(variable)
call in a file. Since it is not trivial to detect variable content unless we run the script (and this is a bad idea), this kind of translations needs to be reviewed manually and not be confused with not used anymore translation. When detection of aS(variable)
in a file occurs but no string is associated to the variable yet, the script could emit a warning and write a warning in the "not used anymore" section.The text was updated successfully, but these errors were encountered: