From 8d4cf3efbf2584ce536c1eff8995eedc21b76b00 Mon Sep 17 00:00:00 2001 From: Kislay <88523649+kuv2707@users.noreply.github.com> Date: Sun, 15 Oct 2023 17:14:33 +0530 Subject: [PATCH] [FIXED] grammatical errors in the UI (#270) * [FIXED] Grammatical errors fixed and wording improved * [UPDATED] readme.md * further fixes * ran prettier --- .gitignore | 3 ++ README.md | 32 ++++++++----------- components/Footer/Footer.tsx | 4 +-- components/Header/components/OtherMenu.tsx | 2 +- components/leaderboards/leaderboard-stats.tsx | 4 +-- components/online-players.tsx | 2 +- components/screens/about/AboutUs.tsx | 7 ++-- components/screens/home/info-cards.tsx | 4 +-- components/unitStats/dpsChart.tsx | 2 +- pages/desktop-app.tsx | 8 +++-- pages/explorer/races/[raceId].tsx | 4 +-- pages/other/open-data.tsx | 22 ++++++------- pages/other/player-export.tsx | 12 +++---- pages/other/ranking-tiers.tsx | 11 +++---- pages/stats/leaderboards.tsx | 2 +- pages/stats/players.tsx | 12 +++---- 16 files changed, 66 insertions(+), 65 deletions(-) diff --git a/.gitignore b/.gitignore index 3d5e9ec9..54e9db13 100644 --- a/.gitignore +++ b/.gitignore @@ -195,3 +195,6 @@ paths.txt # Sentry next.config.original.js + + +.yarn \ No newline at end of file diff --git a/README.md b/README.md index 33bf7ea0..01d77823 100644 --- a/README.md +++ b/README.md @@ -37,16 +37,15 @@ yarn dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. -Before making an MR please create an issue describing what you want to change / how you want to change it. -So we can have some discussion, also it avoids multiple people working on the same thing. +Before making an MR please create an issue describing what you want to change and how you want to change it so we can have some discussion. Furthermore, it avoids multiple people working on the same thing. -Feel free to create fork and make MR. Before PR you can test your code with `yarn build` to make sure it can be build. +Feel free to create a fork and make an MR. Before PR you can test your code with `yarn build` to make sure it builds. Also make sure the prettier is right `yarn fix` and `yarn test` Development conventions: - Name the files with `-` instead of camelCase. Eg `color-scheme-toggle.tsx` -- Try not to add anymore eslint warnings if possible (Don't worry if you don't know how to solve it though, we can solve on MR) +- Try not to add any more eslint warnings (Don't worry if you don't know how to solve it though, we can solve on MR) - Prettier and eslint should cover the rest (Don't forget to run it) - We are using [Mantine](https://mantine.dev/) component library @@ -60,7 +59,7 @@ Maps are specified in https://github.com/cohstats/coh3-stats/blob/master/src/coh #### Utilize images from the game -You can use function getIconsPathOnCDN where you can pass the image name or the full path and it should automatically +You can use the function getIconsPathOnCDN where you can pass the image name or the full path and it should automatically resolve it on our hosting https://github.com/cohstats/coh3-stats/blob/master/src/utils.ts#L22 If the image is not found there, you can always add it to the /public folder. @@ -86,7 +85,7 @@ For more info see readme at https://www.npmjs.com/package/next-sitemap ##### Generating the links to all units: -We have special script for that. +We have a special script for that. 1. You need Node 19+ 2. Run @@ -95,7 +94,7 @@ We have special script for that. npx ts-node --compiler-options "{\"module\":\"commonjs\"}" scripts/unit-paths.ts > paths.txt ``` -3. Copy the content from `paths.txt` and paste it into `next-sitemap.config.js` +3. Copy the content of `paths.txt` and paste it into `next-sitemap.config.js` ### NextJS development @@ -121,16 +120,13 @@ Example pages: #### Reasons: -- Because it's public website, SSR pages will be much better readed by search engines and generally it will provide - better experience -- All the data fetching (from DB, cloud functions and other) should happen in SSR, because GCP services are blocked in - some countries ( China, Russia), that way we can offer site avaliabily everywhere. -- The SSR functions can connect to some public APIs and will fetch the data from Firestore and may call some cloud - functions -- The SSR functions should be "light weight" if we need to run some big data computations we should do so Cloud - Functions on GCP where we can control the performance -- The whole source code for NextJS will be in this repo and will be open source -- The BE of the CF will be closed source because, we will most likely connect to sensitive APIs +- Because it's a public website, SSR pages will be much better read by search engines and it will provide an overall better experience. +- All the data fetching (from DB, cloud functions and other) should happen in SSR, so that we can offer site avaliabily everywhere, as GCP services are blocked in + some countries ( China, Russia). +- The SSR functions have the capability to connect to public APIs, retrieve data from Firestore, and invoke cloud functions when necessary. +- The SSR functions should remain lightweight. For extensive data computations, utilize Cloud Functions on GCP, enabling performance control. +- The complete source code for our Next.js frontend will be available in this repository and will be open source. +- The BE of the CF will be closed source because, we will most likely connect to sensitive APIs. ![image](https://user-images.githubusercontent.com/8086995/217599315-ff660c70-e9d6-4e99-88b9-c4ea21892433.png) @@ -167,7 +163,7 @@ Backend: ### Learn More about NextJS -To learn more about Next.js, take a look at the following resources: +To learn more about Next.js, have a look at the following resources: - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx index 1f6d12b0..8a33d559 100644 --- a/components/Footer/Footer.tsx +++ b/components/Footer/Footer.tsx @@ -42,7 +42,7 @@ export const Footer: React.FC = () => { Game patch {config.latestPatch}
- This is unofficial fan-made site for Company Of Heroes 3. + This is an unofficial fan-made site for Company Of Heroes 3. @@ -54,7 +54,7 @@ export const Footer: React.FC = () => {
- The Company of Heroes is registered trademark of SEGA Holdings. Co + The Company of Heroes is a registered trademark of SEGA Holdings Co.
The COH Images and other assets are owned by Relic Entertainment and/or SEGA diff --git a/components/Header/components/OtherMenu.tsx b/components/Header/components/OtherMenu.tsx index 1f0c9c05..25e3f5c2 100644 --- a/components/Header/components/OtherMenu.tsx +++ b/components/Header/components/OtherMenu.tsx @@ -113,7 +113,7 @@ const OtherMenu = ({ Relic API Status
- + Amount of players in leaderboards - * Keep in mind that one player is usually ranked in more modes. You can't sum up all - numbers.{" "} + * Keep in mind that one player is usually ranked in various modes. You can't sum up + all numbers.{" "} Players with level 16 - 20 diff --git a/components/online-players.tsx b/components/online-players.tsx index 231fa28e..2de26afc 100644 --- a/components/online-players.tsx +++ b/components/online-players.tsx @@ -50,7 +50,7 @@ export const OnlinePlayers: React.FC = () => { return ( { <> - This site is a community project. We have most of our code open-source on our GitHub + This website is a community-deiven project. We have most of our code open-source on our + GitHub.
- We are also on Discord, feel free to join us and help us with the development or ask any - questions. + We are also on Discord, feel free to join us and contribute to the development or ask + any questions you may have.
diff --git a/components/screens/home/info-cards.tsx b/components/screens/home/info-cards.tsx index 653345fe..5c26cdd8 100644 --- a/components/screens/home/info-cards.tsx +++ b/components/screens/home/info-cards.tsx @@ -53,7 +53,7 @@ const DPSCalculatorCard = () => { title={"DPS Calculator"} imageSrc={getIconsPathOnCDN("/icons/races/common/symbols/hmg.png")} content={ - "Compare DPS of all units in the game. Customize the unit load out with different weapons. You can take into consideration also HP of the units." + "Compare DPS of all units in the game. Customize the unit load out with different weapons. You can also take into consideration the HP of the units." } /> ); @@ -66,7 +66,7 @@ const UnitBrowserCard = () => { title={"Unit Browser"} imageSrc={getIconsPathOnCDN("/icons/common/squad/squad.png")} content={ - "Browse all units in the game. See their stats, weapons, upgrades and all the other stuff. See Explorer menu for faction overview and more." + "Explore game units, including stats, weapons, and upgrades. Navigate the Explorer menu for faction overview and more details." } /> ); diff --git a/components/unitStats/dpsChart.tsx b/components/unitStats/dpsChart.tsx index e27899b8..f28d3100 100644 --- a/components/unitStats/dpsChart.tsx +++ b/components/unitStats/dpsChart.tsx @@ -672,7 +672,7 @@ export const DpsChart = (props: IDPSProps) => { * Computation results are based on approximation models using stats from the game files. - In-Game values vary. + In-Game values may vary. ** Area DPS (Eg. Mortar or Stug) vs soft targets are highly experimental. Since squad diff --git a/pages/desktop-app.tsx b/pages/desktop-app.tsx index 1b6f0ae7..c79066ec 100644 --- a/pages/desktop-app.tsx +++ b/pages/desktop-app.tsx @@ -75,9 +75,11 @@ const App: NextPage = ({ downloadURL, downloadCount, version }: any) => { } > - Easy to use, no configuration required - just start the app - See detailed leaderboard stats of players in your game - Get notified via sound when joining a game (optional) + + Effortless usage, no setup needed - simply launch the application + + Explore intricate player leaderboard statistics + Receive optional sound notifications upon joining a game OBS diff --git a/pages/explorer/races/[raceId].tsx b/pages/explorer/races/[raceId].tsx index b392a97f..ca22234f 100644 --- a/pages/explorer/races/[raceId].tsx +++ b/pages/explorer/races/[raceId].tsx @@ -88,8 +88,8 @@ const RaceDetail: NextPage = ({ Important Note: This section may contain some inacurracies regarding the unit costs. - We still working to refine the calculation for infantry so feel free to report any - bug. + We're still working on redefining the calculation for infantry, so feel free to + report any bug. diff --git a/pages/other/open-data.tsx b/pages/other/open-data.tsx index 68843c48..031df9ce 100644 --- a/pages/other/open-data.tsx +++ b/pages/other/open-data.tsx @@ -160,9 +160,9 @@ const OpenData: NextPage = () => { COH3 Leaderboards data - COH3 Stats is storing all the historic leaderboards for COH3. You can download the - .json files from our storage. Each JSON file contains full leaderboards (all ranks) - for a given mode and faction. + COH3 Stats stores complete historical leaderboards for COH3. You can download the + .json files from our storage. Each JSON file includes comprehensive leaderboards + with all the ranks for a specific mode and faction. They are created every day at 04:00 UTC. Downloading for a given day at 05:00 UTC @@ -171,12 +171,12 @@ const OpenData: NextPage = () => { History starts on 10h of May 2023. - You can download them our our storage:
+ You can download them from our storage:
{codeForLeaderboards}
- If you are going to use the data, please mention the source of the data. And also - please share your project with us on our{" "} + If you plan to utilize the data, kindly acknowledge the data source. Additionally, + consider sharing your project with us on our{" "} Discord @@ -187,7 +187,7 @@ const OpenData: NextPage = () => { {codeTypeOfLeaderBoards} - Optional fields are marked with "?". And will be most likely not present + Optional fields are marked with "?". And will most likely be not present as they are not deemed important. However they are on the Relic API in case you need them. Reach out to us if you need any clarification. @@ -198,7 +198,7 @@ const OpenData: NextPage = () => { COH3 Match data - COH3 Stats is storing played matches. It should include all games where at least 1 + COH3 Stats stores played matches. It should include all games where at least 1 player was ranked. It might also include some custom and other types of games. It should not include any broken games. Aka game 3v3, which had only 2 players on one side. It is recommended to filter the games based on matchtype_id. You can download @@ -220,8 +220,8 @@ const OpenData: NextPage = () => { {codeTypeOfMatchData} - If you are going to use the data, please mention the source of the data. And also - please share your project with us on our{" "} + If you plan to utilize the data, kindly acknowledge the data source. Additionally, + consider sharing your project with us on our{" "} Discord @@ -238,7 +238,7 @@ const OpenData: NextPage = () => { For example 1683676800 which is May 10 2023 00:00:00 GMT+0000. - In JavaScript you can get the timestamp for the current day with this code: + In JavaScript you can get the timestamp for the current day with the following code: {codeForUnixTimeStamp} diff --git a/pages/other/player-export.tsx b/pages/other/player-export.tsx index a6b89051..1f1fdbab 100644 --- a/pages/other/player-export.tsx +++ b/pages/other/player-export.tsx @@ -40,8 +40,8 @@ const PlayerExport: NextPage = () => { API for tournament organizers. - This API gives you access to players leaderboard stats in CSV format. Which you can - easily import in Excel sheet. + This API provides access to players leaderboard stats in CSV format which you can + easily import in an Excel sheet. @@ -58,7 +58,7 @@ const PlayerExport: NextPage = () => { - Example how to import the data into Google Sheets is{" "} + Example of how to import the data into Google Sheets is{" "} { - In case you need the data for your tournament in different format or you have any - other questions, let us know on Discord. + If you require the data for your tournament in a different format or have any other + inquiries, please feel free to reach out to us on Discord. - Shout-out for coh3stats.com at your tournament would be awesome. Thank you + A shoutout to coh3stats.com in your tournament would be awesome. Thank you! diff --git a/pages/other/ranking-tiers.tsx b/pages/other/ranking-tiers.tsx index b97ad79c..27f015af 100644 --- a/pages/other/ranking-tiers.tsx +++ b/pages/other/ranking-tiers.tsx @@ -44,10 +44,9 @@ const RankingTiers: NextPage = () => { Ranking Tiers in Company of Heroes 3 - Based on the player ELO, players are placed into specific League and Tier. -
- Player needs at least 10 matches for each faction in a specific game type to earn a - rank and be placed in a tier. + Based on the player ELO, players are placed into specific Leagues and Tiers. +
A player needs at least 10 matches for each faction in a specific game type to + earn a rank and be placed in a tier.
{ ]} /> - Note: If a player doesn't play for a long time, they loose their rank. But you - need to play just 1 game to get it back. + Note: If a player remains inactive for an extended period, they lose their rank. + However, they can regain it by playing just one game. diff --git a/pages/stats/leaderboards.tsx b/pages/stats/leaderboards.tsx index 4ec62a96..b3671d5e 100644 --- a/pages/stats/leaderboards.tsx +++ b/pages/stats/leaderboards.tsx @@ -48,7 +48,7 @@ const Leaderboards = ({ Global Leaderboards Stats - Realtime statistics of PC only leaderboards as of now + Realtime statistics of PC only leaderboards diff --git a/pages/stats/players.tsx b/pages/stats/players.tsx index cce7e72c..914beeda 100644 --- a/pages/stats/players.tsx +++ b/pages/stats/players.tsx @@ -91,10 +91,10 @@ const PlayerStats = ({ >
- <>Total amount of tracked players{" "} + <>Total number of tracked players{" "} @@ -149,13 +149,13 @@ const PlayerStats = ({ - We are able to track only players who played "ranked" match in a + We are only able to track players who played "ranked" match in a given day. - We track only players who played match in a mode where they are ranked. + We only track players who played match in a mode where they are ranked.
For example:
Player is ranked only in 1v1 Wehrmacht, plays 1v1 match as Wehrmacht - @@ -171,11 +171,11 @@ const PlayerStats = ({ />
- This doesn't show the real amount of players who played the game in a + This doesn't show the real number of players who played the game on a given day. - You can't compare these numbers with coh2stats numbers, they are tracked + These numbers can't be compared with coh2stats numbers, they are tracked differently.