diff --git a/build.gradle.kts b/build.gradle.kts index fef7f30..a1d501f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,7 +11,7 @@ plugins { // Kotlin support id("org.jetbrains.kotlin.jvm") version "1.6.20" // gradle-intellij-plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin - id("org.jetbrains.intellij") version "1.5.3" + id("org.jetbrains.intellij") version "1.6.0" // gradle-changelog-plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin id("org.jetbrains.changelog") version "1.3.1" // detekt linter - read more: https://detekt.github.io/detekt/kotlindsl.html diff --git a/src/main/kotlin/dev/polek/adbwifi/ui/view/DevicePanel.kt b/src/main/kotlin/dev/polek/adbwifi/ui/view/DevicePanel.kt index f2f2d8b..90a8e86 100644 --- a/src/main/kotlin/dev/polek/adbwifi/ui/view/DevicePanel.kt +++ b/src/main/kotlin/dev/polek/adbwifi/ui/view/DevicePanel.kt @@ -197,6 +197,12 @@ class DevicePanel(device: DeviceViewModel) : JBPanel(GridBagLayout( copyAddressItem.isEnabled = device.hasAddress menu.add(copyAddressItem) + val deviceAlias = JBMenuItem(PluginBundle.message("deviceAlias")) + deviceAlias.addActionListener{ + DeviceAliasDialogWrapper().show() + } + menu.add(deviceAlias) + menu.show(event.component, event.x, event.y) } diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 1a69021..e06b6fb 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -34,22 +34,22 @@ id="AdbWifi.Refresh" class="dev.polek.adbwifi.actions.RestartAdbAction" icon="AllIcons.Actions.Refresh" - text="Restart ADB" /> + text="重启 ADB" /> + text="切换日志" /> + text="打开设置" /> @@ -64,7 +64,7 @@ id="AdbWifi.ClearLog" class="dev.polek.adbwifi.actions.ClearLogAction" icon="/icons/deleteIcon.svg" - text="Clear Log" /> + text="清除日志" /> diff --git a/src/main/resources/messages/PluginBundle.properties b/src/main/resources/messages/PluginBundle.properties index f78bd00..db22bc1 100644 --- a/src/main/resources/messages/PluginBundle.properties +++ b/src/main/resources/messages/PluginBundle.properties @@ -36,3 +36,4 @@ scrcpyDocLabel=More info submitReportActionText=Report to Developer submitReportProgressText=Sending error report deviceIpLabel=Device IP: +deviceAlias=Device Alias diff --git a/src/main/resources/messages/PluginBundle_zh_CN.properties b/src/main/resources/messages/PluginBundle_zh_CN.properties new file mode 100644 index 0000000..c619899 --- /dev/null +++ b/src/main/resources/messages/PluginBundle_zh_CN.properties @@ -0,0 +1,39 @@ +name=ADB Wi-Fi +connectButton=连接 +disconnectButton=断开 +copyDeviceIdMenuItem=复制 device ID 到剪贴板 +copyIpAddressMenuItem=复制 IP 地址到剪贴板 +shareScreenTooltip=使用'scrcpy'共享屏幕 +settingsPageName=ADB Wi-Fi +adbSettingsTitle='adb' 设置 +adbPortTitle=adb 端口: +adbUseSystemPath=从系统路径使用 'adb' +adbPathTitle='adb' 可执行文件的路径: +adbPathVerifiedMessage=已验证 +adbPathVerificationErrorMessage=在指定的路径上找不到 'adb' 可执行文件 +defaultAdbLocationButton=使用默认位置 +scrcpySettingsTitle='scrcpy' 设置 +scrcpyUseSystemPath=从系统路径使用 'scrcpy' +scrcpyPathTitle='scrcpy' 可执行文件的路径: +scrcpyPathVerificationErrorMessage=在指定路径未找到 'scrcpy' 可执行文件 +generalSettingsTitle=通用设置 +confirmDeviceRemoval=当移除先前连接的设备时,显示确认对话框 +deviceListEmptyMessage=通过USB线连接设备 +goToSettingsButton=去设置 +previouslyConnectedTitle=以前连接设备 +removeDeviceTooltip=从列表中删除 +removeButton=删除 +cancelButton=取消 +removeDeviceConfirmation=删除设备? +doNotAskAgain=不要再询问 +scrcpyHelpTitle=scrcpy +scrcpyEnabled=启用 'scrcpy' integration +scrcpyHelpDescription=这个应用程序提供了在USB(或TCP/IP)上连接的Android设备的显示和控制 +scrcpyHelpLinkText=Get the app +scrcpyFlagsTitle=命令行标记: +scrcpyFlagsSubtitle=e.g.: --max-size 1024 --always-on-top --stay-awake --show-touches +scrcpyDocLabel=更多信息 +submitReportActionText=报告给开发人员 +submitReportProgressText=发送错误报告 +deviceIpLabel=设备 IP: +deviceAlias=设备别名 \ No newline at end of file