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.1k
Type-Safe i18n on RN
@hotchemi
June 22, 2018
Tweet
Share
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
250
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.2k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
7.9k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.1k
kotlin compiler plugin
hotchemi
1
740
Rx and Preferences
hotchemi
2
150
Introducing PermissionsDispatcher
hotchemi
1
150
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
1
200
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
1
320
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
1
120
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
3
1k
AIコーディングAgentとの向き合い方
eycjur
0
250
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
120
兎に角、コードレビュー
mitohato14
0
170
MCPで実現するAIエージェント駆動のNext.jsアプリデバッグ手法
nyatinte
7
1k
Updates on MLS on Ruby (and maybe more)
sylph01
1
170
Rancher と Terraform
fufuhu
2
180
Honoアップデート 2025年夏
yusukebe
1
900
Protocol Buffersの型を超えて拡張性を得る / Beyond Protocol Buffers Types Achieving Extensibility
linyows
0
100
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.5k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Building an army of robots
kneath
306
46k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Site-Speed That Sticks
csswizardry
10
800
A designer walks into a library…
pauljervisheath
207
24k
Fireside Chat
paigeccino
39
3.6k
Become a Pro
speakerdeck
PRO
29
5.5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Producing Creativity
orderedlist
PRO
347
40k
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!