<commit_before>class ApplicationHelper::Button::VmWebmksConsole < ApplicationHelper::Button::VmConsole
  include VmwareConsoleHelper
  needs :@record

  def visible?
    console_supports_type?('WebMKS') if vmware? && @record.console_supported?('WebMKS')
  end

  def disabled?
    canned_msg = _('The web-based WebMKS console is not available because')
    @error_message = _("%{canned_msg} the required libraries aren't installed" % {:canned_msg => canned_msg}) unless webmks_assets_provided?
    @error_message = _("%{canned_msg} the VM is not powered on" % {:canned_msg => canned_msg}) unless on?
    @error_message = _("%{canned_msg} the VM does not support the minimum required vSphere API version." % {:canned_msg => canned_msg}) unless supported_vendor_api?
    @error_message.present?
  end

  def supported_vendor_api?
    ExtManagementSystem.find(@record.ems_id).api_version.to_f >= min_required_api_version
  end

  def min_required_api_version
    6.0
  end
end
<commit_msg>Remove string concatenation for easier translation.<commit_after>class ApplicationHelper::Button::VmWebmksConsole < ApplicationHelper::Button::VmConsole
  include VmwareConsoleHelper
  needs :@record

  def visible?
    console_supports_type?('WebMKS') if vmware? && @record.console_supported?('WebMKS')
  end

  def disabled?
    @error_message = _("The web-based WebMKS console is not available because the required libraries aren't installed") unless webmks_assets_provided?
    @error_message = _("The web-based WebMKS console is not available because the VM is not powered on") unless on?
    @error_message = _("The web-based WebMKS console is not available because the VM does not support the minimum required vSphere API version.") unless supported_vendor_api?
    @error_message.present?
  end

  def supported_vendor_api?
    ExtManagementSystem.find(@record.ems_id).api_version.to_f >= min_required_api_version
  end

  def min_required_api_version
    6.0
  end
end

{'fraction_non_alphanumeric': 0.08808553971486761, 'fraction_numerical': 0.002036659877800407, 'mean_word_length': 5.25796178343949, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4330248', 'n_tokens_mistral': 605, 'n_tokens_neox': 585, 'n_words': 165}