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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
160
SwiftUI と Shader を活用した楽しいオンボーディング起動画面の作成
megabitsenmzq
0
130
Liquid Glass, どこが変わったのか
megabitsenmzq
0
170
iPhone 16 Camera Control
megabitsenmzq
0
150
240fps で画像処理したい
megabitsenmzq
0
240
Swift 開発が楽になる道具たち
megabitsenmzq
1
780
Animoji を作ってみた
megabitsenmzq
0
210
WKWebView とめんどくさいお友達
megabitsenmzq
1
770
先週解決した SwiftUI 問題
megabitsenmzq
0
140
Other Decks in Programming
See All in Programming
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
220
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.1k
SPMマルチモジュールで テストカバレッジを取得する技法
yosshi4486
0
140
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.1k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
300
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
2
590
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.7k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
2.8k
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
17
5.9k
The NotImplementedError Problem in Ruby
koic
1
600
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
110
These Five Tricks Can Make Your Apps Greener, Cheaper, & Nicer
hollycummins
0
270
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
860
Being A Developer After 40
akosma
91
590k
The Curse of the Amulet
leimatthew05
1
13k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
430
Designing for Timeless Needs
cassininazir
1
250
Skip the Path - Find Your Career Trail
mkilby
1
140
Designing for Performance
lara
611
70k
Un-Boring Meetings
codingconduct
0
310
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
WENDY [Excerpt]
tessaabrams
11
38k
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