The dust properties inferred from the analysis of Planck observations in total and polarized emission challenge current dust models. We propose new dust models compatible with polarized and unpolarized data in extinction and emission for translucent lines of sight ($0.5 < A_V < 2.5$). We amended the DustEM tool to model polarized extinction and emission. We fit the spectral dependence of the mean extinction, polarized extinction, SED and polarized SED with PAHs, astrosilicates and amorphous carbon (a-C). The astrosilicate population is aligned along the magnetic field lines, while the a-C population may be aligned or not. With their current optical properties, oblate astrosilicate grains are not emissive enough to reproduce the emission to extinction polarization ratio $P_{353}/p_V$ derived with Planck data. Models using prolate astrosilicate grains with an elongation $a/b=3$ and an inclusion of 20% of porosity succeed. The spectral dependence of the polarized SED is steeper in our models than in the data. Models perform slightly better when a-C grains are aligned. A small (6%) volume inclusion of a-C in the astrosilicate matrix removes the need for porosity and perfect grain alignment, and improves the fit to the polarized SED. Dust models based on astrosilicates can be reconciled with Planck data by adapting the shape of grains and adding inclusions of porosity or a-C in the astrosilicate matrix.