aliens

Author Topic: Questions regarding strings  (Read 6115 times)

Offline cort

  • Sergeant
  • **
  • Posts: 43
    • View Profile
Questions regarding strings
« on: October 05, 2013, 09:45:47 am »
So I started checking where the strings are used, and I have some questions.

1. There are some strings that I could not find where are they used:
Code: [Select]
STR_YOU_WILL_NEED_TO_RESEARCH_A
STR_XCOM_BASES
STR_BUILD_NEW_BASE
STR_START_PROJECT
STR_UNITS_TO
STR_PRODUCE

STR_UNITS_TO and STR_PRODUCE appear to be meant to be used in the manufacture item screen, but there is a string already being used here, i.e. STR_TOTAL_TO_PRODUCE.

2. Everywhere into the game xcom is written as XCom, but the string STR_XCOM, displayed at the start of the turn, is written as Xcom.

3. There are some inconsistencies regarding color of some screens:

Research Screen

blue borders, purple buttons


yellow border, blue buttons

As a side note, I think this is the screen in which STR_START_PROJECT would be used instead of the OK button.

Manufacture Screen

purple borders for base, red for popup, blue buttons


blue borders for popup, blue buttons


red borders for popup, blue buttons

This is the screen where STR_TOTAL_TO_PRODUCE is used, and probably replaced STR_UNITS_TO and STR_PRODUCE.

In the second research screen STR_INCREASE and STR_DECREASE are used, while in the manufacture screen STR_INCREASE_UC and STR_DECREASE_UC - which look kind of strange. To me it looks like the screens consistent, with these strings being different.
I know that the project wants to be like the original, so it's no biggie, just some observations. I will continue checking the strings and where are they used, and I will post the table when it's finished, to make te job easy for translators.

Offline radius75

  • Colonel
  • ****
  • Posts: 108
  • I am the average PC user!
    • View Profile
Re: Questions regarding strings
« Reply #1 on: October 05, 2013, 10:51:29 am »
Quote
As a side note, I think this is the screen in which STR_START_PROJECT would be used instead of the OK button.

not when researching are in progress, "OK" here is more suitable

edit
https://github.com/SupSuper/OpenXcom/blob/5afe0b7106faceb100f0cbfa118970503e4914f6/src/Basescape/ResearchInfoState.cpp#L171

Code: [Select]
@@ -166,21 +166,22 @@ void ResearchInfoState::buildUi ()
  _timerMore->onTimer((StateHandler)&ResearchInfoState::more);
  _timerLess = new Timer(250);
  _timerLess->onTimer((StateHandler)&ResearchInfoState::less);
 
  _btnOk->setColor(Palette::blockOffset(13)+10);
- _btnOk->setText(tr("STR_OK"));
  _btnOk->onMouseClick((ActionHandler)&ResearchInfoState::btnOkClick);
  _btnOk->onKeyboardPress((ActionHandler)&ResearchInfoState::btnOkClick, (SDLKey)Options::getInt("keyOk"));
  _btnCancel->setColor(Palette::blockOffset(13)+10);
  if (_rule)
  {
+ _btnOk->setText(tr("STR_START_PROJECT"));
  _btnCancel->setText(tr("STR_CANCEL"));
  _btnCancel->onKeyboardPress((ActionHandler)&ResearchInfoState::btnCancelClick, (SDLKey)Options::getInt("keyCancel"));
  }
  else
  {
+ _btnOk->setText(tr("STR_OK"));
  _btnCancel->setText(tr("STR_CANCEL_PROJECT"));
  _btnOk->onKeyboardPress((ActionHandler)&ResearchInfoState::btnOkClick, (SDLKey)Options::getInt("keyCancel"));
  }
  _btnCancel->onMouseClick((ActionHandler)&ResearchInfoState::btnCancelClick);
 }

« Last Edit: October 05, 2013, 11:46:16 am by radius75 »

Offline Align

  • Colonel
  • ****
  • Posts: 196
    • View Profile
Re: Questions regarding strings
« Reply #2 on: October 05, 2013, 06:10:09 pm »
I would assume the colour variance is to draw the players eye towards the contents of the window or some such subtle stuff.

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Questions regarding strings
« Reply #3 on: October 05, 2013, 07:56:45 pm »
So I started checking where the strings are used, and I have some questions.

1. There are some strings that I could not find where are they used:
Code: [Select]
STR_YOU_WILL_NEED_TO_RESEARCH_A
STR_XCOM_BASES
STR_BUILD_NEW_BASE
STR_START_PROJECT
STR_UNITS_TO
STR_PRODUCE
A lot of strings are unused, either because they are remains of dropped features in the original (like STR_YOU_WILL_NEED_TO_RESEARCH_A) or because OpenXcom has made them obsolete (STR_START_PROJECT was used in a research confirmation screen which became redudant since you can just cancel projects now). Eventually I'll have to go through it and clean it up.


STR_UNITS_TO and STR_PRODUCE appear to be meant to be used in the manufacture item screen, but there is a string already being used here, i.e. STR_TOTAL_TO_PRODUCE.
However you are correct about this mistake, I'll be sure to fix it in the string revision.

2. Everywhere into the game xcom is written as XCom, but the string STR_XCOM, displayed at the start of the turn, is written as Xcom.

3. There are some inconsistencies regarding color of some screens:
Trying to find consistency in X-Com is a fool's errand. :P Developers aren't designers or even writers, which becomes immediately apparent. I'll make a note of #2 though.

I do agree with Align that popup windows having a different color from the main screen helps them stand out more.

I know that the project wants to be like the original, so it's no biggie, just some observations. I will continue checking the strings and where are they used, and I will post the table when it's finished, to make te job easy for translators.
I've considered making a reference list for translators (after all I already have screenshots of every single X-Com screen), it's just a pain to manually hook it up to GetLocalization. I might just post the screenshots in your thread or something to help people out.

not when researching are in progress, "OK" here is more suitable

edit
https://github.com/SupSuper/OpenXcom/blob/5afe0b7106faceb100f0cbfa118970503e4914f6/src/Basescape/ResearchInfoState.cpp#L171

Code: [Select]
@@ -166,21 +166,22 @@ void ResearchInfoState::buildUi ()
  _timerMore->onTimer((StateHandler)&ResearchInfoState::more);
  _timerLess = new Timer(250);
  _timerLess->onTimer((StateHandler)&ResearchInfoState::less);
 
  _btnOk->setColor(Palette::blockOffset(13)+10);
- _btnOk->setText(tr("STR_OK"));
  _btnOk->onMouseClick((ActionHandler)&ResearchInfoState::btnOkClick);
  _btnOk->onKeyboardPress((ActionHandler)&ResearchInfoState::btnOkClick, (SDLKey)Options::getInt("keyOk"));
  _btnCancel->setColor(Palette::blockOffset(13)+10);
  if (_rule)
  {
+ _btnOk->setText(tr("STR_START_PROJECT"));
  _btnCancel->setText(tr("STR_CANCEL"));
  _btnCancel->onKeyboardPress((ActionHandler)&ResearchInfoState::btnCancelClick, (SDLKey)Options::getInt("keyCancel"));
  }
  else
  {
+ _btnOk->setText(tr("STR_OK"));
  _btnCancel->setText(tr("STR_CANCEL_PROJECT"));
  _btnOk->onKeyboardPress((ActionHandler)&ResearchInfoState::btnOkClick, (SDLKey)Options::getInt("keyCancel"));
  }
  _btnCancel->onMouseClick((ActionHandler)&ResearchInfoState::btnCancelClick);
 }
Not a bad idea, though both strings would have to be uppercase then.

Offline cort

  • Sergeant
  • **
  • Posts: 43
    • View Profile
Re: Questions regarding strings
« Reply #4 on: October 11, 2013, 06:31:09 pm »
When base defenses are initiated, STR_UNDER_ATTACK is used as a title, as in attached screenshot.
This string does not exist. It should be STR_BASE_UNDER_ATTACK

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Questions regarding strings
« Reply #5 on: October 12, 2013, 08:38:15 am »
All fixed.