[PATCH 2/2] Fix plurals translation

Dirk Hohndel dirk at hohndel.org
Fri Oct 30 07:25:56 PDT 2015


On Fri, Oct 30, 2015 at 01:16:40PM +0300, Sergey Starosek wrote:
> Dirk,
> 
> On Thu, Oct 29, 2015 at 10:33 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> 
> >
> > The .ts file for those looks like this:
> >
> >     <message numerus="yes">
> >         <location filename="../qt-ui/modeldelegates.cpp" line="546"/>
> >         <source>, %n dive(s) here)</source>
> >         <translation type="unfinished">
> >             <numerusform></numerusform>
> >         </translation>
> >     </message>
> >
> >     <message numerus="yes">
> >         <location filename="../qthelper.cpp" line="1077"/>
> >         <source>(%n dive(s))</source>
> >         <translation type="unfinished">
> >             <numerusform></numerusform>
> >         </translation>
> >     </message>
> >
> > and clearly transifex does not like this. Some googling seems to imply
> > that transifex is aware of the bug and promised a fix more than a year ago
> > (and then instead just shut down their forums - nice). But I also found a
> > workaround and it appears to do the trick. Now I just need to remember to
> > manually fix our .ts file before I send it - or somehow automate the
> > workaround (which is to duplicate the "<numerusform></numerusform>" line)
> >
> 
> I've update translations/CMakeLists.txt to regenerate .ts files and after
> build
> I can see following for en_GB locale:
> 
>     <message numerus="yes">
>         <location filename="../qt-ui/modeldelegates.cpp" line="546"/>
>         <source>, %n dive(s) here)</source>
> 
> 
>         <translation type="unfinished">
>             <numerusform></numerusform>
>             <numerusform></numerusform>
>         </translation>
>     </message>
> 
> For ru_RU locale there're three numerusform elements. Qt version 5.5.0.

So the question is do you see the two numerusform entries in
translations/subsurface_source.ts

I'm on Qt 5.5.1 and I only get one of those entries automatically created.
If I then manually duplicate it before pushing to transifex then it seems
to work.

/D


More information about the subsurface mailing list