{% 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 #} {% if webapp and waffle.switch('marketplace') %} {% endif %}
{{ _('Basic Information for {0}')|f(addon.name) }}
{% if editable %} {{ form.name }} {{ form.name.errors }} {% else %} {{ addon|all_locales('name') }} {% endif %}
{% if webapp %} {# TODO(apps): Finalize copy. #} {{ tip('App URL', 'Choose a short, unique URL slug for your app.') }} {% else %} {{ tip(_("Add-on URL"), _("Choose a short, unique URL slug for your add-on.")) }} {% endif %} {% if editable %}
{{ settings.SITE_URL }}/…/{{ form.slug }}
{{ form.slug.errors }} {% else %} {{ settings.SITE_URL }}/…/{{ addon.app_slug if webapp else addon.slug }} {{ _('View Listing') }} {% endif %}
{% if editable %} {{ form.summary }} {{ form.summary.errors }}
{% else %} {{ addon|all_locales('summary') }} {% endif %}
{% if webapp %} {# TODO(apps): Finalize copy. #} {{ tip('Categories', "Categories are the primary way users browse through apps. Choose any that fit your app's functionality for the most exposure.") }} {% else %} {{ 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.")) }} {% endif %} {% 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 }}

{% if webapp %} {# TODO(apps): Finalize copy. #} {% with email='amo-editors@mozilla.org' %} Categories cannot be changed while your app is featured. Please email {{ email }} if there is a reason you need to modify your categories. {% endwith %} {% else %} {% 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 %} {% endif %}

{% else %} {{ select_cats(amo.MAX_CATEGORIES, form, webapp) }} {% endif %} {% endfor %} {% else %} {% set categories = addon.app_categories %} {% call empty_unless(categories) %}
    {% for app, cats in categories %}
  • {% if not webapp %} {{ app.pretty }}: {% endif %} {{ cats|join(' · ')|safe }}
  • {% endfor %}
{% endcall %} {% endif %}
{{ tip(loc('Device Types'), loc('Indicate support for desktop, mobile and tablet devices.')) }} {% if editable %} {{ device_type_form.device_types.errors }} {{ device_type_form.device_types }} {% else %} {% set device_types = addon.device_types %} {% call empty_unless(device_types) %}
    {% for device in device_types %}
  • {{ device.name }}
  • {% endfor %}
{% endcall %} {% endif %}
{% if webapp %} {# TODO(apps): Finalize copy. #} {{ tip('Tags', "Tags help users find your app and should be short descriptors such as tabs, toolbar, or twitter. You may have a maximum of {0} tags.".format(amo.MAX_TAGS)) }} {% else %} {{ 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.").format(amo.MAX_TAGS)) }} {% endif %} {% 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: pop, hen, yum. 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 %}