mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-06-13 13:47:47 +02:00
feat: localized content types
This commit is contained in:
@ -672,13 +672,6 @@
|
||||
"progress": "Progress",
|
||||
"failure": "Failure"
|
||||
},
|
||||
"auto_save_messages_in_conversations": {
|
||||
"NOTE": "Audio Note",
|
||||
"CHAT": "Chat",
|
||||
"EXTERNAL_MEDIA": "External Media",
|
||||
"SNAP": "Snap",
|
||||
"STICKER": "Sticker"
|
||||
},
|
||||
"notifications": {
|
||||
"chat_screenshot": "Screenshot",
|
||||
"chat_screen_record": "Screen Record",
|
||||
|
@ -80,6 +80,7 @@ class LocaleWrapper {
|
||||
}
|
||||
|
||||
operator fun get(key: String) = translationMap[key] ?: key.also { AbstractLogger.directDebug("Missing translation for $key") }
|
||||
fun getOrNull(key: String) = translationMap[key]
|
||||
|
||||
fun format(key: String, vararg args: Pair<String, String>): String {
|
||||
return args.fold(get(key)) { acc, pair ->
|
||||
|
@ -21,7 +21,7 @@ class MessagingTweaks : ConfigContainer() {
|
||||
"NOTE",
|
||||
"EXTERNAL_MEDIA",
|
||||
"STICKER"
|
||||
) { requireRestart() }
|
||||
) { requireRestart(); customOptionTranslationPath = "content_type" }
|
||||
val preventMessageSending = multiple("prevent_message_sending", *NotificationType.getOutgoingValues().map { it.key }.toTypedArray()) {
|
||||
customOptionTranslationPath = "features.options.notifications"
|
||||
nativeHooks()
|
||||
|
Reference in New Issue
Block a user