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
250
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.2k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.1k
kotlin compiler plugin
hotchemi
1
750
Rx and Preferences
hotchemi
2
150
Introducing PermissionsDispatcher
hotchemi
1
150
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
品質ワークショップをやってみた
nealle
0
600
ソフトウェア設計の実践的な考え方
masuda220
PRO
4
630
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
100
Cursorハンズオン実践!
eltociear
2
1.2k
Claude Agent SDK を使ってみよう
hyshu
0
1.3k
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
190
O Que É e Como Funciona o PHP-FPM?
marcelgsantos
0
180
Building, Deploying, and Monitoring Ruby Web Applications with Falcon (Kaigi on Rails 2025)
ioquatix
4
2.5k
Devoxx BE - Local Development in the AI Era
kdubois
0
130
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
240
CSC509 Lecture 08
javiergs
PRO
0
230
Leading Effective Engineering Teams in the AI Era
addyosmani
7
570
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
84
9.2k
Designing for Performance
lara
610
69k
Agile that works and the tools we love
rasmusluckow
331
21k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
140
34k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
We Have a Design System, Now What?
morganepeng
53
7.8k
Raft: Consensus for Rubyists
vanstee
140
7.2k
Scaling GitHub
holman
463
140k
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!