{% from "devhub/includes/macros.html" import tip, empty_unless, select_cats, trans_readonly %}

{{ _('Basic Information') }} {% if not editable %} {{ _('Edit') }} {% endif %}

{# L10n: {0} is the addon name #}
{{ _('Basic Information for {0}')|fe(addon.name) }}
{% if editable %} {{ form.name }} {{ form.name.errors }} {% else %} {{ addon|all_locales('name') }} {% endif %}
{{ tip(_("Add-on URL"), _("Choose a short, unique URL slug for your add-on.")) }} {% if editable %}
{{ settings.SITE_URL }}/…/{{ form.slug }}
{{ form.slug.errors }} {% else %} {{ settings.SITE_URL }}/…/{{ addon.slug }} {% if addon.is_listed %}{{ _('View Listing') }}{% endif %} {% endif %}
{% if editable %} {{ form.summary }} {{ form.summary.errors }}
{% else %} {{ addon|all_locales('summary') }} {% endif %}
{{ tip(_("Categories"), _("Categories are the primary way users browse through add-ons. " "Choose any that fit your add-on's functionality for the most " "exposure. It is only relevant for listed add-ons.")) }} {% if editable %} {{ cat_form.non_form_errors() }} {{ cat_form.management_form }} {% for form in cat_form.initial_forms %} {% if form.disabled %}

{{ form.app.pretty }}: {% set cats = dict(addon.app_categories).get(form.app, []) %} {{ cats|join(' · ')|safe }}

{% trans email='amo-editors@mozilla.org' %} Categories cannot be changed while your add-on is featured for this application. Please email {{ email }} if there is a reason you need to modify your categories. {% endtrans %}

{% else %} {{ select_cats(amo.MAX_CATEGORIES, form) }} {% endif %} {% endfor %} {% else %} {% set categories = addon.app_categories %} {% call empty_unless(categories) %}
    {% for app, cats in categories %}
  • {{ app.pretty }}: {{ cats|join(' · ')|safe }}
  • {% endfor %}
{% endcall %} {% endif %}
{{ tip(_("Tags"), _("Tags help users find your add-on and should be short " "descriptors such as tabs, toolbar, or twitter. You " "may have a maximum of {0} tags. It is only relevant " "for listed add-ons.").format(amo.MAX_TAGS)) }} {% if editable %} {{ form.tags }} {{ form.tags.errors }}
{{ ngettext('Comma-separated, minimum of {0} character.', 'Comma-separated, minimum of {0} characters.', amo.MIN_TAG_LENGTH)|f(amo.MIN_TAG_LENGTH) }} {{ _('Example: dark, cinema, noir. Limit 20.') }}
{% if restricted_tags %}
{{ ngettext('Reserved tag:', 'Reserved tags:', restricted_tags|length) }} {{ restricted_tags|join(', ') }}
{% endif %} {% else %} {% call empty_unless(tags) %} {{ tags|join(', ') }} {% endcall %} {% endif %}
{% if editable %} {% endif %}