Author Topic: Correct way to introduce new string variable  (Read 360 times)

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Correct way to introduce new string variable
« on: December 21, 2023, 05:04:15 pm »
What is the easiest and/or more correct way to introduce new translatable string variable?
There are few language files: one in common/Language others are in standard/xcom1, standard/xcom2, etc.

1. Where should this variable go?
2. Do I need to add it to ALL translation files at once? Would it harm them if not?
3. An easy tool to insert it to multiple translation files or it is a manual modder chore?

Thank you.

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8644
    • View Profile
Re: Correct way to introduce new string variable
« Reply #1 on: December 21, 2023, 05:49:11 pm »
What is the easiest and/or more correct way to introduce new translatable string variable?

manually

There are few language files: one in common/Language others are in standard/xcom1, standard/xcom2, etc.

1. Where should this variable go?

depends whether it's a translation common to openxcom, or specific to mods, e.g.

STR_OPENXCOM = OpenXcom

would naturally fo to "common"

STR_ENGINEERS: "Engineers"
and
STR_ENGINEERS: "Technicians"

would naturally go to standard/xcom*

2. Do I need to add it to ALL translation files at once? Would it harm them if not?

OXC and OXCE add only en-GB and en-US... other languages are maintained by Transifex

in your fork, you're free to do whatever makes sense to your case

3. An easy tool to insert it to multiple translation files or it is a manual modder chore?

it's a DEV chore, not a modder chore
I use Notepad++

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
Re: Correct way to introduce new string variable
« Reply #2 on: December 21, 2023, 06:02:45 pm »
Thanks. I thought about the same.