fs2open.github.com icon indicating copy to clipboard operation
fs2open.github.com copied to clipboard

New controls not translatable

Open Achille44 opened this issue 3 years ago • 2 comments

New controls added by SCP are apparently not bound to any XSTR ID in strings.tbl and so cannot be translated. It involves the following controls:

  • Glide when pressed
  • Toggle gliding
  • Cycle primary weapon firing rate
  • Top-down view
  • Target padlock view
  • Toggle auto pilote
  • Cycle nav points

Achille44 avatar Sep 01 '22 15:09 Achille44

Ideally this should be worked on after #4543 is completed?

wookieejedi avatar Sep 02 '22 01:09 wookieejedi

#4543 should be merged first before tackling this issue, yes.

Some key points from a brief look: controlsconfig.h::CONTROL_CONFIG_XSTR is an index used by hardcoded controls to be lazy and not need to specify the exact index for every control. This may need to be revisited. It's used in controlsconfig.cpp:700.

XSTR can have 1 of 3 values: The XSTR index into strings (or tstrings?) .tbl, a value of 1 to use the CONTROL_CONFIG_XST and the control's relative position in controlsconfig (used by hardcode), or any value equal to or less than 0 to default to English without a translation.

Before tackling the missing XSTR's for SCP added controls, we'll need to sweep through the code to ensure all indices are used correctly.

z64555 avatar Sep 02 '22 02:09 z64555