qgroundcontrol icon indicating copy to clipboard operation
qgroundcontrol copied to clipboard

Change raw string to tr

Open bols-blue opened this issue 3 years ago • 11 comments

please show #9995

bols-blue avatar Nov 07 '21 10:11 bols-blue

Please try to describe why the change from raw string to QObject::tr is necessary and add it to your commit message. Thanks.

booo avatar Nov 08 '21 16:11 booo

@booo Thank you for comment. I tried to rewrite it, but how about it?

bols-blue avatar Nov 09 '21 01:11 bols-blue

I have a question. Is it better to include translation resources in a pull request?

bols-blue avatar Nov 09 '21 01:11 bols-blue

Thanks.

If you want to add a translation or improve one please use https://crowdin.com/project/qgroundcontrol

We are still working on the documentation: https://github.com/mavlink/qgroundcontrol/issues/9962

booo avatar Nov 09 '21 08:11 booo

Why can't these all be tr instead of QObject::tr?

DonLakeFlyer avatar Nov 09 '21 21:11 DonLakeFlyer

I used QObject::tr because it was displayed ”tr not defined.” when I check it now, it seems that Unitsetting::tr is used as tr, so I fixed it.

bols-blue avatar Nov 11 '21 01:11 bols-blue

@bols-blue san I am no longer detectable by QT's LUPDATE with the current support. Is there a statement in the LUPDATE of your QT?

muramura avatar Nov 14 '21 01:11 muramura

@muramura san I know that. Perhaps the linguist is not evaluating the macro correctly. I was looking for a setting. Priority is given to undoing and closing.

bols-blue avatar Nov 14 '21 02:11 bols-blue

This statement "tr("Weight units")" is assigned to the UnitsSettings class. I thought that the others could be assigned to the UnitsSettings class as well. I used this specification to display in the LUPDATE. I also set the translation settings to display the unit settings in Japanese.

スクリーンショット_2021-11-14_17-01-25

muramura avatar Nov 14 '21 07:11 muramura

I used QObject::tr because it was displayed ”tr not defined.” when I check it now, it seems that Unitsetting::tr is used as tr, so I fixed it.

I'm a bit confused as to where this currently stands. I tried doing a compile just using tr("...") and it compiled fine for me. Are you saying that isn't the problem. The problem is that lupdate doesn't find the strings and output the correctly updated .ts files? If so does this latest change bot compile and work with lupdate?

DonLakeFlyer avatar Nov 21 '21 19:11 DonLakeFlyer

is this PR ready to come in? I can't tell by the discussion, and the changeset looks good to me

mrpollo avatar Aug 17 '22 17:08 mrpollo

I think it's ready.

booo avatar Oct 19 '22 11:10 booo

I am saying that this PR change was not discovered by the ludate command. I am hoping the change will be found in the lupdate command.

muramura avatar Oct 19 '22 22:10 muramura

"tr" cannot be lupdated. So "QObject::tr" is used in this PR. I would like you to change "QObject::tr" to "tr" in another issue and merge it.

bols-blue avatar Oct 28 '22 00:10 bols-blue