Filed another suggestion about these macros relating to applications
with sources spread across multiple CMake targets:
https://bugreports.qt.io/browse/QTBUG-115846

Den mån 7 aug. 2023 kl 19:55 skrev Elvis Stansvik <elvst...@gmail.com>:
>
> Thanks Alexandru,
>
> => https://bugreports.qt.io/browse/QTBUG-115845
>
> Den mån 7 aug. 2023 kl 09:42 skrev Alexandru Croitor 
> <alexandru.croi...@qt.io>:
> >
> > Hi,
> >
> > Unless i'm misreading the code, i don't think it's currently possible to 
> > pass per-file / per-lang
> > separate options for a single target with qt_add_lupdate.
> >
> > You could try to work around it by having separate targets per language, 
> > but that's clearly sub-optimal.
> >
> > You should be fine with using qt_create_translation as long as it meets 
> > your needs, we likely won't remove
> > any deprecated api until there is a good enough replacement.
> >
> > Having said that, I suggest you file a suggestion on the bug tracker, so we 
> > can keep track of the use case.
> >
> >
> > > On 6. Aug 2023, at 15:21, Elvis Stansvik <elvst...@gmail.com> wrote:
> > >
> > > Hi all,
> > >
> > > Porting our application to Qt 6 and I'm a little confused by the new
> > > qt_add_lupdate CMake helper.
> > >
> > > When we run lupdate to generate/update our English translation .ts
> > > files, since our source strings are in English, we want to pass
> > > -pluralonly to lupdate, to only have plural forms for translators to
> > > "translate". We don't want to do this for other languages.
> > >
> > > It seems this is not possible with qt_add_lupdate which takes a target
> > > argument and adds a ${target}_lupdate target, since I assume that with
> > > two successive calls to qt_add_lupdate for the same target (first with
> > > our English .ts files and second with the others), the second call
> > > would trample of what the first one did?
> > >
> > > How should this be done in Qt 6? Surely someone else must be in the same 
> > > boat?
> > >
> > > I know that the non-target based qt_create_translation still exists,
> > > but it's deprecated so not something we want to use.
> > >
> > > Thanks in advance,
> > > Elvis
> > > _______________________________________________
> > > Interest mailing list
> > > Interest@qt-project.org
> > > https://lists.qt-project.org/listinfo/interest
> >
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to