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
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
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
400
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.4k
Pythonではじめるオープンデータ分析〜書籍の紹介と書籍で紹介しきれなかった事例の紹介〜
welliving
3
620
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
400
AI 駆動開発ライフサイクル(AI-DLC):ソフトウェアエンジニアリングの再構築 / AI-DLC Introduction
kanamasa
11
4.2k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
310
안드로이드 9년차 개발자, 프론트엔드 주니어로 커리어 리셋하기
maryang
1
140
Cell-Based Architecture
larchanjo
0
140
Basic Architectures
denyspoltorak
0
130
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
190
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
600
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
150
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
0
190
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.1k
Everyday Curiosity
cassininazir
0
110
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
110
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
RailsConf 2023
tenderlove
30
1.3k
Tell your own story through comics
letsgokoyo
0
770
Ruling the World: When Life Gets Gamed
codingconduct
0
100
sira's awesome portfolio website redesign presentation
elsirapls
0
91
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!