Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
MainMenu.xib を翻訳してみた
Search
Megabits_mzq
April 25, 2022
Programming
300
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MainMenu.xib を翻訳してみた
Swift 愛好会 2022/4/25
Megabits_mzq
April 25, 2022
More Decks by Megabits_mzq
See All by Megabits_mzq
OTP を自動で入力する裏技
megabitsenmzq
0
170
SwiftUI と Shader を活用した楽しいオンボーディング起動画面の作成
megabitsenmzq
0
130
Liquid Glass, どこが変わったのか
megabitsenmzq
0
180
iPhone 16 Camera Control
megabitsenmzq
0
160
240fps で画像処理したい
megabitsenmzq
0
240
Swift 開発が楽になる道具たち
megabitsenmzq
1
780
Animoji を作ってみた
megabitsenmzq
0
210
WKWebView とめんどくさいお友達
megabitsenmzq
1
780
先週解決した SwiftUI 問題
megabitsenmzq
0
150
Other Decks in Programming
See All in Programming
Performance Engineering for Everyone
elenatanasoiu
0
230
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
350k
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
220
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.6k
JavaDoc 再入門
nagise
1
420
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7.1k
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
120
act1-costs.pdf
sumedhbala
0
120
Lessons from Spec-Driven Development
simas
PRO
0
220
これからAgentCoreを触る方へトレンドはGatewayです
har1101
2
310
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
170
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Prompt Engineering for Job Search
mfonobong
0
350
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
The browser strikes back
jonoalderson
0
1.3k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
610
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
250
Designing for humans not robots
tammielis
254
26k
Speed Design
sergeychernyshev
33
1.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
GraphQLとの向き合い方2022年版
quramy
50
15k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Transcript
前回の続き WKWebView のめんどくさいお友達がまた増えた! let script2 = """ class NotificationOverride {
static get permission() { window.webkit.messageHandlers.notifyRequest.postMessage(true); return "granted"; } static requestPermission (callback) { callback("granted"); window.webkit.messageHandlers.notifyRequest.postMessage(true); } constructor (title, options) { window.webkit.messageHandlers.notify.postMessage({ title: title, body: options.body }); } } window.Notification = NotificationOverride; """ let userScript2 = WKUserScript(source: script2, injectionTime: .atDocumentStart, forMainFrameOnly: true) webView.configuration.userContentController.addUserScript(userScript2) webView.configuration.userContentController.add(self, name: "notify") webView.configuration.userContentController.add(self, name: "notifyRequest")
None
webView.configuration.userContentController.add(self, name: "notify")
webView.configuration.userContentController.removeScriptMessageHandler(forName: "notify") webView.configuration.userContentController.removeScriptMessageHandler(forName: "notifyRequest")
Jinyu Meng (Megabits) MainMenu を⾃動翻訳してみた
個 ⼈ 開 発 者 Megabits ⾦⿂ 留 学 ⽣
None
None
None
旧 zh_CN zh_TW zh_HK 新 zh_Hans zh_Hant zh_HK
None
Main Menu Translator
None
Demo Demo Demo Demo
None
None
Xcloc
None
/System/Library/Frameworks/SwiftUI.framework
/System/Library/Frameworks/AppKit.framework /System/Library/PrivateFrameworks/UIKitServices.framework /System/Library/Frameworks/CoreText.framework /System/Library/PrivateFrameworks/UIKitMacHelper.framework フォント全般、ツールバーとサイドバー切り替え 「ペーストしてスタイルを合わせる」 「Ligatures」 「Ligature」 「Bigger」
/System/Applications/Utilities/Script Editor.app /System/Applications/Utilities/Terminal.app プリント全般 「最後に保存した状態に戻す」
None
extension UInt8 { var printableAscii : String { switch self
{ case 32..<128: return String(bytes: [self], encoding:.ascii)! default: if String(bytes: [(self & 127)], encoding:.ascii)! == "b" { return "…" } else { return "/" } } } } func XibKeysFrom(stringArray: [String]) -> [XibKey]? { var keyArray = [String : String]() var count = stringArray.count while count > 1 { let item = stringArray[stringArray.count - count] if item.hasSuffix(".title") { let source = stringArray[stringArray.count - count + 1] if !source.hasSuffix(".title") { count -= 1 keyArray[item] = source } } count -= 1 } if keyArray.isEmpty { return nil } return keyArray.map({XibKey(key: $0.key, source: $0.value)}) }
None
None