Roman-Lo / vscode-ng-i18n-editor

An editor for angular generated xliff translation file.
MIT License
7 stars 3 forks source link

Plurals are not handled by the editor #9

Open blizarazu opened 4 years ago

blizarazu commented 4 years ago

Hi, first of all, congratulations for this awesome plugin.

I have some plurals in my translation files and the editor just those fields empty. You can paste the string with plurals in the editor and it will be correctly saved, but even if you sign them of they will show up as "Need translation" when you open them again with the editor. It's not a big deal, because you can translate them directly in the xlf file and just ignore the editor for the fields containing plurals.

The source of the unit with plurals is this: <source>{VAR_PLURAL, plural, =0 {No files} =1 {1 file} other {<x id="INTERPOLATION" equiv-text="{{fileNumber}}"/>files} }</source>

Thanks.

Roman-Lo commented 4 years ago

Thank you for the feedback. And yes, the plural cases are some that I've left behind while I building this extension. I will try to fix this soon.