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
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
260
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.3k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.2k
kotlin compiler plugin
hotchemi
1
760
Rx and Preferences
hotchemi
2
150
Introducing PermissionsDispatcher
hotchemi
1
150
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.5k
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
240
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
530
ドメイン駆動設計のエッセンス
masuda220
PRO
15
7.4k
HTTPじゃ遅すぎる! SwitchBotを自作ハブで動かして学ぶBLE通信
occhi
0
190
三者三様 宣言的UI
kkagurazaka
0
350
Verilator + Rust + gRPC と Efinix の RISC-V でAIアクセラレータをAIで作ってる話 RTLを語る会(18) 2025/11/08
ryuz88
0
220
AI Agent 時代的開發者生存指南
eddie
4
2.3k
CSC305 Lecture 12
javiergs
PRO
0
250
CSC509 Lecture 10
javiergs
PRO
0
170
Vue 3.6 時代のリアクティビティ最前線 〜Vapor/alien-signals の実践とパフォーマンス最適化〜
hiranuma
2
370
CSC305 Lecture 13
javiergs
PRO
0
360
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
What's in a price? How to price your products and services
michaelherold
246
12k
4 Signs Your Business is Dying
shpigford
186
22k
Fireside Chat
paigeccino
41
3.7k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
2.9k
How to train your dragon (web standard)
notwaldorf
97
6.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
23
1.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
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!