|
33 | 33 | </ul> |
34 | 34 | </nav> |
35 | 35 | {% if False %} |
36 | | - {# dynamic `_(ap_type_choice)` lookup above isn't statically extractable; these |
37 | | - calls exist only so `pybabel extract` picks up each label. #} |
| 36 | + {# dynamic `_(...)` lookups (the type labels above, the visibility names |
| 37 | + below) aren't statically extractable; these calls exist only so |
| 38 | + `pybabel extract` picks up each label. The visibility strings must stay |
| 39 | + byte-identical to `VisibilityEnum.get_display_name`. #} |
38 | 40 | {{ _("Note") }}{{ _("Article") }}{{ _("Question") }} |
| 41 | + {{ _("Public - sent to followers and visible on the homepage") }} |
| 42 | + {{ _("Unlisted - like public, but hidden from the homepage") }} |
| 43 | + {{ _("Followers only") }} |
| 44 | + {{ _("Direct - only visible for mentioned actors") }} |
39 | 45 | {% endif %} |
40 | 46 |
|
41 | 47 | {% if error %} |
|
50 | 56 | <label for="visibility">{{ _("Visibility") }}</label> |
51 | 57 | <select name="visibility" id="visibility"> |
52 | 58 | {% for (k, v) in visibility_choices %} |
53 | | - <option value="{{ k }}" {% if visibility == k or in_reply_to_object and in_reply_to_object.visibility.name == k %}selected{% endif %}>{{ v }}</option> |
| 59 | + <option value="{{ k }}" {% if visibility == k or in_reply_to_object and in_reply_to_object.visibility.name == k %}selected{% endif %}>{{ _(v) }}</option> |
54 | 60 | {% endfor %} |
55 | 61 | </select> |
56 | 62 | </p> |
|
63 | 69 | {% endif %} |
64 | 70 |
|
65 | 71 | <p class="form-field"> |
66 | | - <label for="content">{{ _("Content") }}</label> |
| 72 | + <label for="content" class="visually-hidden">{{ _("Content") }}</label> |
67 | 73 | {% if emojis or custom_emojis %} |
68 | 74 | <div class="emoji-picker"> |
| 75 | + {# Unicode emoji are rendered as plain characters, not via `emojify`: |
| 76 | + the picker shows exactly what gets inserted, and it keeps working |
| 77 | + when `inv download-twemoji` hasn't populated app/static/twemoji. #} |
69 | 78 | {% for emoji in emojis %} |
70 | | - <button type="button" class="ji">{{ emoji | emojify(True) | safe }}</button> |
| 79 | + <button type="button" class="ji" data-emoji="{{ emoji }}" title="{{ emoji }}">{{ emoji }}</button> |
71 | 80 | {% endfor %} |
72 | 81 | {% for emoji in custom_emojis %} |
73 | | - <button type="button" class="ji"><img src="{{ emoji.icon.url }}" alt="{{ emoji.name }}" title="{{ emoji.name }}" class="custom-emoji" loading="lazy"></button> |
| 82 | + <button type="button" class="ji" data-emoji="{{ emoji.name }}" title="{{ emoji.name }}"><img src="{{ emoji.icon.url }}" alt="{{ emoji.name }}" class="custom-emoji" loading="lazy"></button> |
74 | 83 | {% endfor %} |
75 | 84 | </div> |
76 | 85 | {% endif %} |
|
115 | 124 | <p class="form-field"> |
116 | 125 | <label for="alias">{{ _("URL alias") }}</label> |
117 | 126 | <input type="text" class="width-95" id="alias" name="alias" placeholder="{{ _("optional") }}" value="{{ alias or "" }}"> |
| 127 | + <span class="muted">{{ _("A short custom URL for this post, instead of its permalink.") }}</span> |
118 | 128 | </p> |
119 | 129 |
|
120 | 130 | <p class="form-field"> |
|
131 | 141 | <input type="hidden" name="quote_of" value="{{ quote_of or "" }}"> |
132 | 142 | <p class="form-field"> |
133 | 143 | <label for="files">{{ _("Attachments") }}</label> |
134 | | - <input id="files" name="files" type="file" class="width-95" multiple accept="image/*,video/*,audio/*"> |
| 144 | + <input id="files" name="files" type="file" class="width-95" multiple accept="image/*,video/*,audio/*" |
| 145 | + data-msg-checking="{{ _("%(filename)s: checking playback in this browser…", filename="__FILENAME__") }}" |
| 146 | + data-msg-plays="{{ _("%(filename)s: %(details)s — plays in this browser", filename="__FILENAME__", details="__DETAILS__") }}" |
| 147 | + data-msg-unsupported="{{ _("%(filename)s: this browser could not play this file (unsupported codec/container) — it may be rejected on upload. Re-encoding as H.264/AAC in an MP4 is the safest bet.", filename="__FILENAME__") }}" |
| 148 | + data-msg-nopreview="{{ _("%(filename)s: couldn't generate a local preview in this browser (this check isn't authoritative — it may still upload and play fine; the server has the final say).", filename="__FILENAME__") }}"> |
135 | 149 | </p> |
136 | 150 | <div id="alts" data-alt-placeholder="{{ _("Alt text for %(filename)s", filename="__FILENAME__") }}"></div> |
137 | 151 | <p> |
|
0 commit comments