Way to programmatically add string translations?
Put the following helper function in your custom module:

use \Drupal\locale\SourceString;

function mymodule_add_translation($source_string, $translated_string, $langcode) {
  // Find existing source string.
  $storage = \Drupal::service('locale.storage');
  $string = $storage-&gt;findString(array('source' =&gt; $source_string));
  if (is_null($string)) {
    $string = new SourceString();
    $string-&gt;setString($source_string);
    $string-&gt;setStorage($storage);
    $string-&gt;save();
  }
  // Create translation. If one already exists, it will be replaced.
  $translation = $storage-&gt;createTranslation(array(
    'lid' =&gt; $string-&gt;lid,
    'language' =&gt; $langcode,
    'translation' =&gt; $translated_string,
  ))-&gt;save();
}