Skip to content

Commit 60c06e2

Browse files
feat: add more translations and upgrade some deps
1 parent 5c3a730 commit 60c06e2

34 files changed

+1902
-1823
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ npm install react-native-paper-dates --save
5757

5858
## Import some localized strings
5959
Ideally you do this somewhere in your `index.js` before `react-native-paper-dates` is used.
60-
Currently we only have made en/nl translations but it's really easy to add one extra since it are only some labels and error messages
60+
Currently we only have en/nl/pl translations but it's really easy to add one extra since it are only some labels and error messages
6161
```tsx
6262
// e.g in your index.js
6363
import {

example/src/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function App() {
123123
const pastDate = new Date(new Date().setDate(new Date().getDate() - 5))
124124
const futureDate = new Date(new Date().setDate(new Date().getDate() + 5))
125125

126-
const locale = 'en-gb'
126+
const locale = 'en-GB'
127127
return (
128128
<>
129129
<ScrollView
@@ -198,6 +198,7 @@ function App() {
198198
value={inputDate}
199199
onChange={setInputDate}
200200
inputMode="start"
201+
autoCompleteType={'birthdate-full'}
201202
/>
202203
</Row>
203204
<Row>

example/src/ReadMeExampleDatePickerInput.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export default function ReadMeExampleDatePickerInput() {
1313
value={inputDate}
1414
onChange={(d) => setInputDate(d)}
1515
inputMode="start"
16+
autoCompleteType="birthdate-full"
1617
// mode="outlined" (see react-native-paper docs)
1718
// other react native TextInput props
1819
/>

example/src/index.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import {
2-
en,
3-
nl,
4-
pl,
2+
// en,
3+
// nl,
4+
// pl,
55
enGB,
66
registerTranslation,
77
// @ts-ignore TODO: try to fix expo to work with local library
88
} from 'react-native-paper-dates'
9-
registerTranslation('en', en)
10-
registerTranslation('nl', nl)
11-
registerTranslation('pl', pl)
9+
// registerTranslation('en', en)
10+
// registerTranslation('nl', nl)
11+
// registerTranslation('pl', pl)
1212
registerTranslation('en-GB', enGB)
1313

1414
import App from './App'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"files": {
3+
"app.js": "/static/js/app.b434a5d8.chunk.js",
4+
"app.js.map": "/static/js/app.b434a5d8.chunk.js.map",
5+
"runtime~app.js": "/static/js/runtime~app.2e9f1821.js",
6+
"runtime~app.js.map": "/static/js/runtime~app.2e9f1821.js.map",
7+
"static/js/2.86641e5c.chunk.js": "/static/js/2.86641e5c.chunk.js",
8+
"static/js/2.86641e5c.chunk.js.map": "/static/js/2.86641e5c.chunk.js.map",
9+
"fonts/MaterialCommunityIcons.ttf": "/./fonts/MaterialCommunityIcons.ttf",
10+
"index.html": "/index.html",
11+
"manifest.json": "/manifest.json",
12+
"serve.json": "/serve.json",
13+
"static/js/2.86641e5c.chunk.js.LICENSE.txt": "/static/js/2.86641e5c.chunk.js.LICENSE.txt",
14+
"static/media/schedule.png": "/static/media/schedule.6cc9a4e3.png"
15+
},
16+
"entrypoints": [
17+
"static/js/runtime~app.2e9f1821.js",
18+
"static/js/2.86641e5c.chunk.js",
19+
"static/js/app.b434a5d8.chunk.js"
20+
]
21+
}
878 KB
Binary file not shown.

example/web-build/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta httpequiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1.00001,viewport-fit=cover"/><title>react-native-paper-dates-example</title><style>#root,body,html{width:100%;-webkit-overflow-scrolling:touch;margin:0;padding:0;min-height:100%}#root{flex-shrink:0;flex-basis:auto;flex-grow:1;display:flex;flex:1}html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;height:calc(100% + env(safe-area-inset-top))}body{display:flex;overflow-y:auto;overscroll-behavior-y:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-ms-overflow-style:scrollbar}</style><meta name="description" content="Example app for react-native-paper-dates"><link rel="manifest" href="/manifest.json"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-touch-fullscreen" content="yes"><meta name="apple-mobile-web-app-title" content="react-native-paper-dates-example"><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"></head><body><noscript><form action="" style="background-color:#fff;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999"><div style="font-size:18px;font-family:Helvetica,sans-serif;line-height:24px;margin:10%;width:80%"><p>Oh no! It looks like JavaScript is not enabled in your browser.</p><p style="margin:20px 0"><button type="submit" style="background-color:#4630eb;border-radius:100px;border:none;box-shadow:none;color:#fff;cursor:pointer;font-weight:700;line-height:20px;padding:6px 16px">Reload</button></p></div></form></noscript><div id="root"></div><script src="/static/js/runtime~app.2e9f1821.js"></script><script src="/static/js/2.86641e5c.chunk.js"></script><script src="/static/js/app.b434a5d8.chunk.js"></script></body></html>

example/web-build/manifest.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"description": "Example app for react-native-paper-dates",
3+
"display": "standalone",
4+
"lang": "en",
5+
"name": "react-native-paper-dates-example",
6+
"short_name": "react-native-paper-dates-example",
7+
"start_url": "/?utm_source=web_app_manifest"
8+
}

example/web-build/serve.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"headers": [
3+
{
4+
"source": "static/**/*.js",
5+
"headers": [
6+
{
7+
"key": "Cache-Control",
8+
"value": "public, max-age=31536000, immutable"
9+
}
10+
]
11+
}
12+
]
13+
}

example/web-build/static/js/2.86641e5c.chunk.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)