Wall: Translate the post attachment menu

This commit is contained in:
Maxim Leshchenko 2021-12-13 18:22:04 +02:00
parent a31655cf2d
commit c4303ad566
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE
4 changed files with 10 additions and 4 deletions

View file

@ -55,7 +55,7 @@
<input type="submit" value="{_'write'}" class="button" />
<div style="float: right; display: flex; flex-direction: column;">
<a href="javascript:void(u('#post-buttons{$textAreaId} #wallAttachmentMenu').toggleClass('hidden'));">
Прикрепить
{_attach}
</a>
<div id="wallAttachmentMenu" class="hidden">
@ -65,11 +65,11 @@
</a>
<a href="javascript:void(document.querySelector('#post-buttons{$textAreaId} input[name=_vid_attachment]').click());">
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/mimetypes/application-vnd.rn-realmedia.png" />
Прикрепить видео
{_attach_video}
</a>
<a n:if="$graffiti ?? false" href="javascript:initGraffiti({$textAreaId});">
<img src="/assets/packages/static/openvk/img/oxygen-icons/16x16/actions/draw-brush.png" />
Нарисовать граффити
{_draw_graffiti}
</a>
</div>
</div>

View file

@ -39,7 +39,7 @@ function handleUpload(id) {
function initGraffiti(id) {
let canvas = null;
let msgbox = MessageBox("Нарисовать граффити", "<div id='ovkDraw'></div>", ["Сохранить", "Отменить"], [function() {
let msgbox = MessageBox(tr("draw_graffiti"), "<div id='ovkDraw'></div>", [tr("save"), tr("cancel")], [function() {
canvas.getImage({includeWatermark: false}).toBlob(blob => {
let fName = "Graffiti-" + Math.ceil(performance.now()).toString() + ".jpeg";
let image = new File([blob], fName, {type: "image/jpeg", lastModified: new Date().getTime()});

View file

@ -168,7 +168,10 @@
"contains_nsfw" = "Contains NSFW content";
"nsfw_warning" = "This post may have NSFW-content";
"report" = "Report";
"attach" = "Attach";
"attach_photo" = "Attach photo";
"attach_video" = "Attach video";
"draw_graffiti" = "Draw graffiti";
"no_posts_abstract" = "Nobody wrote anything here... So far.";
"attach_no_longer_available" = "This attachment is no longer available.";
"open_post" = "Open post";

View file

@ -171,7 +171,10 @@
"contains_nsfw" = "Содержит NSFW-контент";
"nsfw_warning" = "Данный пост может содержать 18+ контент";
"report" = "Пожаловаться";
"attach" = "Прикрепить";
"attach_photo" = "Прикрепить фото";
"attach_video" = "Прикрепить видео";
"draw_graffiti" = "Нарисовать граффити";
"no_posts_abstract" = "Здесь никто ничего не написал... Пока.";
"attach_no_longer_available" = "Это вложение больше недоступно.";
"open_post" = "Открыть запись";