> -----Original Message----- > From: Tom Isaacson <tom.isaac...@navico.com> > Sent: Monday, 17 June 2019 10:13 PM > To: Mitch Curtis <mitch.cur...@qt.io>; Thiago Macieira > <thiago.macie...@intel.com>; interest@qt-project.org > Subject: RE: [Interest] Translating JSON files > > -----Original Message----- > From: Interest <interest-boun...@qt-project.org> On Behalf Of Mitch Curtis > Sent: Tuesday, June 18, 2019 8:02 AM > To: Thiago Macieira <thiago.macie...@intel.com>; interest@qt-project.org > Subject: Re: [Interest] Translating JSON files > > > I was hoping to avoid having to duplicate the file, as it would be a > maintenance nightmare. Though I guess there's not much I can do in JSON > besides doing some funky string-based syntax to mark translatable strings: > > > "displayText": "tr(Some user-facing text)", > > > I can't think of a better solution though. :/ Switching file formats is > > also not > an option at this point. > > I make the text an array of structs, one for each language: > > "displayText": > [ > { "language": "en", "text": "English" }, > { "language": "fr", "text": "Francais" } > ]
That's not a bad idea... So I guess you bypass lupdate and lrelease altogether with this approach? > Tom Isaacson _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest