Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Type-Safe i18n on RN
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
@hotchemi
June 22, 2018
Programming
1.3k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Type-Safe i18n on RN
@hotchemi
June 22, 2018
Transcript
11 slides
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!
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
300
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.6k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.3k
Navigation in a hybrid app
hotchemi
3
1.4k
PermissionsDispatcher × Kotlin
hotchemi
0
3.5k
kotlin compiler plugin
hotchemi
1
860
Rx and Preferences
hotchemi
2
200
Introducing PermissionsDispatcher
hotchemi
1
210
khronos
hotchemi
4
2k
Other Decks in Programming
See All in Programming
AI Augmentation Techniques with Liberty
ivargrimstad
1
560
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
240
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.2k
はじめてのPLATEAU
nokonoko1203
1
670
AIが実装を担う時代の「技術設計」と「チームマネジメント」
kamina_zzz
2
440
手の動かし方がわからなかった私が個人開発者になるまで
usagi0920_pochi
0
340
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
270
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
110
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
260
社内AIエージェント「Askワンバン」における コストチューニングの取り組み
t0yohei
0
180
Featured
See All Featured
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
290
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Test your architecture with Archunit
thirion
2
2.5k
Utilizing Notion as your number one productivity tool
mfonobong
4
650
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
610
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
73
43k
BBQ
matthewcrist
90
10k