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

HUD translation contexts #2185

Open
ajtribick opened this issue May 20, 2024 · 1 comment
Open

HUD translation contexts #2185

ajtribick opened this issue May 20, 2024 · 1 comment

Comments

@ajtribick
Copy link
Collaborator

ajtribick commented May 20, 2024

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.

@375gnu
Copy link
Collaborator

375gnu commented May 21, 2024

I added this like a reminder, but never implemented this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants