Infeasible
Status Update
Comments
uc...@google.com <uc...@google.com>
al...@google.com <al...@google.com>
sp...@google.com <sp...@google.com> #2
The problem is the same in Java. To reproduce type String.format("%1s ate %2s", "one", "two");
and then replace "ate" with "אכל".
lb...@gmail.com <lb...@gmail.com> #3
@2 I don't understand.
Testing it, it seems you are correct:
val str="String.format(\"%1s ate %2s\", \"one\", \"two\")"
val newString = str.replace("ate", "אכל")
Log.d("AppLog", "new string:$newString")
It produces this:
new string:String.format("%1s אכל %2s", "one", "two")
Why is it as such?
Replacing a simple English word (let alone in the middle of a sentence) shouldn't affect texts around it.
It's really annoying to see it this way.
Testing it, it seems you are correct:
val str="String.format(\"%1s ate %2s\", \"one\", \"two\")"
val newString = str.replace("ate", "אכל")
Log.d("AppLog", "new string:$newString")
It produces this:
new string:String.format("%1s אכל %2s", "one", "two")
Why is it as such?
Replacing a simple English word (let alone in the middle of a sentence) shouldn't affect texts around it.
It's really annoying to see it this way.
lb...@gmail.com <lb...@gmail.com> #5
@4 OK thanks.
du...@google.com <du...@google.com> #6
This seems like an entirely upstream bug. Since it's been filed, we're just going to close it here.
Description
Build #AI-171.4263559, built on August 10, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Suppose you have this string you wish to translate to Hebrew :
<string name="x_ate_y">%1$s ate %2$s</string>
In Hebrew, all I need to change here (with some exceptions), I have to change "ate" to "אכל" .
However, in this case, on the IDE, what happens is that the second placeholder gets split, even though it wasn't touched.
Attached video to show issue.