One way is to use a letter frequency table, to determine which letter each symbol represents. In English, for example, the letter "e" is the most common, so if the code your looking at was composed...
Leafpool broke the warrior code 2 ways.1) She was a medicine cat, and had kits. Medicine cats are forbidden to have kits or a mate, because they must focus on the Clan, not the kits or their mate....
You can break the Galactic Code by either using planet bombs, or by using the zealot or scientist special powers (I think they're called characteristics?)