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
280
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.4k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.1k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.3k
kotlin compiler plugin
hotchemi
1
790
Rx and Preferences
hotchemi
2
160
Introducing PermissionsDispatcher
hotchemi
1
160
khronos
hotchemi
4
2k
Other Decks in Programming
See All in Programming
izumin5210のプロポーザルのネタ探し #tskaigi_msup
izumin5210
1
150
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
300
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
CSC307 Lecture 08
javiergs
PRO
0
670
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
750
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
620
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.3k
AI時代の認知負荷との向き合い方
optfit
0
170
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
440
SourceGeneratorのススメ
htkym
0
200
例外処理とどう使い分ける?Result型を使ったエラー設計 #burikaigi
kajitack
16
6.1k
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
290
Featured
See All Featured
Designing for Performance
lara
610
70k
Design in an AI World
tapps
0
150
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
66
37k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
GitHub's CSS Performance
jonrohan
1032
470k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
A designer walks into a library…
pauljervisheath
210
24k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
440
How to Ace a Technical Interview
jacobian
281
24k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
The SEO identity crisis: Don't let AI make you average
varn
0
330
The Invisible Side of Design
smashingmag
302
51k
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!