'@exactmatchcount exact result(s) out of @count relevant result(s) for “@keys”', 'fr' => '@exactmatchcount résultat(s) exact(s) sur @count résultat(s) pertinent(s) pour « @keys »', ]; } /** * Adds the French translation of the new search message (H6). */ function materio_sapi_update_11001(): string { if (!\Drupal::moduleHandler()->moduleExists('locale')) { return 'locale is off: nothing to translate.'; } $strings = materio_sapi_search_infos_strings(); $storage = \Drupal::service('locale.storage'); $source = $storage->findString(['source' => $strings['source'], 'context' => '']); if (!$source) { $source = $storage->createString(['source' => $strings['source'], 'context' => ''])->save(); } $storage->createTranslation([ 'lid' => $source->lid, 'language' => 'fr', 'translation' => $strings['fr'], 'customized' => LOCALE_CUSTOMIZED, ])->save(); _locale_refresh_translations(['fr'], [$source->lid]); return 'French translation of the search message added.'; }