Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
楽しい夏休み!String Catalogs で新しい発見
Search
ojun
August 24, 2023
Programming
2.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
楽しい夏休み!String Catalogs で新しい発見
ojun
August 24, 2023
More Decks by ojun
See All by ojun
配列と所有権
ojun9
0
94
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
460
アセットのコンパイルについて
ojun9
0
300
Exit 8 for SwiftUI
ojun9
1
320
Swift Evolution かるた
ojun9
2
150
Xcode 16のPreviewModifierと@Previewableを活用した効率的なプレビュー方法の考察
ojun9
4
1.2k
Catch Up with Swift 5.10
ojun9
2
940
Overview: Swift OpenAPI Generator
ojun9
3
2.7k
if 式と switch 式による SwiftUI のプレビューエラー対策
ojun9
1
2.3k
Other Decks in Programming
See All in Programming
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
290
dotNET_vulnclicker_intro.pdf
deka_morita
0
150
Next.js: The final boss of Web Performance
guaca
0
310
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
140
Groovy as a human and AI friendly programming language
paulk
0
100
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
290
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
240
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.7k
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
200
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
330
Kotlinの15年とServer-Side Kotlin
n_takehata
1
160
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
300
Visualization
eitanlees
153
17k
Why Our Code Smells
bkeepers
PRO
340
58k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
280
Building the Perfect Custom Keyboard
takai
2
910
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
460
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Transcript
ެ։ SwiftWednesdayʲiOSDC Japan 2023 લʳ 2023/08/24 @DeNA ָ͍͠ՆٳΈʂ String
Catalogs Ͱ৽͍͠ൃݟ ojun - DeNA Co., Ltd.
ࣗݾհʢPKVOʣ w ໊લPKVO w J04ΤϯδχΞ w ৽ଔೖࣾ w ࠃޠ4XJGU @ojun_9
String Catalogsͱ
String Catalogsͱ Xcode 15͔Βར༻Ͱ͖ΔϩʔΧϥΠζΛߦ͏ͨΊʹ༻͍ΒΕΔϑΝΠϧ ϑΝΠϧͷ֦ுࢠ .xcstrings Xcode 15 ͔ΒLegacyѻ͍ʹ Xcode
15 ͔Βར༻Մೳ ͜Ε·Ͱ .strings / .stringdict ϑΝΠϧ͕ར༻͞Ε͍ͯͨ
String Catalogsͱ Discover String Catalogs / https://developer.apple.com/videos/play/wwdc2023/10155/
String Catalogsͱ Discover String Catalogs / https://developer.apple.com/videos/play/wwdc2023/10155/
String Catalogsͱ ϏϧυΛߦ͏ͱՃͨ͠ Localizable.xcstringsϑΝΠϧͷ த͕ࣗಈతʹੜ͞ΕΔ
String Catalogsͱ .xcstringsϑΝΠϧͷதJSON
String Catalogs ʹ͓͚Δٙ .xcstringsϑΝΠϧΛར༻͢ΔͱϏϧυՌʢ.ipaʣʹมԽ͕ੜ͡Δͷ͔ʁ ҧ͍͋Δͷ͔ʁ Ϗϧυ Ϗϧυ
.ipa ϑΝΠϧͷมԽΛ؍͢Δ ̎ͭͷprojectΛ࡞ͯ͠ҧ͍ΛݟΔ
Legacy: .stringsϑΝΠϧͷ߹ .stringsϑΝΠϧΛ࡞͠ɺӳޠͱຊޠͷϩʔΧϥΠζΛߦ͏ ϩʔΧϥΠζΛߦ͏จݴҎԼͷ̎ͭ
New: .xcstringsͷ߹ .xcstringsϑΝΠϧΛ࡞͠ɺӳޠͱຊޠͷϩʔΧϥΠζΛߦ͏ ϩʔΧϥΠζΛߦ͏จݴઌ΄ͲͷจݴͱಉҰʹ͢Δ
.ipaϑΝΠϧͷத .stringsϑΝΠϧͷ߹ ύοέʔδͷதҎԼͷ௨Γ en.lprojͱja.lprojͷϑΥϧμ͕ೖ͍ͬͯΔ͜ͱ͕Θ͔Δ
.ipaϑΝΠϧͷத .stringsϑΝΠϧͷ߹ ֤ .lproj ϑΥϧμͷதʹ Localizable.string ϑΝΠϧ͕֨ೲ͞Ε͍ͯΔ ϑΝΠϧͷதόΠφϦܗࣜʹม͞Ε͍ͯΔ bplist00“_Hello
SwiftWednesday [Hello World $
.ipaϑΝΠϧͷத .xcstringsϑΝΠϧͷ߹ Legacyͷ߹ͱҟͳΓɺen.lprojϑΝΠϧ͕ଘࡏ͠ͳ͍͜ͱ͕Θ͔Δ ja.lproj ϑΝΠϧͷΈ͕ଘࡏ͢Δ
.ipaϑΝΠϧͷத .xcstringsϑΝΠϧͷ߹ ϑΥϧμͷதΛݟΔͱ Localizable.strings ϑΝΠϧ͕ଘࡏ͍ͯ͠Δ
.ipaϑΝΠϧͷத .xcstringsϑΝΠϧͷ߹ ϑΥϧμͷதΛݟΔͱ Localizable.strings ϑΝΠϧ͕ଘࡏ͍ͯ͠Δ .xcstrings ϑΝΠϧΛར༻ͯ͠ .ipa ʹ
.strings ϑΝΠϧ͕ଘࡏ͍ͯ͠Δ .xcstrings ϑΝΠϧͰͳ͍!
͜Ε·Ͱ .ipaϑΝΠϧΛ࡞͢Δͱɺͦͷதʹ .stringsϑΝΠϧ͕࡞ΒΕΔ .ipa ʹଘࡏ͢Δ .string ϑΝΠϧͱݩͷ .string ϑΝΠϧͷதҟͳΔ ϩʔΧϥΠζ͢Δݴޠ͚ͩੜ͞ΕΔ
։ൃத Ϗϧυ .ipa όΠφϦͱͯ͠දݱ
͜Ε͔Β .ipaϑΝΠϧΛ࡞͢Δͱɺͦͷதʹ .stringsϑΝΠϧ͕࡞ΒΕΔ .string ϑΝΠϧͷதόΠφϦ ੜ͞ΕΔϑΝΠϧ࣮ʹΑͬͯݮগ͢Δ Ϗϧυ ։ൃத .ipa όΠφϦͱͯ͠දݱ
͜Ε͔Β .ipaΛ࡞ΔաఔͰ .xcstringsϑΝΠϧΛ .stringsϑΝΠϧʹม͍ͯ͠Δ ม ։ൃத Ϗϧυ ipa
͜Ε͔Β .ipaΛ࡞ΔաఔͰ .xcstringsϑΝΠϧΛ .stringsϑΝΠϧʹม͍ͯ͠Δ ม ։ൃத Ϗϧυ ipa xcstringstool
xcstringstoolΛ୳Δ
xcstringstool ֓ཁ w 5PPM͕ଘࡏ͢Δॴ w 9DPEFBQQ$POUFOUT%FWFMPQFSVTSCJO w FYFDϑΝΠϧ w YDTUSJOHTϑΝΠϧͷૢ࡞Λߦ͏
w 9DPEF͔ΒՃ͞Εͨ
xcstringstool ֓ཁ
xcstringstool ֓ཁ w αϒίϚϯυΛೖΕ࣮ͯߦ͢Δ w αϒίϚϯυ̏ͭ w QSJOU w DPNQJMF
w TZOD
αϒίϚϯυ print ʹ͍ͭͯ ֓ཁ: xcstringsϑΝΠϧʹදࣔ͞ΕΔͯ͢ͷ จࣈྻΩʔΛදࣔ͢Δ xcstringstool print <input-
fi le> ͍ํ Ҿ <input- fi le> දࣔ͢Δ.xcstringsϑΝΠϧͷύε Φϓγϣϯ -h —help ϔϧϓใΛදࣔ
printͷ༻ྫ $ ./xcstringstool print ~/Desktop/Localizable.xcstrings Hello SwiftWednesday Hello World ίϚϯυΛར༻͢Δͱ
.xcstrings ϑΝΠϧʹଘࡏ͍ͯ͠Δ Key ͕ग़ྗ͞Ε͍ͯΔ ͜ͱ͕Θ͔Δ
αϒίϚϯυ compile ʹ͍ͭͯ ֓ཁ: .xcstringsϑΝΠϧͷϏϧυՌʢίϯύΠϧ݁ՌʣΛੜ͢Δ ͍ํ xcstringstool compile <input-
fi le> \ --output-directory <output-directory> \ --format <format> ɹ \ --language <language> … \ --serialization-format <serialization-format> \ --dry-run option Ҿ <input- fi le> ίϯύΠϧ͢Δ.xcstringsϑΝΠϧͷύε
αϒίϚϯυ compile ʹ͍ͭͯ -o --output-directory ग़ྗϑΝΠϧΛஔ͢ΔσΟϨΫτϦ -f --format <format> ίϯύΠϧͷग़ྗܗࣜ
ɹɹɹɹɹɹɹɹɹɹɹ ɹɹ σϑΥϧτ: stringsAndStringsdict -l --language <language> ίϯύΠϧ͢ΔಛఆݴޠΛࢦఆ ͜ͷΦϓγϣϯෳճར༻Մೳ --serialization-format <serialization-format> ҟͳΔදݱ͕ՄೳͳݸʑͷϑΝΠϧͷग़ྗܗࣜ ɹɹɹɹɹɹɹɹɹɹ σϑΥϧτ: text --dry-run ίϯύΠϧʹΑΓੜ͞ΕΔग़ྗύεͷվߦ۠ΓͷϦετΛग़ྗ͢Δ͕ ࣮ࡍʹԿίϯύΠϧ͠ͳ͍
compile ͷ༻ྫ $./xcstringstool compile ~/Desktop/Localizable.xcstrings -- output-directory ~/Desktop ίϚϯυΛ༻͢Δͱ.stringsϑΝΠϧ
͕ੜ͞ΕΔ தͳ͔ͥ dictionary ܗࣜʹͳ͍ͬͯΔ
compile ͷ༻ྫ $./xcstringstool compile ~/Desktop/Localizable.xcstrings -- output-directory ~/Desktop --
serialization-format binary FormatʹbinaryΛࢦఆ͢Δ͜ͱͰbinaryܗࣜͰͷੜ͕Ͱ͖Δ ipaϑΝΠϧͷܗࣜͱҰக͢ΔͷͰ Xcodeύοέʔδ࡞࣌ʹ͜ͷίϚϯυΛ ୟ͍ͯͦ͏
αϒίϚϯυ sync ʹ͍ͭͯ ֓ཁ: .stringsdataϑΝΠϧʹଘࡏ͢Δจࣈྻʹج͖ͮ .xcstringsϑΝΠϧΛߋ৽͢Δ ͍ํ xcstringstool sync
<xcstrings> ... --stringsdata <stringsdata> ... --skip-marking-strings-stale option Ҿ <xcstrings> Ϛʔδઌͷ.xcstringsϑΝΠϧ
αϒίϚϯυ sync ʹ͍ͭͯ --stringsdata <stringsdata> ιʔε͔Β༻͞ΕΔจࣈྻΛࢦఆ͢Δ .stringsdataϑΝΠϧ --skip-marking-strings-stale .stringsdataʹଘࡏ͠ͳ͍߹ʹ
จࣈྻΛݹ͍ͷͱͯ͠ϚʔΫͨ͠Γ .xcstrings͔ΒͦΕΒΛআͨ͠Γ͢ΔͷΛ͙ .stringsdataϑΝΠϧΛ࡞Ͱ͖ͣίϚϯυΛࢼͤͳ͔ͬͨ ϚΠάϨʔγϣϯΛߦ͏ࡍʹར༻͞ΕΔՄೳੑ͕͋Δ
LT·ͱΊ
·ͱΊ 1. Xcode 15 ͔ΒଟݴޠରԠΛߦ͏ࡍʹ .xcstrings Λར༻͢Δ͜ͱ͕Ͱ͖Δ 2. .xcstrings ϑΝΠϧΛར༻ͯ͠
.ipa ϑΝΠϧʹ ͜Ε·Ͱ௨Γ .strings ϑΝΠϧ͕ੜ͞ΕΔ 3. .xcstrings ϑΝΠϧ͔Β .strings ϑΝΠϧͷม Xcode 15 ͔ΒՃ͞Εͨ xcstringstool ͕ར༻͞Ε͍ͯΔՄೳੑ͕ߴ͍ 1. xcstringstool ͷ compile ίϚϯυΛར༻͠όΠφϦͷੜΛߦͬͯΔ 2. option ͱͯ͠ --serialization-format binary ͕ࢦఆ͞Ε͍ͯΔ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ