sul-dlss/argo

View on GitHub
app/components/language_selector_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

# Show the language selection controls for OCR text extraction workflows
class LanguageSelectorComponent < ApplicationComponent
  def initialize(form:)
    @form = form
  end

  def available_ocr_languages
    ABBYY_LANGUAGES.map { |lang| [lang, lang.gsub(/[ ()]/, '')] }
  end

  attr_reader :form
end