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
1.2k
2
Share
Type-Safe i18n on RN
@hotchemi
June 22, 2018
More Decks by @hotchemi
See All by @hotchemi
kompile-testing internal
hotchemi
0
290
The things we’ve learned from iOS×React Native hybrid development
hotchemi
2
5.5k
React Nativeを活用したアプリ開発体制/sapuri meetup
hotchemi
3
8.2k
Navigation in a hybrid app
hotchemi
3
1.4k
PermissionsDispatcher × Kotlin
hotchemi
0
3.4k
kotlin compiler plugin
hotchemi
1
810
Rx and Preferences
hotchemi
2
180
Introducing PermissionsDispatcher
hotchemi
1
180
khronos
hotchemi
4
2k
Other Decks in Programming
See All in Programming
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
6
1.2k
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
210
Copilot CLI の継戦能力を高める コンテキスト管理
nozomutu
1
1k
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.7k
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
5
990
Oxcを導入して開発体験が向上した話
yug1224
4
150
Zod v4 Codec でスキーマに型変換を埋め込む REST API 設計 #TSKaigi2026
ryutaro_yako
0
150
ふつうのFeature Flag実践入門
irof
6
3k
inferと仲良くなる10分間
ryokatsuse
1
260
AI 時代のソフトウェア設計の学び方
masuda220
PRO
28
10k
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
3
1.1k
JavaDoc 再入門
nagise
0
140
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
270
RailsConf 2023
tenderlove
30
1.4k
KATA
mclloyd
PRO
35
15k
Making Projects Easy
brettharned
120
6.6k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
350
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
230
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
The untapped power of vector embeddings
frankvandijk
2
1.7k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.6k
Are puppies a ranking factor?
jonoalderson
1
3.4k
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!