Page 1 of 1

Using metasite translation strings in game

Posted: 06 September 2020, 16:42
by quietmint
Is it possible to use metasite translations in my game, to avoid making people translate the same text again? I am using the following to get string from BGA main site and it works. The game shows the translated text (I tested with Danish language):

Code: Select all

      var resetCameraBlock = this.format_block('jstpl_resetCamera', {
        camera: _('Camera'),
        reset: __('lang_mainsite', 'Reset to default'),
      });
Screen Shot 2020-09-06 at 11.30.15.png
Screen Shot 2020-09-06 at 11.30.15.png (10.21 KiB) Viewed 434 times

However, BGA translation system incorrectly shows this as a string specifically for Santorini game. The community should not be asked to provide a translation here (it would not be used anyway).
Screen Shot 2020-09-06 at 11.28.11.png
Screen Shot 2020-09-06 at 11.28.11.png (31.98 KiB) Viewed 434 times

Re: Using metasite translation strings in game

Posted: 11 September 2020, 09:54
by Een
TLDR: please don't do that :)

On principle this would be possible, and we could update the static translations extraction process to not take into account translatable strings inserted like you did. BUT this would create an adherence between the modules and the mainsite, and depending upon context it could lead to semantic issues (the same string in English can have widely distinct translations in other languages if the context is not exactly the same).

The overlap between the mainsite and the games being in general very small, the extra translation work is actually very small too, and we prefer to keep translations modular to keep things simple and avoid other complex issue appearing down the line.