Skip to content

HUD translation contexts #2185

@ajtribick

Description

@ajtribick

The use of CX_ in hud.cpp seems dubious:

Celestia/src/celestia/hud.cpp

Lines 1031 to 1056 in 1875701

if (!sim->getTrackedObject().empty())
m_overlay->printf(_("Track %s\n"), CX_("Track", getSelectionName(sim->getTrackedObject(), u)));
else
m_overlay->print("\n");
Selection refObject = sim->getFrame()->getRefObject();
switch (sim->getFrame()->getCoordinateSystem())
{
case ObserverFrame::Ecliptical:
m_overlay->printf(_("Follow %s\n"),
CX_("Follow", getSelectionName(refObject, u)));
break;
case ObserverFrame::BodyFixed:
m_overlay->printf(_("Sync Orbit %s\n"),
CX_("Sync", getSelectionName(refObject, u)));
break;
case ObserverFrame::PhaseLock:
m_overlay->printf(_("Lock %s -> %s\n"),
CX_("Lock", getSelectionName(refObject, u)),
CX_("LockTo", getSelectionName(sim->getFrame()->getTargetObject(), u)));
break;
case ObserverFrame::Chase:
m_overlay->printf(_("Chase %s\n"),
CX_("Chase", getSelectionName(refObject, u)));
break;

The intention appears to be to allow for translations of object names in the context of phrases like "Follow ", which may differ from the usual display form (e.g. in languages where names vary according to grammatical case). However, the lookup is being done on the "celestia" domain, not the "celestia-data" domain, and the input string is the the already-translated name. Since we do not actually generate such phrases in our translation files, these effectively become a no-op.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions