'How to re-use plural translation rule anywhere using angular-localize
I have a working plural translation
<strong i18n="@@filesCount"> {(filesLength | async), plural,
one {{{filesLength | async}} file}
few {{{filesLength | async}} files}
many {{{filesLength | async}} files}
other {{{filesLength | async}} files}}
</strong>.
This generates two records in .xlf file
<unit id="filesCount">
<segment>
<source> <ph id="0" equiv="ICU" disp="{(filesLength | async), plural,
one {{{filesLength | async}} file}
few {{{filesLength | async}} files}
many {{{filesLength | async}} files}
other {{{filesLength | async}} files}}"/> </source>
</segment>
</unit>
<unit id="5092638633340153588">
<segment>
<source>{VAR_PLURAL, plural, one {<ph id="0" equiv="INTERPOLATION"/> file} few {<ph id="1" equiv="INTERPOLATION"/> files} many {<ph id="2" equiv="INTERPOLATION"/> files} other {<ph id="3" equiv="INTERPOLATION"/> files}}</source>
</segment>
</unit>
My question is - how do I use this exact translation rule again without having to write it again?
Also, why does it generate two records and what am I supposed to do with the first one?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
