Skip to content

Commit

Permalink
Update radius display and re-generate translations
Browse files Browse the repository at this point in the history
- For spheres, just display radius (same as previously)
- For spheroids, display equatorial and polar radii
- For ellipsoids, display triaxial dimensions
  • Loading branch information
ajtribick committed Nov 18, 2024
1 parent 161f0b8 commit d640353
Show file tree
Hide file tree
Showing 30 changed files with 26,070 additions and 18,281 deletions.
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

0 comments on commit d640353

Please sign in to comment.