Here the 1874 RLDS edition replaced when you with that ye. Technically, one could interpret the when in the original text as meaning, incorrectly, that the Lamanites will come in a time of ignorance (or not knowing). Of course, the obvious meaning here is that if the people of Ammonihah do not repent, the attack of the Lamanites will be a complete surprise to them. The replacement of when with that removes the rather improbable chance that a reader might misread the text in the other way. The change from you to ye is also unnecessary since the text sometimes has the modern you rather than the archaic ye as the subject pronoun. The change to ye here in the 1874 RLDS edition may have been influenced by the ye in the immediately following clause (“and ye shall be visited with utter destruction”). See the discussion under Mosiah 4:14 as well as more generally under ye in volume 3.
Summary: Maintain the use of when you, the earliest reading, in Alma 9:18: “they shall come in a time when you know not”.