.page-header
  %h2
    = Yii::t("app", "Translations").": ".strtoupper($language)
    %a(href="#{url('debug/Translations')}")=t('Back')

%form(method="post")
  %input(type="submit")
  %input(type="hidden" name="language" value="#{$language}")
  %input(type="hidden" name="action" value="translate")
  %table.table.table-condensed
    %thead
      %tr
        %th(style="width: 10%")=t('Category')
        %th(style="width: 40%")=t('Source')
        %th(style="width: 40%")=t('Translation')
        %th(style="width: 5%")=t('Custom')
        %th(style="width: 5%")=t('Ignore')
        %th(style="width: 5%")=t('Remove')
        %th(style="width: 5%")=t('Nope')
    %tbody
      -$index = 0
      -foreach($l->getCategories() as $category)
        -foreach($l->loadMessageType('untranslated',$category) as $source)
          -$msgid = "message_".uniqid().($index++)
          %tr
            %td(style="width: 10%")=$category
            %td(style="width: 40%")=$source
            %td(style="width: 40%")
              %input(type="hidden" name="#{$msgid}[category]" value="#{$category}")
              %input(type="hidden" name="#{$msgid}[message_original]" value="#{$source}")
              %input(type="radio" name="#{$msgid}[action]" value="translate" title="Translate")
              %input(type="text" name="#{$msgid}[message_translation]" value="#{$source}" style="width: 90%")
            %td(style="width: 5%")
              %input(type="radio" name="#{$msgid}[action]" value="custom" title="Custom")
            %td(style="width: 5%")
              %input(type="radio" name="#{$msgid}[action]" value="ignore" title="Ignore")
            %td(style="width: 5%")
              %input(type="radio" name="#{$msgid}[action]" value="remove" title="Remove")
            %td(style="width: 5%")
              %input(type="radio" name="#{$msgid}[action]" value="nope" title="Nope" checked="checked")
  %input(type="submit")
          
            