Projet

Général

Profil

Révision e0d35157

Ajouté par Assos Assos il y a plus de 6 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/i18n/i18n_string/i18n_string.module
620 620
 *   Message if the user cannot translate that string.
621 621
 */
622 622
function i18n_string_translate_check_string($i18nstring, $account = NULL) {
623
  if (!user_access('translate interface', $account) || !user_access('translate user-defined strings', $account)) {
623
  // Check block translation permissions.
624
  if ($i18nstring->textgroup == 'blocks') {
625
    if (!user_access('translate interface', $account) && !user_access('translate blocks', $account)) {
626
      return t('This is a user-defined string within a block. You are not allowed to translate blocks.');
627
    }
628
  }
629
  elseif (!user_access('translate interface', $account) || !user_access('translate user-defined strings', $account)) {
624 630
    return t('This is a user-defined string. You are not allowed to translate these strings.');
625 631
  }
626
  elseif (!empty($i18nstring->format)) {
632

  
633
  if (!empty($i18nstring->format)) {
627 634
    if (!i18n_string_allowed_format($i18nstring->format)) {
628 635
      $format = filter_format_load($i18nstring->format);
629 636
      return t('This string uses the %name text format. Strings with this format are not allowed for translation.', array('%name' => $format->name));

Formats disponibles : Unified diff