Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(desktop): support macOS localized #1260

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions desktop/main-app/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ mac:
entitlementsInherit: entitlements.mac.plist
gatekeeperAssess: false
extendInfo:
NSMicrophoneUsageDescription: To ensure normal use, flat-native needs access to your microphone.
NSCameraUsageDescription: To ensure normal use, flat-native needs access to your camera.
LSHasLocalizedDisplayName: true
CFBundleURLTypes:
- CFBundleURLName: x-agora-flat-client
CFBundleURLSchemes:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NSMicrophoneUsageDescription = "In order to work properly, Flat needs permission to access microphone.";
NSCameraUsageDescription = "In order to work properly, Flat needs permission to access camera.";
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NSMicrophoneUsageDescription = "为了能够正常使用,Flat 需要访问麦克风的权限。";
NSCameraUsageDescription = "为了能够正常使用,Flat 需要访问摄像头的权限。";
7 changes: 7 additions & 0 deletions desktop/main-app/scripts/pack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ const buildElectron = async () => {
},
];

if (buildType === "mac") {
config.extraResources.push({
from: "resources/macOS/locals",
to: "./",
});
}

const packMac = () => {
return build({
config: config,
Expand Down