Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(sw): use fully typed locales #14470

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

zyoshoka
Copy link
Contributor

What

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

Why

型安全

Additional info (optional)

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

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

@github-actions github-actions bot added packages/frontend Client side specific issue/PR packages/backend Server side specific issue/PR packages/misskey-js packages/sw labels Aug 27, 2024
Copy link
Collaborator

@KisaragiEffective KisaragiEffective left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ぱっと見良さそうです。ありがとうございます🙏🏻
ただ、私はi18nについてあまり詳しくないので他のレビュワーの意見を募集したいと思います。

Copy link
Contributor

github-actions bot commented Aug 27, 2024

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

差分はこちら
--- 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

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

Additional details and impacted files
@@             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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@syuilo syuilo merged commit 06855f7 into misskey-dev:develop Aug 30, 2024
28 checks passed
@syuilo
Copy link
Member

syuilo commented Aug 30, 2024

🙏🏿

@zyoshoka zyoshoka deleted the sw-use-fully-typed-locales branch August 30, 2024 03:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packages/backend Server side specific issue/PR packages/frontend Client side specific issue/PR packages/misskey-js packages/sw
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants