$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Type-Safe i18n on RN
Search
@hotchemi
June 22, 2018
Programming
2
1.2k
Type-Safe i18n on RN
@hotchemi
June 22, 2018
Tweet
Share
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
270
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.3k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.1k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.2k
kotlin compiler plugin
hotchemi
1
780
Rx and Preferences
hotchemi
2
160
Introducing PermissionsDispatcher
hotchemi
1
160
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.2k
Canon EOS R50 V と R5 Mark II 購入でみえてきた最近のデジイチ VR180 事情、そして VR180 静止画に活路を見出すまで
karad
0
130
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
130
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
150
TestingOsaka6_Ozono
o3
0
170
認証・認可の基本を学ぼう前編
kouyuume
0
260
AIコーディングエージェント(Manus)
kondai24
0
210
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
140
これならできる!個人開発のすゝめ
tinykitten
PRO
0
120
愛される翻訳の秘訣
kishikawakatsumi
3
340
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
410
SwiftUIで本格音ゲー実装してみた
hypebeans
0
480
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
66
Raft: Consensus for Rubyists
vanstee
141
7.2k
Docker and Python
trallard
47
3.7k
Speed Design
sergeychernyshev
33
1.4k
4 Signs Your Business is Dying
shpigford
186
22k
The Spectacular Lies of Maps
axbom
PRO
1
400
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
41
The World Runs on Bad Software
bkeepers
PRO
72
12k
We Are The Robots
honzajavorek
0
120
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
340
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
170
Transcript
Type-Safe i18n on RN Quipper Limited @hotchemi
7/19 Thu 19:30~22:00
react-native-i18n user?!
• It’s OK, but... • key name can be long
and nested • gotta move around definition and code • can’t detect an error in compile time • “missing [key name] translation”
None
• quipper/react-native-i18n-ts • paired with TypeScript • inspired by R.java
mechanism • strong IDE support • compile time check
Demo
• Under the hood • Generate d.ts file from definition
• with TypeScript compiler API
declare module "react-native-i18n" { var fallbacks: boolean; var translations: {
[keys: string]: any; }; function t(key: "common.cancel", opts: { value: any; }): string; function t(key: "common.ok"): string; } // for json loading declare module "*.json" { const value: any; export default value; }
• Installation • yarn add -D react-native-i18n-ts • set “model”
and “outputDir” in package.json • tweak filesGlob in tsconfig.json • execute “yarn i18n-ts” command
Enjoy!