  In this paper, we prove that almost every translation of $\mathbb{T}^2$
admits a symbolic coding which has linear complexity $2n+1$. The partitions are
constructed with Rauzy fractals associated with sequences of substitutions,
which are produced by a particular extended continued fraction algorithm in
projective dimension $2$. More generally, in dimension $d\geq 1$, we study
extended measured continued fraction algorithms, which associate to each
direction a subshift generated by substitutions, called $S$-adic subshift. We
give some conditions which imply the existence, for almost every direction, of
a translation of the torus $\mathbb{T}^d$ and a nice generating partition, such
that the associated coding is a conjugacy with the subshift.
