misskey-dev / misskey

🌎 A completely free and open interplanetary microblogging platform 🚀
https://misskey-hub.net/
GNU Affero General Public License v3.0
9.95k stars 1.35k forks source link

refactor(sw): use fully typed locales #14470

Closed zyoshoka closed 1 month ago

zyoshoka commented 1 month ago

What

Service Worker においても型安全な i18n を用いるようにします。

Why

型安全

Additional info (optional)

Service Worker のコンテクストでは import.meta はエラーになる?ようなので In-Source Testing はやめて別ファイルに切り出しました

Checklist

github-actions[bot] commented 1 month ago

このPRによるapi.jsonの差分

差分はこちら ```diff --- base +++ head @@ -78484,7 +78484,87 @@ ] }, "achievement": { - "type": "string" + "type": "string", + "enum": [ + "notes1", + "notes10", + "notes100", + "notes500", + "notes1000", + "notes5000", + "notes10000", + "notes20000", + "notes30000", + "notes40000", + "notes50000", + "notes60000", + "notes70000", + "notes80000", + "notes90000", + "notes100000", + "login3", + "login7", + "login15", + "login30", + "login60", + "login100", + "login200", + "login300", + "login400", + "login500", + "login600", + "login700", + "login800", + "login900", + "login1000", + "passedSinceAccountCreated1", + "passedSinceAccountCreated2", + "passedSinceAccountCreated3", + "loggedInOnBirthday", + "loggedInOnNewYearsDay", + "noteClipped1", + "noteFavorited1", + "myNoteFavorited1", + "profileFilled", + "markedAsCat", + "following1", + "following10", + "following50", + "following100", + "following300", + "followers1", + "followers10", + "followers50", + "followers100", + "followers300", + "followers500", + "followers1000", + "collectAchievements30", + "viewAchievements3min", + "iLoveMisskey", + "foundTreasure", + "client30min", + "client60min", + "noteDeletedWithin1min", + "postedAtLateNight", + "postedAt0min0sec", + "selfQuote", + "htl20npm", + "viewInstanceChart", + "outputHelloWorldOnScratchpad", + "open3windows", + "driveFolderCircularReference", + "reactWithoutRead", + "clickedClickHere", + "justPlainLucky", + "setNameToSyuilo", + "cookieClicked", + "brainDiver", + "smashTestNotificationButton", + "tutorialCompleted", + "bubbleGameExplodingHead", + "bubbleGameDoubleExplodingHead" + ] } }, "required": [ ```

Get diff files from Workflow Page

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 41.58%. Comparing base (3e85052) to head (d15eb85). Report is 1 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #14470 +/- ## =========================================== - Coverage 41.69% 41.58% -0.11% =========================================== Files 1551 1551 Lines 197046 196999 -47 Branches 3620 3617 -3 =========================================== - Hits 82161 81925 -236 - Misses 114293 114510 +217 + Partials 592 564 -28 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

syuilo commented 1 month ago

🙏🏿