mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 07:01:31 +08:00 
			
		
		
		
	add translation for buttons: protected_session_status.js
This commit is contained in:
		
							parent
							
								
									4081f44a0e
								
							
						
					
					
						commit
						9320a548f4
					
				@ -1,3 +1,4 @@
 | 
				
			|||||||
 | 
					import { t } from "../../services/i18n.js";
 | 
				
			||||||
import protectedSessionHolder from "../../services/protected_session_holder.js";
 | 
					import protectedSessionHolder from "../../services/protected_session_holder.js";
 | 
				
			||||||
import CommandButtonWidget from "./command_button.js";
 | 
					import CommandButtonWidget from "./command_button.js";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -12,8 +13,8 @@ export default class ProtectedSessionStatusWidget extends CommandButtonWidget {
 | 
				
			|||||||
            : "bx-shield-quarter";
 | 
					            : "bx-shield-quarter";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.settings.title = () => protectedSessionHolder.isProtectedSessionAvailable()
 | 
					        this.settings.title = () => protectedSessionHolder.isProtectedSessionAvailable()
 | 
				
			||||||
            ? "Protected session is active. Click to leave protected session."
 | 
					            ? t("protected_session_status.active")
 | 
				
			||||||
            : "Click to enter protected session";
 | 
					            : t("protected_session_status.inactive");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.settings.command = () => protectedSessionHolder.isProtectedSessionAvailable()
 | 
					        this.settings.command = () => protectedSessionHolder.isProtectedSessionAvailable()
 | 
				
			||||||
            ? "leaveProtectedSession"
 | 
					            ? "leaveProtectedSession"
 | 
				
			||||||
 | 
				
			|||||||
@ -611,6 +611,9 @@
 | 
				
			|||||||
    "onclick_button": {
 | 
					    "onclick_button": {
 | 
				
			||||||
        "hdie": "隐藏",
 | 
					        "hdie": "隐藏",
 | 
				
			||||||
        "no_click_handler": "按钮组件'{componentId}'没有定义点击处理程序"
 | 
					        "no_click_handler": "按钮组件'{componentId}'没有定义点击处理程序"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "protected_session_status": {
 | 
				
			||||||
 | 
					        "active": "受保护的会话已激活。点击退出受保护的会话。",
 | 
				
			||||||
 | 
					        "inactive": "点击进入受保护的会话"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -612,6 +612,9 @@
 | 
				
			|||||||
    "onclick_button": {
 | 
					    "onclick_button": {
 | 
				
			||||||
        "hide": "hide",
 | 
					        "hide": "hide",
 | 
				
			||||||
        "no_click_handler": "Button widget '{componentId}' has no defined click handler"
 | 
					        "no_click_handler": "Button widget '{componentId}' has no defined click handler"
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "protected_session_status": {
 | 
				
			||||||
 | 
					        "active": "Protected session is active. Click to leave protected session.",
 | 
				
			||||||
 | 
					        "inactive": "Click to enter protected session"
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user