Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update radius display and re-generate translations #2267

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,510 changes: 888 additions & 622 deletions po/ar.po

Large diffs are not rendered by default.

1,606 changes: 936 additions & 670 deletions po/be.po

Large diffs are not rendered by default.

1,609 changes: 938 additions & 671 deletions po/bg.po

Large diffs are not rendered by default.

1,438 changes: 834 additions & 604 deletions po/celestia.pot

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/de.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/el.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/es.po

Large diffs are not rendered by default.

1,526 changes: 897 additions & 629 deletions po/fr.po

Large diffs are not rendered by default.

1,521 changes: 896 additions & 625 deletions po/gl.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/hu.po

Large diffs are not rendered by default.

1,523 changes: 897 additions & 626 deletions po/it.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/ja.po

Large diffs are not rendered by default.

1,510 changes: 888 additions & 622 deletions po/ka.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/ko.po

Large diffs are not rendered by default.

1,518 changes: 894 additions & 624 deletions po/lt.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/lv.po

Large diffs are not rendered by default.

1,518 changes: 894 additions & 624 deletions po/nb.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/nl.po

Large diffs are not rendered by default.

1,526 changes: 897 additions & 629 deletions po/pl.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/pt.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/pt_BR.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/ro.po

Large diffs are not rendered by default.

1,613 changes: 939 additions & 674 deletions po/ru.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/sk.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/sv.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/tr.po

Large diffs are not rendered by default.

1,519 changes: 895 additions & 624 deletions po/uk.po

Large diffs are not rendered by default.

1,596 changes: 931 additions & 665 deletions po/zh_CN.po

Large diffs are not rendered by default.

1,517 changes: 894 additions & 623 deletions po/zh_TW.po

Large diffs are not rendered by default.

35 changes: 22 additions & 13 deletions src/celestia/hud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ displayStarInfo(const util::NumberFormatter& formatter,

if (float solarRadii = star.getRadius() / 6.96e5f; solarRadii > 0.01f)
{
overlay.print(_("Radius: {} Rsun ({})\n"),
overlay.print(_("Radius: {} Rsun ({})\n"),
formatter.format(star.getRadius() / 696000.0f, 2, SigDigitNum),
DistanceKmToStr(formatter, star.getRadius(), 3, hudSettings.measurementSystem));
}
Expand Down Expand Up @@ -537,23 +537,32 @@ displayPlanetInfo(const util::NumberFormatter& formatter,
{
return;
}
else if (body.isEllipsoid() && !body.isSphere()) // show mean radius along with triaxial semi-axes
else if (body.isEllipsoid()) // show mean radius along with triaxial semi-axes
{
Eigen::Vector3f semiAxes = body.getSemiAxes();
double radiusMean = cbrt(semiAxes.prod());
double axis0 = semiAxes.x();
double axis1 = semiAxes.z();
double axis2 = semiAxes.y(); // polar semi-axis
overlay.print(_("Radius: {} ({} " UTF8_MULTIPLICATION_SIGN " {} " UTF8_MULTIPLICATION_SIGN " {})\n"),
DistanceKmToStr(formatter, radiusMean, 5, hudSettings.measurementSystem),
DistanceKmToStr(formatter, axis0, 5, hudSettings.measurementSystem),
DistanceKmToStr(formatter, axis1, 5, hudSettings.measurementSystem),
DistanceKmToStr(formatter, axis2, 5, hudSettings.measurementSystem));
if (semiAxes.x() == semiAxes.z())
{
if (semiAxes.x() == semiAxes.y())
{
overlay.print(_("Radius: {}\n"), DistanceKmToStr(formatter, body.getRadius(), 5, hudSettings.measurementSystem));
}
else
{
overlay.print(_("Equatorial radius: {}\n"), DistanceKmToStr(formatter, semiAxes.x(), 5, hudSettings.measurementSystem));
overlay.print(_("Polar radius: {}\n"), DistanceKmToStr(formatter, semiAxes.y(), 5, hudSettings.measurementSystem));
}
}
else
{
overlay.print(_("Radii: {} × {} × {}\n"),
DistanceKmToStr(formatter, semiAxes.x(), 5, hudSettings.measurementSystem),
DistanceKmToStr(formatter, semiAxes.z(), 5, hudSettings.measurementSystem),
DistanceKmToStr(formatter, semiAxes.y(), 5, hudSettings.measurementSystem));
}
}
else
{
overlay.print(_("Radius: {}\n"),
DistanceKmToStr(formatter, body.getRadius(), 5, hudSettings.measurementSystem));
overlay.print(_("Radius: {}\n"), DistanceKmToStr(formatter, body.getRadius(), 5, hudSettings.measurementSystem));
}

displayApparentDiameter(overlay, body.getRadius(), distanceKm, loc);
Expand Down
Loading