In my country, that's just on paper or formal scenarios for "non-natives". We call citizens of a certain ethnicity by, and here's the dumb part, a generalisation/close match of their racial origin no matter how inaccurate or offensive it might be to some. A Pakistani is called an Indian, Japanese/Koreans are called Chinese, Americans and Europeans would be called Whites. You're never hear anyone refer to such citizens as Indian Zambian or White Zambian. My classmate and business partner is of Irish descent but no one says Irish Zambian, like many mixed-raced Zambians, when they aren't being called by country of origin, they are simply called coloureds.
Growing up, this seemed normal (and felt weird when I first heard the term African-American as a child) but today I have concerns because of what associations go with certain labels, for instance, my classmate is Zambian (born and bred) but no one will ever call him that in an informal setting. He'll always be a "coloured" but I guess it kinda makes sense because it's not like black Zambians ever go around saying, "Tsup, my Zambian?" Or "You good, ma Zambian?"
So um... I dunno about Africa, but here in Zambia, we, for some, reason I don't know don't refer to White Zambians as that or just Zambian... It's just White. Maybe South Africa is a huge exception because it has a larger number of whites than Zambia and I've heard many such whites refer to themselves as South African and not White South African as label, only in a purely descriptive manner. So you'll have someone say, "growing up as a white South African..." But never, "you see, because I'm White South African." That last part applies in Zambia too.
TL;DR: Some countries refer to citizens of a certain colour by a generalised label depending on the most popular place of origin. Never by their nationality.