Sha256: e29008d2de4d0b50609301fc51260880ed892bae5a65953ffad3ffcca5825b93

Contents?: true

Size: 1.86 KB

Versions: 4

Compression:

Stored size: 1.86 KB

Contents

<%- errors.each do |file, errs| -%>
=== <%= file %>
  <%- errs.each do |full_key, err| -%>
    <%= full_key %>  #<%= err.line %>
    <%- case err when nil -%>
    <%- when I18nFlow::Validator::InvalidTypeError -%>
      <%- if err.single? -%>
        A file must start with scopes that derive from its file path
        reason: it must not have a scalar value
      <%- else -%>
        Structure mismatches with the master file
      <%- end -%>
    <%- when I18nFlow::Validator::MissingKeyError -%>
      <%- if err.single? -%>
        A file must start with scopes that derive from its file path
        reason: missing key
      <%- else -%>
        The key is missing
      <%- end -%>
    <%- when I18nFlow::Validator::ExtraKeyError -%>
      <%- if err.single? -%>
        A file must start with scopes that derive from its file path
        reason: extra key
      <%- else -%>
        An extra key found
      <%- end -%>
    <%- when I18nFlow::Validator::InvalidTodoError -%>
        Todo cannot be annotated on a mapping/sequence
    <%- when I18nFlow::Validator::TodoContentError -%>
      <%- if err.inverse -%>
        It has "!todo" but the content diverges from the foreign file
        foreign: <%= err.expect %>
        master:  <%= err.actual %>
      <%- else -%>
        It has "!todo" but the content diverges from the master file
        master:  <%= err.expect %>
        foreign: <%= err.actual %>
      <%- end -%>
    <%- when I18nFlow::Validator::InvalidLocaleError -%>
        It has "!only" but the locale is invalid
        valid: [<%= err.expect.join(', ') %>]
        got:   <%= err.actual %>
    <%- when I18nFlow::Validator::AsymmetricArgsError -%>
        Interpolation arguments diverge from the master file
        master:  [<%= err.expect.join(', ') %>]
        foreign: [<%= err.actual.join(', ') %>]
    <%- end -%>
  <%- end -%>

<%- end -%>
<%= summary_line %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
i18n_flow-0.2.3 lib/i18n_flow/cli/lint_command/ascii.erb
i18n_flow-0.2.2 lib/i18n_flow/cli/lint_command/ascii.erb
i18n_flow-0.2.1 lib/i18n_flow/cli/lint_command/ascii.erb
i18n_flow-0.2.0 lib/i18n_flow/cli/lint_command/ascii.erb