Searchable by dropdown

main
Bob Mottram 2024-10-12 11:26:17 +01:00
parent 8a07b8d924
commit 95c8e3ea48
29 changed files with 112 additions and 28 deletions

View File

@ -700,5 +700,7 @@
"Pronouns": "الضمائر", "Pronouns": "الضمائر",
"Music": "موسيقى", "Music": "موسيقى",
"Art": "فن", "Art": "فن",
"Reply Controls": "عناصر التحكم في الرد" "Reply Controls": "عناصر التحكم في الرد",
"Searchable by": "قابلة للبحث بواسطة",
"Yourself": "نفسك"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "সর্বনাম", "Pronouns": "সর্বনাম",
"Music": "সঙ্গীত", "Music": "সঙ্গীত",
"Art": "শিল্প", "Art": "শিল্প",
"Reply Controls": "উত্তর নিয়ন্ত্রণ" "Reply Controls": "উত্তর নিয়ন্ত্রণ",
"Searchable by": "দ্বারা অনুসন্ধানযোগ্য",
"Yourself": "নিজেকে"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Els pronoms", "Pronouns": "Els pronoms",
"Music": "Música", "Music": "Música",
"Art": "Art", "Art": "Art",
"Reply Controls": "Controls de resposta" "Reply Controls": "Controls de resposta",
"Searchable by": "Cercable per",
"Yourself": "Tu mateix"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Rhagenwau", "Pronouns": "Rhagenwau",
"Music": "Cerddoriaeth", "Music": "Cerddoriaeth",
"Art": "Celf", "Art": "Celf",
"Reply Controls": "Rheolaethau Ymateb" "Reply Controls": "Rheolaethau Ymateb",
"Searchable by": "Chwiliadwy gan",
"Yourself": "Eich Hun"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronomen", "Pronouns": "Pronomen",
"Music": "Musik", "Music": "Musik",
"Art": "Kunst", "Art": "Kunst",
"Reply Controls": "Antwortsteuerung" "Reply Controls": "Antwortsteuerung",
"Searchable by": "Durchsuchbar nach",
"Yourself": "Selbst"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Αντωνυμίες", "Pronouns": "Αντωνυμίες",
"Music": "Μουσική", "Music": "Μουσική",
"Art": "Τέχνη", "Art": "Τέχνη",
"Reply Controls": "Στοιχεία ελέγχου απάντησης" "Reply Controls": "Στοιχεία ελέγχου απάντησης",
"Searchable by": "Δυνατότητα αναζήτησης από",
"Yourself": "Σύ ο ίδιος"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronouns", "Pronouns": "Pronouns",
"Music": "Music", "Music": "Music",
"Art": "Art", "Art": "Art",
"Reply Controls": "Reply Controls" "Reply Controls": "Reply Controls",
"Searchable by": "Searchable by",
"Yourself": "Yourself"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronombres", "Pronouns": "Pronombres",
"Music": "Música", "Music": "Música",
"Art": "Arte", "Art": "Arte",
"Reply Controls": "Controles de respuesta" "Reply Controls": "Controles de respuesta",
"Searchable by": "Buscable por",
"Yourself": "Tú mismo"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "ضمایر", "Pronouns": "ضمایر",
"Music": "موسیقی", "Music": "موسیقی",
"Art": "هنر", "Art": "هنر",
"Reply Controls": "کنترل های پاسخ" "Reply Controls": "کنترل های پاسخ",
"Searchable by": "قابل جستجو توسط",
"Yourself": "خودت"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronominit", "Pronouns": "Pronominit",
"Music": "Musiikki", "Music": "Musiikki",
"Art": "Taide", "Art": "Taide",
"Reply Controls": "Vastausohjaimet" "Reply Controls": "Vastausohjaimet",
"Searchable by": "Haettavissa",
"Yourself": "itseäsi"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronoms", "Pronouns": "Pronoms",
"Music": "Musique", "Music": "Musique",
"Art": "Art", "Art": "Art",
"Reply Controls": "Contrôles de réponse" "Reply Controls": "Contrôles de réponse",
"Searchable by": "Recherchable par",
"Yourself": "Toi-même"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Forainmneacha", "Pronouns": "Forainmneacha",
"Music": "Ceol", "Music": "Ceol",
"Art": "Ealaín", "Art": "Ealaín",
"Reply Controls": "Rialuithe Freagra" "Reply Controls": "Rialuithe Freagra",
"Searchable by": "Inchuardaithe ag",
"Yourself": "Tú féin"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "כינויים", "Pronouns": "כינויים",
"Music": "מוּסִיקָה", "Music": "מוּסִיקָה",
"Art": "אָמָנוּת", "Art": "אָמָנוּת",
"Reply Controls": "פקדי תגובה" "Reply Controls": "פקדי תגובה",
"Searchable by": "ניתן לחיפוש לפי",
"Yourself": "עַצמְךָ"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "सर्वनाम", "Pronouns": "सर्वनाम",
"Music": "संगीत", "Music": "संगीत",
"Art": "कला", "Art": "कला",
"Reply Controls": "उत्तर नियंत्रण" "Reply Controls": "उत्तर नियंत्रण",
"Searchable by": "द्वारा खोजा जा सकता है",
"Yourself": "अपने आप को"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronomi", "Pronouns": "Pronomi",
"Music": "Musica", "Music": "Musica",
"Art": "Arte", "Art": "Arte",
"Reply Controls": "Controlli di risposta" "Reply Controls": "Controlli di risposta",
"Searchable by": "Ricercabile per",
"Yourself": "Te stesso"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "代名詞", "Pronouns": "代名詞",
"Music": "音楽", "Music": "音楽",
"Art": "美術", "Art": "美術",
"Reply Controls": "返信コントロール" "Reply Controls": "返信コントロール",
"Searchable by": "検索可能",
"Yourself": "あなた自身"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "대명사", "Pronouns": "대명사",
"Music": "음악", "Music": "음악",
"Art": "미술", "Art": "미술",
"Reply Controls": "답변 제어" "Reply Controls": "답변 제어",
"Searchable by": "검색 가능",
"Yourself": "당신 자신"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Cînavk", "Pronouns": "Cînavk",
"Music": "Mûzîk", "Music": "Mûzîk",
"Art": "Fen", "Art": "Fen",
"Reply Controls": "Reply Controls" "Reply Controls": "Reply Controls",
"Searchable by": "Lêgerîn ji hêla",
"Yourself": "Xwe"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Voornaamwoorden", "Pronouns": "Voornaamwoorden",
"Music": "Muziek", "Music": "Muziek",
"Art": "Kunst", "Art": "Kunst",
"Reply Controls": "Antwoordbedieningen" "Reply Controls": "Antwoordbedieningen",
"Searchable by": "Doorzoekbaar op",
"Yourself": "Jezelf"
} }

View File

@ -696,5 +696,7 @@
"Pronouns": "Pronouns", "Pronouns": "Pronouns",
"Music": "Music", "Music": "Music",
"Art": "Art", "Art": "Art",
"Reply Controls": "Reply Controls" "Reply Controls": "Reply Controls",
"Searchable by": "Searchable by",
"Yourself": "Yourself"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Zaimki", "Pronouns": "Zaimki",
"Music": "Muzyka", "Music": "Muzyka",
"Art": "Sztuka", "Art": "Sztuka",
"Reply Controls": "Kontrola odpowiedzi" "Reply Controls": "Kontrola odpowiedzi",
"Searchable by": "Można wyszukiwać według",
"Yourself": "Się"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Pronomes", "Pronouns": "Pronomes",
"Music": "Música", "Music": "Música",
"Art": "Arte", "Art": "Arte",
"Reply Controls": "Controles de resposta" "Reply Controls": "Controles de resposta",
"Searchable by": "Pesquisável por",
"Yourself": "Tu próprio"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Местоимения", "Pronouns": "Местоимения",
"Music": "Музыка", "Music": "Музыка",
"Art": "Искусство", "Art": "Искусство",
"Reply Controls": "Ответить Элементы управления" "Reply Controls": "Ответить Элементы управления",
"Searchable by": "Поиск по",
"Yourself": "Сам"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Viwakilishi", "Pronouns": "Viwakilishi",
"Music": "Muziki", "Music": "Muziki",
"Art": "Sanaa", "Art": "Sanaa",
"Reply Controls": "Vidhibiti vya Kujibu" "Reply Controls": "Vidhibiti vya Kujibu",
"Searchable by": "Inaweza kutafutwa na",
"Yourself": "Mwenyewe"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Zamirler", "Pronouns": "Zamirler",
"Music": "Müzik", "Music": "Müzik",
"Art": "Sanat", "Art": "Sanat",
"Reply Controls": "Cevap Kontrolleri" "Reply Controls": "Cevap Kontrolleri",
"Searchable by": "Aranabilir",
"Yourself": "Kendin"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "Займенники", "Pronouns": "Займенники",
"Music": "музика", "Music": "музика",
"Art": "ст", "Art": "ст",
"Reply Controls": "Елементи керування відповідями" "Reply Controls": "Елементи керування відповідями",
"Searchable by": "Можливість пошуку за",
"Yourself": "себе"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "פּראָנאָונס", "Pronouns": "פּראָנאָונס",
"Music": "מוזיק", "Music": "מוזיק",
"Art": "קונסט", "Art": "קונסט",
"Reply Controls": "ענטפער קאָנטראָלס" "Reply Controls": "ענטפער קאָנטראָלס",
"Searchable by": "זוך דורך",
"Yourself": "זיך"
} }

View File

@ -700,5 +700,7 @@
"Pronouns": "代词", "Pronouns": "代词",
"Music": "音乐", "Music": "音乐",
"Art": "艺术", "Art": "艺术",
"Reply Controls": "回复控制" "Reply Controls": "回复控制",
"Searchable by": "可搜索",
"Yourself": "你自己"
} }

View File

@ -965,6 +965,8 @@ def html_new_post(edit_post_params: {},
replies_section += \ replies_section += \
'<input type="hidden" name="commentsEnabled" ' + \ '<input type="hidden" name="commentsEnabled" ' + \
'value="true">\n' 'value="true">\n'
# Language used dropdown
supported_languages = get_supported_languages(base_dir) supported_languages = get_supported_languages(base_dir)
languages_dropdown = '<select id="themeDropdown" ' + \ languages_dropdown = '<select id="themeDropdown" ' + \
'name="languagesDropdown" class="theme">' 'name="languagesDropdown" class="theme">'
@ -986,6 +988,32 @@ def html_new_post(edit_post_params: {},
' <label class="labels">' + \ ' <label class="labels">' + \
translate['Language used'] + '</label>\n' translate['Language used'] + '</label>\n'
replies_section += languages_dropdown replies_section += languages_dropdown
# searchable by dropdown
searchables = {
'yourself': translate['Yourself'],
'public': translate['Public'],
'followers': translate['Followers'],
'mutuals': translate['Mutuals']
}
searchable_by_dropdown = '<select id="themeDropdown" ' + \
'name="searchableByDropdown" class="theme">'
searchable_by_default = 'yourself'
for srch, srch_text in searchables.items():
if srch != searchable_by_default:
searchable_by_dropdown += \
' <option value="' + srch + '">' + \
srch_text + '</option>'
else:
searchable_by_dropdown += \
' <option value="' + srch + '" selected="">' + \
srch_text + '</option>'
replies_section += \
' <label class="labels">🔎 ' + \
translate['Searchable by'] + '</label>\n'
replies_section += searchable_by_dropdown
# buy link
buy_link_str = translate['Buy link'] buy_link_str = translate['Buy link']
replies_section += edit_text_field(buy_link_str, 'buyUrl', replies_section += edit_text_field(buy_link_str, 'buyUrl',
default_buy_site, 'https://...') default_buy_site, 'https://...')