When American put 60% of its navy near China, and allying countries around China to put China in danger, Chinese people have to be nationalism to be prepared for potential war. Chinese nationalism was at an all-time high during the Japanese invasion. Chinese remember the century of humiliation, they don’t want to be humiliated again.
Nationalism used to be a commendatory term during WWII as many countries pursued independence from Western colonization. That was the period when the Great British Empire collapse and the US and Soviet competing for global hegemony. After the cold war in 1992, nationalism gradually becomes a derogatory term.
When the United States passed the Patriot Act, did anybody point out that it was nationalist? Nationalism in the present world order has a very special meaning: American nationalism is not nationalism but internationalism because the US dominates the globe. Even though every American politician swears to God that they are fighting for American national interest, and no one said it is nationalism. In fact, American nationalism already overflowed the world.
Nationalism under such circumstances has a narrow meaning that a country that disobeys the US is called nationalism. This is a typical double standard or American exceptionalism. If we have a uniform standard, Trump is the strongest nationalist in the world, and the United States is the most nationalist country.
After the Thirty Years War, the Westphalian system became an international norm. Sovereignty states had since been being the players of international politics. UN was established under such a system. Every nation is for its own national interest. This is called realpolitik.
In opposition to nationalism is internationalism. Former Eastern Bloc was the Communist Internationalism. Countries with Internationalism denounce nationalism and acted according to Communist International instead of national interest. So we see that many countries sacrificed their national interest for the Communist International.
Those who oppose nationalism today are asking some countries to sacrifice their national interest for the sake of US national interest. NATO countries are doing exactly this. They sacrificed European economic interest by creating the refugee crisis in North Africa and the Middle East, for American national interest. They damage their own economy to put sanctions on Russia, just like Eastern Block countries sacrificed their national interest for Communist Internationalism. The only difference is that today US national interest is in place of internationalism: this is imperialism.