* TSX rises 34.79 points, or 0.28 pct, to 12,518.84 * Eight of 10 main index sectors advance * Barrick falls 6 pct after Chilean court suspends project * Gold shares down 3.3 percent overall By John Tilak TORONTO, April 10 (Reuters) - Canada's main stock index hit a one-week high on Wednesday, gaining for the third straight session as positive trade data from China buoyed hopes for global economic recovery and lifted financial and energy shares. The data showed that Chinese imports of key commodities rebounded in March as hopes of a strengthening economy encouraged end-users to ramp up production and cautiously replenish stocks. Those figures followed upbeat Chinese inflation numbers on Tuesday and helped the resource-heavy Toronto index extend its recovery from a five-day losing streak last week, when it lost 3.3 percent. "We're seeing a rebound in the TSX being driven by greater optimism around the outlook for export demand," said Craig Fehr, Canadian market strategist at Edward Jones in St. Louis, Missouri. "China is going to have a sizable impact on the outlook for commodities demand and global growth as a whole, and Canada's markets are going to be sensitive to those trends," he added. The Toronto Stock Exchange's S&P/TSX composite index was up 34.79 points, or 0.28 percent, at 12,518.84, after reaching 12,543.46, its highest point in a week. On Tuesday, the index recorded its biggest one-day percentage jump in more than four months. "Investors are still comfortable with the risks associated with equities, and the rally that we saw start in mid-November - while it took a breather last week - really remains intact," Fehr said. The benchmark Canadian index is up more than 6 percent since a low in November despite last week's selloff. Eight of the 10 main sectors on the index, were higher on Wednesday. Gains were limited by a 2.1 percent decline in the materials sector, which includes mining stocks. Gold prices were down about 1 percent, and gold shares fell 3.3 percent. Barrick Gold Corp fell 6 percent to C$25.55 after a Chilean court suspended construction of the miner's $8.5 billion Pascua-Lama gold and silver mine after indigenous communities said the project was destroying glaciers and harming water supply. Financials, the index's weightiest sector, added 1.1 percent. Royal Bank of Canada gained 1.4 percent to C$61.04 and played the biggest role of any single stock in leading the market higher. Energy shares climbed 0.9 percent despite a fall in oil prices.