Files
maternal-app/maternal-web/public/sw.js
Andrei 8bac3bad4b
Some checks failed
CI/CD Pipeline / Lint and Test (push) Has been cancelled
CI/CD Pipeline / E2E Tests (push) Has been cancelled
CI/CD Pipeline / Build Application (push) Has been cancelled
feat: Localize Sleep, Diaper, Activity, and Settings pages
Added comprehensive localization to tracking and settings pages:

**Translation Keys Added:**
- Sleep: locations, status, duration formatting, success/delete messages
- Diaper: conditions, rash severity and alert, success/delete messages
- Activity: activity types, form labels, placeholders
- Settings: profile, preferences, notifications, appearance, account actions
- Common: shared labels (selectChild, noChildrenAdded, etc.)

**Pages Localized:**
1. Sleep tracking page (/app/track/sleep/page.tsx)
   - All form labels and dropdowns
   - Location options (crib, bed, stroller, carrier, other)
   - Sleep status (completed/ongoing)
   - Duration display with interpolation
   - Success and delete messages

2. Diaper tracking page (/app/track/diaper/page.tsx)
   - Diaper types (wet, dirty, both, dry)
   - Conditions (normal, soft, hard, watery, mucus, blood)
   - Rash detection with severity levels
   - Alert message for diaper rash
   - Recent diapers display with translated labels

3. Activity tracking page (/app/track/activity/page.tsx)
   - Activity types (play, walk, music, reading, tummy time, outdoor, other)
   - Duration and description fields
   - Form placeholders
   - Recent activities display

4. Settings page (/app/settings/page.tsx)
   - Profile information section
   - Preferences, notifications, appearance sections
   - Account actions (logout)
   - Save/saving button states
   - Success message

All pages now support multi-language translation and are ready for
Spanish, French, Portuguese, and Chinese translations.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-03 13:18:01 +00:00

2 lines
12 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
if(!self.define){let e,s={};const a=(a,c)=>(a=new URL(a+".js",c).href,s[a]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=a,e.onload=s,document.head.appendChild(e)}else e=a,importScripts(a),s()}).then(()=>{let e=s[a];if(!e)throw new Error(`Module ${a} didnt register its module`);return e}));self.define=(c,i)=>{const n=e||("document"in self?document.currentScript.src:"")||location.href;if(s[n])return;let t={};const r=e=>a(e,n),f={module:{uri:n},exports:t,require:r};s[n]=Promise.all(c.map(e=>f[e]||r(e))).then(e=>(i(...e),t))}}define(["./workbox-4d767a27"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"967954bb76b250dc8633e67ee7eb3a62"},{url:"/_next/static/3jpPxMsgK0IQWur-KjnAN/_buildManifest.js",revision:"8f0f5ce83e0c1a8bb7ed8c5093a55c39"},{url:"/_next/static/3jpPxMsgK0IQWur-KjnAN/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/1063-f889ee292f8f15b5.js",revision:"f889ee292f8f15b5"},{url:"/_next/static/chunks/1213-7820689c8a23df1d.js",revision:"7820689c8a23df1d"},{url:"/_next/static/chunks/1233-aa8672e107c5a9d6.js",revision:"aa8672e107c5a9d6"},{url:"/_next/static/chunks/1255-b2f7fd83e387a9e1.js",revision:"b2f7fd83e387a9e1"},{url:"/_next/static/chunks/1495.1f181dd04a7985c1.js",revision:"1f181dd04a7985c1"},{url:"/_next/static/chunks/1733-cce5309a9609067d.js",revision:"cce5309a9609067d"},{url:"/_next/static/chunks/1863-6426793acce6fdbe.js",revision:"6426793acce6fdbe"},{url:"/_next/static/chunks/2073-46126ea96e2f7d54.js",revision:"46126ea96e2f7d54"},{url:"/_next/static/chunks/2528-886b553c0bf133ad.js",revision:"886b553c0bf133ad"},{url:"/_next/static/chunks/2589-104d90c8d4f5c3ea.js",revision:"104d90c8d4f5c3ea"},{url:"/_next/static/chunks/2758-1efe116b33d15067.js",revision:"1efe116b33d15067"},{url:"/_next/static/chunks/2779.7826066a08a5507b.js",revision:"7826066a08a5507b"},{url:"/_next/static/chunks/3039-1e3f512a6440a0ef.js",revision:"1e3f512a6440a0ef"},{url:"/_next/static/chunks/3915-c3a073f3ecde242b.js",revision:"c3a073f3ecde242b"},{url:"/_next/static/chunks/4bd1b696-100b9d70ed4e49c1.js",revision:"100b9d70ed4e49c1"},{url:"/_next/static/chunks/5057-8041a3f0e28fb791.js",revision:"8041a3f0e28fb791"},{url:"/_next/static/chunks/5079-33eac748d82015bb.js",revision:"33eac748d82015bb"},{url:"/_next/static/chunks/5125-c990fc036d2a6ce4.js",revision:"c990fc036d2a6ce4"},{url:"/_next/static/chunks/5204-40bcee73ecd8ab8c.js",revision:"40bcee73ecd8ab8c"},{url:"/_next/static/chunks/5385-7ecda8e4ba984edc.js",revision:"7ecda8e4ba984edc"},{url:"/_next/static/chunks/5468-ef720fa3041f3884.js",revision:"ef720fa3041f3884"},{url:"/_next/static/chunks/5482-7535aa0aab02d518.js",revision:"7535aa0aab02d518"},{url:"/_next/static/chunks/5984-808f27306694fb94.js",revision:"808f27306694fb94"},{url:"/_next/static/chunks/5992-aaba10a9394d13c3.js",revision:"aaba10a9394d13c3"},{url:"/_next/static/chunks/6088-c165c565edce02be.js",revision:"c165c565edce02be"},{url:"/_next/static/chunks/6286-086a26f8f0ae31b4.js",revision:"086a26f8f0ae31b4"},{url:"/_next/static/chunks/6662-f09741beffc63498.js",revision:"f09741beffc63498"},{url:"/_next/static/chunks/670-a4ca0f366ee779f5.js",revision:"a4ca0f366ee779f5"},{url:"/_next/static/chunks/6749-6065384063ca4215.js",revision:"6065384063ca4215"},{url:"/_next/static/chunks/6847-ce99bc721adda9c4.js",revision:"ce99bc721adda9c4"},{url:"/_next/static/chunks/6861-083879538672f0f7.js",revision:"083879538672f0f7"},{url:"/_next/static/chunks/6873-ff265086321345c8.js",revision:"ff265086321345c8"},{url:"/_next/static/chunks/6952-9da634cd5918df8d.js",revision:"9da634cd5918df8d"},{url:"/_next/static/chunks/6971-b78af763cedeabbc.js",revision:"b78af763cedeabbc"},{url:"/_next/static/chunks/710-7e96cbf5d461482a.js",revision:"7e96cbf5d461482a"},{url:"/_next/static/chunks/7332-fd60cdf555c2ea53.js",revision:"fd60cdf555c2ea53"},{url:"/_next/static/chunks/759-f463b0b6e6cc2a3a.js",revision:"f463b0b6e6cc2a3a"},{url:"/_next/static/chunks/7855-72c79224370eff7b.js",revision:"72c79224370eff7b"},{url:"/_next/static/chunks/787-032067ae978e62a8.js",revision:"032067ae978e62a8"},{url:"/_next/static/chunks/8039-c8bf59284845dc0c.js",revision:"c8bf59284845dc0c"},{url:"/_next/static/chunks/8270.f8d4b9bf89181cc4.js",revision:"f8d4b9bf89181cc4"},{url:"/_next/static/chunks/8477-3ba14f39d1c9ce2b.js",revision:"3ba14f39d1c9ce2b"},{url:"/_next/static/chunks/855-018668a9d4ef9edc.js",revision:"018668a9d4ef9edc"},{url:"/_next/static/chunks/9205-f540995b767df00b.js",revision:"f540995b767df00b"},{url:"/_next/static/chunks/9241-fa35d0a52e41e66f.js",revision:"fa35d0a52e41e66f"},{url:"/_next/static/chunks/9397-40b8ac68e22a4d87.js",revision:"40b8ac68e22a4d87"},{url:"/_next/static/chunks/9454.9662cf4535442dce.js",revision:"9662cf4535442dce"},{url:"/_next/static/chunks/9517-17518b5fffe76114.js",revision:"17518b5fffe76114"},{url:"/_next/static/chunks/app/(auth)/forgot-password/page-ee7e6853a7f0608c.js",revision:"ee7e6853a7f0608c"},{url:"/_next/static/chunks/app/(auth)/login/page-c9ee71200de62370.js",revision:"c9ee71200de62370"},{url:"/_next/static/chunks/app/(auth)/onboarding/page-9105e8d9acfc296a.js",revision:"9105e8d9acfc296a"},{url:"/_next/static/chunks/app/(auth)/register/page-8978bf9abf1fa383.js",revision:"8978bf9abf1fa383"},{url:"/_next/static/chunks/app/(auth)/reset-password/page-54396c56f752f536.js",revision:"54396c56f752f536"},{url:"/_next/static/chunks/app/_not-found/page-95f11f5fe94340f1.js",revision:"95f11f5fe94340f1"},{url:"/_next/static/chunks/app/activities/page-a0a3a16a5241c8bb.js",revision:"a0a3a16a5241c8bb"},{url:"/_next/static/chunks/app/ai-assistant/page-ea0cb9041eb93ba6.js",revision:"ea0cb9041eb93ba6"},{url:"/_next/static/chunks/app/analytics/page-cded7241c07e9a6b.js",revision:"cded7241c07e9a6b"},{url:"/_next/static/chunks/app/api/ai/chat/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/api/auth/login/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/api/auth/password-reset/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/api/auth/register/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/api/health/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/api/tracking/feeding/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/api/voice/transcribe/route-a631d97a33877f8a.js",revision:"a631d97a33877f8a"},{url:"/_next/static/chunks/app/children/page-0e252ce6a11c139c.js",revision:"0e252ce6a11c139c"},{url:"/_next/static/chunks/app/family/page-d62d9aa3c0ce4e8f.js",revision:"d62d9aa3c0ce4e8f"},{url:"/_next/static/chunks/app/history/page-15ee1463331fa52a.js",revision:"15ee1463331fa52a"},{url:"/_next/static/chunks/app/insights/page-70b3846f2657c6ee.js",revision:"70b3846f2657c6ee"},{url:"/_next/static/chunks/app/layout-d4106a7be0a7d74b.js",revision:"d4106a7be0a7d74b"},{url:"/_next/static/chunks/app/logout/page-bfb46c1bde2cc713.js",revision:"bfb46c1bde2cc713"},{url:"/_next/static/chunks/app/offline/page-28c005360c2b2736.js",revision:"28c005360c2b2736"},{url:"/_next/static/chunks/app/page-1da10cb66aee95f1.js",revision:"1da10cb66aee95f1"},{url:"/_next/static/chunks/app/settings/page-49ea860501bede41.js",revision:"49ea860501bede41"},{url:"/_next/static/chunks/app/track/activity/page-6f2ad45234b31f19.js",revision:"6f2ad45234b31f19"},{url:"/_next/static/chunks/app/track/diaper/page-28712ef07eea99a5.js",revision:"28712ef07eea99a5"},{url:"/_next/static/chunks/app/track/feeding/page-4718588f4e315746.js",revision:"4718588f4e315746"},{url:"/_next/static/chunks/app/track/medicine/page-e82afeb803115f2a.js",revision:"e82afeb803115f2a"},{url:"/_next/static/chunks/app/track/page-23967c508093468e.js",revision:"23967c508093468e"},{url:"/_next/static/chunks/app/track/sleep/page-b8c2ef682c7db606.js",revision:"b8c2ef682c7db606"},{url:"/_next/static/chunks/framework-bd61ec64032c2de7.js",revision:"bd61ec64032c2de7"},{url:"/_next/static/chunks/main-520e5ec2d671abe7.js",revision:"520e5ec2d671abe7"},{url:"/_next/static/chunks/main-app-02fc3649960ba6c7.js",revision:"02fc3649960ba6c7"},{url:"/_next/static/chunks/pages/_app-4b3fb5e477a0267f.js",revision:"4b3fb5e477a0267f"},{url:"/_next/static/chunks/pages/_error-c970d8b55ace1b48.js",revision:"c970d8b55ace1b48"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-bdb9214328e5d3bd.js",revision:"bdb9214328e5d3bd"},{url:"/_next/static/css/0e32a1f7dc037ce2.css",revision:"0e32a1f7dc037ce2"},{url:"/_next/static/media/19cfc7226ec3afaa-s.woff2",revision:"9dda5cfc9a46f256d0e131bb535e46f8"},{url:"/_next/static/media/21350d82a1f187e9-s.woff2",revision:"4e2553027f1d60eff32898367dd4d541"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/ba9851c3c22cd980-s.woff2",revision:"9e494903d6b0ffec1a1e14d34427d44d"},{url:"/_next/static/media/c5fe6dc8356a8c31-s.woff2",revision:"027a89e9ab733a145db70f09b8a18b42"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/icons/icon-128x128.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-144x144.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-152x152.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-192x192.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-384x384.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-512x512.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-72x72.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/icons/icon-96x96.png",revision:"d41d8cd98f00b204e9800998ecf8427e"},{url:"/manifest.json",revision:"5be5ec81beca107e804b38758d51abd5"},{url:"/next.svg",revision:"8e061864f388b47f33a1c3780831193e"},{url:"/vercel.svg",revision:"61c6b19abff40ea7acd577be818f3976"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:a,state:c})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/api\/.*$/i,new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/.*/i,new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET")});