MCPcopy Create free account
hub / github.com/error311/FileRise / localizeMenu

Function localizeMenu

public/js/fileMenu.js:20–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18
19// One-time: localize labels
20function localizeMenu() {
21 const m = qMenu(); if (!m) return;
22 const map = {
23 'create_file': 'create_file',
24 'delete_selected': 'delete_selected',
25 'copy_selected': 'copy_selected',
26 'move_selected': 'move_selected',
27 'download_zip': 'download_zip',
28 'extract_zip': 'extract_zip',
29 'tag_selected': 'tag_selected',
30 'preview': 'preview',
31 'edit': 'edit',
32 'rename': 'rename',
33 'tag_file': 'tag_file',
34 // NEW:
35 'download_plain': 'download_plain',
36 'link_file': 'link_file',
37 'share_file': 'share_file'
38 };
39 Object.entries(map).forEach(([action, key]) => {
40 const el = m.querySelector(`.mi[data-action="${action}"]`);
41 if (el) setText(el, key);
42 });
43}
44
45// Show/hide items based on selection state
46function configureVisibility({ any, one, many, anyZip, canEdit, allowLink, allowShare, allowZip, allowExtractZip }) {

Callers 1

bindFileListContextMenuFunction · 0.85

Calls 2

qMenuFunction · 0.85
setTextFunction · 0.70

Tested by

no test coverage detected