Skip to content

Commit

Permalink
Fix grammar in translations for N_WHATEVER* strings (#5053)
Browse files Browse the repository at this point in the history
* Fix grammar in translations for N_WHATEVER* strings

* Delete unused EARTH and SOLAR translation keys + fix a spelling mistake
  • Loading branch information
gunchleoc authored Dec 10, 2020
1 parent 033dd71 commit ca1ad55
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
26 changes: 13 additions & 13 deletions data/lang/core/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,10 +335,6 @@
"description": "",
"message": "Draw vertical lines"
},
"EARTH": {
"description": "",
"message": "Earth"
},
"EARTH_FEDERATION_COLONIAL_RULE": {
"description": "",
"message": "Earth Federation Colonial Rule"
Expand Down Expand Up @@ -965,15 +961,23 @@
},
"N_EARTH_DAYS": {
"description": "",
"message": "%days{f.1} earth days"
"message": "%days{f.1} Earth days"
},
"N_EARTH_MASSES": {
"description": "",
"message": "%mass{f.3} Earth masses"
},
"N_WHATEVER_MASSES": {
"N_SOLAR_MASSES": {
"description": "",
"message": "%mass{f.3} %units masses"
"message": "%mass{f.3} Solar masses"
},
"N_WHATEVER_RADII": {
"N_EARTH_RADII": {
"description": "Used in system info view. E.g.: \"0.17 Earth radii (118235 km)\"",
"message": "%radius{f.3} Earth radii (%radkm{f.0} km)"
},
"N_SOLAR_RADII": {
"description": "Used in system info view. E.g. for Barnard's star: \"0.17 Solar radii (118235 km)\"",
"message": "%radius{f.3} %units radii (%radkm{f.0} km)"
"message": "%radius{f.3} Solar radii (%radkm{f.0} km)"
},
"N_YEARS": {
"description": "",
Expand Down Expand Up @@ -1335,10 +1339,6 @@
"description": "",
"message": "Social democracy"
},
"SOLAR": {
"description": "",
"message": "Solar"
},
"SOME_ESTABLISHED_MINING": {
"description": "",
"message": "Some established mining."
Expand Down
8 changes: 4 additions & 4 deletions src/LangStrings.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ DECLARE_STRING(INDUSTRIAL_HUB_SYSTEM)
DECLARE_STRING(VAST_STRIP_MINE)
DECLARE_STRING(HIGH_POPULATION_OUTDOOR_WORLD)
DECLARE_STRING(MASS)
DECLARE_STRING(N_WHATEVER_MASSES)
DECLARE_STRING(N_WHATEVER_RADII)
DECLARE_STRING(SOLAR)
DECLARE_STRING(EARTH)
DECLARE_STRING(N_EARTH_MASSES)
DECLARE_STRING(N_SOLAR_MASSES)
DECLARE_STRING(N_EARTH_RADII)
DECLARE_STRING(N_SOLAR_RADII)
DECLARE_STRING(SURFACE_TEMPERATURE)
DECLARE_STRING(SURFACE_GRAVITY)
DECLARE_STRING(N_CELSIUS)
Expand Down
4 changes: 2 additions & 2 deletions src/SystemInfoView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ void SystemInfoView::OnBodyViewed(SystemBody *b)
}

if (b->GetType() != SystemBody::TYPE_STARPORT_ORBITAL) {
_add_label_and_value(Lang::MASS, stringf(Lang::N_WHATEVER_MASSES, formatarg("mass", b->GetMassAsFixed().ToDouble()), formatarg("units", std::string(b->GetSuperType() == SystemBody::SUPERTYPE_STAR ? Lang::SOLAR : Lang::EARTH))));
_add_label_and_value(Lang::MASS, stringf(b->GetSuperType() == SystemBody::SUPERTYPE_STAR ? Lang::N_SOLAR_MASSES : Lang::N_EARTH_MASSES, formatarg("mass", b->GetMassAsFixed().ToDouble())));

_add_label_and_value(Lang::RADIUS, stringf(Lang::N_WHATEVER_RADII, formatarg("radius", b->GetRadiusAsFixed().ToDouble()), formatarg("units", std::string(b->GetSuperType() == SystemBody::SUPERTYPE_STAR ? Lang::SOLAR : Lang::EARTH)), formatarg("radkm", b->GetRadius() / 1000.0)));
_add_label_and_value(Lang::RADIUS, stringf(b->GetSuperType() == SystemBody::SUPERTYPE_STAR ? Lang::N_SOLAR_RADII : Lang::N_EARTH_RADII, formatarg("radius", b->GetRadiusAsFixed().ToDouble()), formatarg("radkm", b->GetRadius() / 1000.0)));
}

if (b->GetSuperType() == SystemBody::SUPERTYPE_STAR) {
Expand Down

0 comments on commit ca1ad55

Please sign in to comment.