Skip to content

Commit

Permalink
[FIXED] grammatical errors in the UI (#270)
Browse files Browse the repository at this point in the history
* [FIXED] Grammatical errors fixed and wording improved

* [UPDATED] readme.md

* further fixes

* ran prettier
  • Loading branch information
kuv2707 authored Oct 15, 2023
1 parent ea8c15c commit 8d4cf3e
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 65 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,6 @@ paths.txt

# Sentry
next.config.original.js


.yarn
32 changes: 14 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand All @@ -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
Expand All @@ -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

Expand All @@ -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)

Expand Down Expand Up @@ -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.
4 changes: 2 additions & 2 deletions components/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const Footer: React.FC = () => {
<span>Game patch {config.latestPatch}</span>
</Tooltip>
<br />
This is unofficial fan-made site for Company&nbsp;Of&nbsp;Heroes&nbsp;3.
This is an unofficial fan-made site for Company&nbsp;Of&nbsp;Heroes&nbsp;3.
</Text>
<Group spacing={5} className={classes.social} position="right" noWrap>
<Text color="dimmed" size="sm"></Text>
Expand All @@ -54,7 +54,7 @@ export const Footer: React.FC = () => {
<br />
</Container>
<Text color="dimmed" size="xs" style={{ textAlign: "center" }}>
The Company of Heroes is registered trademark of SEGA&nbsp;Holdings.&nbsp;Co
The Company of Heroes is a registered trademark of SEGA&nbsp;Holdings Co.
<br />
The COH Images and other assets are owned by
Relic&nbsp;Entertainment&nbsp;and/or&nbsp;SEGA
Expand Down
2 changes: 1 addition & 1 deletion components/Header/components/OtherMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const OtherMenu = ({
Relic API Status
</Anchor>
</Group>
<Tooltip label="Coming Later" color="orange" withArrow position={"bottom"}>
<Tooltip label="Coming Soon" color="orange" withArrow position={"bottom"}>
<Anchor
className={cx(classes.disabledLink)}
component={Link}
Expand Down
4 changes: 2 additions & 2 deletions components/leaderboards/leaderboard-stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@ const LeaderBoardStats = ({ leaderBoardStats }: { leaderBoardStats: LeaderboardS
<Title order={2}>Amount of players in leaderboards</Title>
<StatsTable data={leaderBoardStats.totalPlayers} />
<Text color={"dimmed"} fs="italic" pl={5} fz={"sm"}>
* Keep in mind that one player is usually ranked in more modes. You can&apos;t sum up all
numbers.{" "}
* Keep in mind that one player is usually ranked in various modes. You can&apos;t sum up
all numbers.{" "}
</Text>
<Space h={"xl"} />
<Title order={2}>Players with level 16 - 20</Title>
Expand Down
2 changes: 1 addition & 1 deletion components/online-players.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const OnlinePlayers: React.FC = () => {

return (
<Tooltip
label={`Amount of online players in Company of Heroes 3 as of ${new Date(
label={`Number of online players in Company of Heroes 3 as of ${new Date(
onlinePlayersData?.timeStampMs || "",
).toLocaleString()}`}
multiline
Expand Down
7 changes: 4 additions & 3 deletions components/screens/about/AboutUs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ const AboutUs = () => {
<>
<Group>
<Text pt="sm">
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.
<br />
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.
</Text>
</Group>
</>
Expand Down
4 changes: 2 additions & 2 deletions components/screens/home/info-cards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
/>
);
Expand All @@ -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."
}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion components/unitStats/dpsChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ export const DpsChart = (props: IDPSProps) => {
<Space h="sm" />
<Text color={"dimmed"} pl={5} fs="italic">
* Computation results are based on approximation models using stats from the game files.
In-Game values vary.
In-Game values may vary.
</Text>
<Text color={"dimmed"} pl={5} fs="italic">
** Area DPS (Eg. Mortar or Stug) vs soft targets are highly experimental. Since squad
Expand Down
8 changes: 5 additions & 3 deletions pages/desktop-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ const App: NextPage = ({ downloadURL, downloadCount, version }: any) => {
</ThemeIcon>
}
>
<List.Item>Easy to use, no configuration required - just start the app</List.Item>
<List.Item>See detailed leaderboard stats of players in your game</List.Item>
<List.Item>Get notified via sound when joining a game (optional)</List.Item>
<List.Item>
Effortless usage, no setup needed - simply launch the application
</List.Item>
<List.Item>Explore intricate player leaderboard statistics</List.Item>
<List.Item>Receive optional sound notifications upon joining a game</List.Item>
<List.Item>
<Anchor href={"https://obsproject.com/"} target={"_blank"}>
OBS
Expand Down
4 changes: 2 additions & 2 deletions pages/explorer/races/[raceId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ const RaceDetail: NextPage<RaceDetailProps> = ({
<IconBarrierBlock size={50} />
<Text color="orange.6" italic>
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&apos;re still working on redefining the calculation for infantry, so feel free to
report any bug.
</Text>
</Flex>

Expand Down
22 changes: 11 additions & 11 deletions pages/other/open-data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ const OpenData: NextPage = () => {
COH3 Leaderboards data
</Title>
<Text pt="md">
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.
</Text>
<Text pt="md">
They are created every day at 04:00 UTC. Downloading for a given day at 05:00 UTC
Expand All @@ -171,12 +171,12 @@ const OpenData: NextPage = () => {
History starts on 10h of May 2023.
</Text>
<Text pt="md">
You can download them our our storage: <br />
You can download them from our storage: <br />
<Code block>{codeForLeaderboards}</Code>
</Text>
<Text fs="italic" fz={"small"}>
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{" "}
<Anchor href={config.DISCORD_INVITE_LINK} target={"_blank"}>
Discord
</Anchor>
Expand All @@ -187,7 +187,7 @@ const OpenData: NextPage = () => {
<Spoiler maxHeight={120} showLabel="Show full details" hideLabel="Hide">
<Code block>{codeTypeOfLeaderBoards}</Code>
<Text fs="italic" fz={"small"}>
Optional fields are marked with &quot;?&quot;. And will be most likely not present
Optional fields are marked with &quot;?&quot;. 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.
</Text>
Expand All @@ -198,7 +198,7 @@ const OpenData: NextPage = () => {
COH3 Match data
</Title>
<Text pt="md">
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
Expand All @@ -220,8 +220,8 @@ const OpenData: NextPage = () => {
<Code block>{codeTypeOfMatchData}</Code>
</Spoiler>
<Text fs="italic" fz={"small"}>
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{" "}
<Anchor href={config.DISCORD_INVITE_LINK} target={"_blank"}>
Discord
</Anchor>
Expand All @@ -238,7 +238,7 @@ const OpenData: NextPage = () => {
For example 1683676800 which is May 10 2023 00:00:00 GMT+0000.
</Text>
<Text pt={"md"}>
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:
</Text>
<Code block>{codeForUnixTimeStamp}</Code>
</div>
Expand Down
12 changes: 6 additions & 6 deletions pages/other/player-export.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const PlayerExport: NextPage = () => {
API for tournament organizers.
</Title>
<Text pt="md">
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.
</Text>
<Space />
<Text pt="md">
Expand All @@ -58,7 +58,7 @@ const PlayerExport: NextPage = () => {
</Text>
<Space h={"xl"} />
<Text>
Example how to import the data into Google Sheets is{" "}
Example of how to import the data into Google Sheets is{" "}
<Anchor
href={
"https://docs.google.com/spreadsheets/d/1K3aEixDvrnEB_Xdvwjx_NsTRqsWv2Kp4-ZSGwxbY7c8/edit?usp=sharing"
Expand All @@ -77,11 +77,11 @@ const PlayerExport: NextPage = () => {

<Space h={"xl"} />
<Text>
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.
</Text>
<Text fs="italic">
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!
</Text>
<Space h={"xl"} />
<Text>
Expand Down
11 changes: 5 additions & 6 deletions pages/other/ranking-tiers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,9 @@ const RankingTiers: NextPage = () => {
Ranking Tiers in Company of Heroes 3
</Title>
<Text fz="sm">
Based on the player ELO, players are placed into specific League and Tier.
<br />
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.
<br />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.
</Text>
<DataTable
records={playerRanksAsArray}
Expand Down Expand Up @@ -107,8 +106,8 @@ const RankingTiers: NextPage = () => {
]}
/>
<Text fz="sm" fs="italic">
Note: If a player doesn&apos;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.
</Text>
</Container>
</>
Expand Down
2 changes: 1 addition & 1 deletion pages/stats/leaderboards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Leaderboards = ({
<Title order={1}>Global Leaderboards Stats</Title>
</div>
<Text style={{ textAlign: "center" }}>
Realtime statistics of PC only leaderboards as of now
Realtime statistics of PC only leaderboards
</Text>
<Space h={"xl"} />
<LeaderBoardStats leaderBoardStats={leaderBoardStats} />
Expand Down
12 changes: 6 additions & 6 deletions pages/stats/players.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ const PlayerStats = ({
>
<div style={{ gridColumn: 1, justifySelf: "end" }}>
<Group spacing={5}>
<>Total amount of tracked players</>{" "}
<>Total number of tracked players</>{" "}
<HelperIcon
text={
"We can track only players who were ranked at least once in any mode. We are tracking from May 19th 2023."
"We can only track players who have been ranked at least once in any game mode since May 19th, 2023."
}
/>
</Group>
Expand Down Expand Up @@ -149,13 +149,13 @@ const PlayerStats = ({
</Group>
<Group spacing={"xs"}>
<Text fz={"xs"}>
We are able to track only players who played &quot;ranked&quot; match in a
We are only able to track players who played &quot;ranked&quot; match in a
given day.
</Text>
<HelperIcon
text={
<>
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.
<br />
For example: <br />
Player is ranked only in 1v1 Wehrmacht, plays 1v1 match as Wehrmacht -
Expand All @@ -171,11 +171,11 @@ const PlayerStats = ({
/>
</Group>
<Text fz={"xs"}>
This doesn&apos;t show the real amount of players who played the game in a
This doesn&apos;t show the real number of players who played the game on a
given day.
</Text>
<Text fz={"xs"}>
You can&apos;t compare these numbers with coh2stats numbers, they are tracked
These numbers can&apos;t be compared with coh2stats numbers, they are tracked
differently.
</Text>
</Paper>
Expand Down

0 comments on commit 8d4cf3e

Please sign in to comment.