$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
JETLS.jl ─ A New Language Server for Julia
abap34
2
460
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
200
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.8k
Combinatorial Interview Problems with Backtracking Solutions - From Imperative Procedural Programming to Declarative Functional Programming - Part 2
philipschwarz
PRO
0
120
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
430
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
610
gunshi
kazupon
1
120
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
0
190
GISエンジニアから見たLINKSデータ
nokonoko1203
0
180
Python札幌 LT資料
t3tra
7
1.1k
モデル駆動設計をやってみようワークショップ開催報告(Modeling Forum2025) / model driven design workshop report
haru860
0
280
生成AI時代を勝ち抜くエンジニア組織マネジメント
coconala_engineer
0
22k
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
120
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
310
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
94
Prompt Engineering for Job Search
mfonobong
0
130
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
WENDY [Excerpt]
tessaabrams
8
35k
The browser strikes back
jonoalderson
0
130
Design in an AI World
tapps
0
100
The Cost Of JavaScript in 2023
addyosmani
55
9.4k
Fireside Chat
paigeccino
41
3.8k
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!