\BuildTransifexTranslations

Synopsis

class BuildTransifexTranslations extends Task {
  • // members
  • private string $txapi = 'https://www.transifex.com/api/2';
  • private string $txproject = '';
  • private string $txAuthFile = 'transifexAuth.json';
  • private  $txAuth = NULL;
  • private string $root = '';
  • private string $jsDir = '/lang/js';
  • private string $ymlDir = '/lang';
}

Hierarchy

Extends

  • Task

Members

private

  • $jsDir
  • $root
  • $txAuth
  • $txAuthFile
  • $txapi
  • $txproject
  • $ymlDir

Methods

private

  • getBanner() — Return the commented file banner.
  • getJSTemplate() — Return the SilverStripe JS lang file template.
  • resetTranslations() — Clear any existing translation files and create directory structure if needed.
  • saveJSTranslation() — Save a JS translation file Uses JSTemplate to fit with SilverStripe requirements.
  • saveTranslation() — Hook that detect the translation type via resource slug and call corect saving function with data.

public