From The Chinese Question: The Gold Rushes and Global Politics, by Mae Ngai (W. W. Norton, 2021), Kindle pp. 204-206:
DESPITE ANOTHER ROUND of protest—including a trade union rally of eighty thousand in London’s Hyde Park—the Chamber of Mines and the Transvaal government moved with dispatch to set up a program. Transvaal agents, who had already laid the groundwork for recruiting in China, went into high gear. In fact, recruitment in Yantai (Chefoo) in Shandong province had started in January, before the ordinance was finally approved.
But there was just one problem: China had not approved the program. The lapse violated long-standing diplomatic protocols, established in 1860, regarding the recruitment of Chinese labor to territories within the British Empire. The Foreign Office did not show Ordinance no. 17 to the Chinese ambassador in London, Zhang Deyi, until mid-February. Zhang promptly intervened via the Foreign Affairs Department in Beijing (Waiwubu, the successor to the Zongli Yamen). Everything ground to a halt while Zhang Deyi and the Foreign Office commenced negotiations in London in March. The Transvaal Chamber of Mines called the delay “quite unexpected” and “much to be regretted.”
When Harry Ross Skinner had recommended importing Chinese indentured labor for the gold mines, he had predicted that China would respond “passively” to such a project. The Foreign Office should have known better. Zhang Deyi was no naïf—he was a seasoned diplomat with forty years of experience in the Qing foreign service. His appointment as Qing ambassador to the Court of St. James’s in 1902 was his eighth assignment abroad. He had begun his career as a young translator on the Qing’s first overseas mission in 1866 and in the Burlingame delegation in 1868; he had then served in various capacities in Chinese embassies, mostly in Europe. Zhang was also one of China’s most prolific diplomat-diarists, who wrote and published eight books chronicling his trips (Figure 20).
Nor was Zhang a stranger to South African affairs. From 1896 to 1900, he had served as councilor in the Qing legation in London, and from there he closely followed the South African War. As ambassador, Zhang was well aware of the debates taking place in South Africa over proposals to import Chinese labor. He worried that the mining companies would abuse Chinese workers in the manner that had made Peru and Cuba the most notorious destinations of the nineteenth-century coolie trade. He further worried that ill treatment of indentured Chinese in South Africa would have negative effects on overseas Chinese communities throughout Africa, from Mauritius to Tanganyika to the Cape Colony. He knew indentured Chinese labor emigrants were vulnerable to the “three harms”—low wages, tight controls, and poor benefits. As early as February 1903—nearly a year before the Transvaal passed Ordinance no. 17—Zhang reported to Beijing that South Africa was likely to recruit Chinese labor. He wrote repeatedly throughout the year that China should forbid labor from going to South Africa without a convention with Great Britain. He was furious when he learned that recruitment was already taking place in Yantai before China had agreed to the program.
On May 13, after three months of negotiation in London, Foreign Secretary Lord Lansdowne and Ambassador Zhang Deyi signed the Emigration Convention of Great Britain and China of 1904. The convention underscored the distance traveled from the mid-nineteenth-century heyday of the coolie trade. It stipulated a minimum age of twenty for emigrants and inspection to ensure that laborers were of sound body and mind. Contracts were to be written in Chinese and English and specify wages, hours, and rations; free passage and return; and the right to free medical care and medicine. It required witness from both Chinese and British officials. It gave China the right to station a consul or vice-consul in the colony and gave Chinese workers “free access to the Courts of Justice to obtain the redress for injuries to his person and property” as well as access to postal facilities for sending letters and remittances to their families.
Zhang pressed hard for a prohibition on corporal punishment, but he was unable to insert an outright ban into the agreement because, the Foreign Office informed him, Transvaal law provided for corporal punishment for certain offenses for “everybody, including whites.” The British assured Zhang that floggings would be administered only by order of a magistrate or judge after trial and conviction, and only with government-approved instruments, and that it would not exceed twenty-four lashes. Although the agreement showed improvement in China’s ability to negotiate protections for its emigrant workers, enforcement of the terms of the ordinance would be determined on the ground.
Brief articles about Zhang Deyi (張德彜) can be found in Chinese, Japanese, and German Wikipedia, but not in English Wikipedia.