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
Type-Safe i18n on RN
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
@hotchemi
June 22, 2018
Programming
1.3k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Type-Safe i18n on RN
@hotchemi
June 22, 2018
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
300
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.5k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.3k
Navigation in a hybrid app
hotchemi
3
1.4k
PermissionsDispatcher × Kotlin
hotchemi
0
3.4k
kotlin compiler plugin
hotchemi
1
840
Rx and Preferences
hotchemi
2
190
Introducing PermissionsDispatcher
hotchemi
1
200
khronos
hotchemi
4
2k
Other Decks in Programming
See All in Programming
Kubernetes祭り #2 OP/ED
bells17
0
100
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
110
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
8
5.6k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.5k
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
5.5k
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
350
パーソナライズPodcastを作った話
repunit11
0
130
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
210
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
140
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
110
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
400
Building Adaptive Systems
keathley
44
3.2k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
550
Raft: Consensus for Rubyists
vanstee
142
7.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
940
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Utilizing Notion as your number one productivity tool
mfonobong
4
610
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
530
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Discover your Explorer Soul
emna__ayadi
2
1.3k
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!