in both China and Japan, nationalism what tied to what?