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.1k
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
7.9k
Navigation in a hybrid app
hotchemi
3
1.3k
PermissionsDispatcher × Kotlin
hotchemi
0
3.1k
kotlin compiler plugin
hotchemi
1
740
Rx and Preferences
hotchemi
2
150
Introducing PermissionsDispatcher
hotchemi
1
150
khronos
hotchemi
4
1.9k
Other Decks in Programming
See All in Programming
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
260
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
760
NPOでのDevinの活用
codeforeveryone
0
930
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
16
5.8k
20250708_JAWS_opscdk
takuyay0ne
2
140
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
650
顧客の画像データをテラバイト単位で配信する 画像サーバを WebP にした際に起こった課題と その対応策 ~継続的な取り組みを添えて~
takutakahashi
4
1.3k
Advanced Micro Frontends: Multi Version/ Framework Scenarios @WAD 2025, Berlin
manfredsteyer
PRO
0
410
Claude Code で Astro blog を Pages から Workers へ移行してみた
codehex
0
130
Python型ヒント完全ガイド 初心者でも分かる、現代的で実践的な使い方
mickey_kubo
1
250
はじめてのWeb API体験 ー 飲食店検索アプリを作ろうー
akinko_0915
0
160
dbt民主化とLLMによる開発ブースト ~ AI Readyな分析サイクルを目指して ~
yoshyum
3
1.2k
Featured
See All Featured
It's Worth the Effort
3n
185
28k
Code Reviewing Like a Champion
maltzj
524
40k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
What's in a price? How to price your products and services
michaelherold
246
12k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
RailsConf 2023
tenderlove
30
1.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Fireside Chat
paigeccino
37
3.5k
A Tale of Four Properties
chriscoyier
160
23k
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!