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

Add Crowdin #51

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
78b614a
Begin testing i18n
Kas-tle Dec 23, 2024
6dca2df
Add crowdin in-context demo for non-mdx
Kas-tle Dec 26, 2024
e76e9ec
Add crowdin-sync system
Kas-tle Jan 2, 2025
2175c8d
Working sync system for translations
Kas-tle Jan 12, 2025
9066ebc
Only build en locale for PRs
Kas-tle Jan 12, 2025
7406329
Modify yarn install
Kas-tle Jan 12, 2025
63637a6
Do not immute cache
Kas-tle Jan 12, 2025
abeb504
Try with standard yarn install
Kas-tle Jan 12, 2025
9abb44d
Revert to yarn --immutable
Kas-tle Jan 12, 2025
9e092ee
Remove explicit url/file-loader resolutions
Kas-tle Jan 12, 2025
6d5ee25
Only log webpack errors
Kas-tle Jan 12, 2025
08fdaab
Added MCServerHost to hosting providers (#47)
Roolps Dec 26, 2024
539457a
Update supported Bedrock versions
onebeastchris Feb 12, 2025
734ae77
Remove and Replace "TydiumCraft Skin API" (#53)
Tydium Feb 14, 2025
4719cfe
Update wording for creepernation api
Creeperz653 Feb 14, 2025
163a667
Update GeyserExtras description (#52)
letsgoawaydev Feb 14, 2025
f374e2b
Try matrix build strategy
Kas-tle Feb 27, 2025
7fa113c
Fix matrix output
Kas-tle Feb 27, 2025
068dd58
Matrix goes to GITHUB_OUTPUT
Kas-tle Feb 27, 2025
7cc9790
Fix deploy needs to combine
Kas-tle Feb 27, 2025
d5074f1
Ensure correct commit is used if crowdin updates
Kas-tle Feb 27, 2025
1a0b19f
Make sure excluded content is respected
Kas-tle Feb 27, 2025
275f905
Allow permission for commit action write
Kas-tle Feb 27, 2025
f629f33
Sync translations with Crowdin
github-actions[bot] Feb 27, 2025
f281f31
Update index.md to make clear that this is for servers, not purely fo…
D4n2021 Feb 27, 2025
0ed2600
Update providers.ts (#58)
santevemox Feb 27, 2025
9e53790
Start on re-writing the providers page to provide more useful details…
onebeastchris Dec 23, 2024
8002488
more work on this
onebeastchris Jan 3, 2025
c2256bb
Rework paper page for setup
rtm516 Jan 10, 2025
fa0732c
Don't try and build paper setup as a full page
rtm516 Jan 10, 2025
afa369e
adjust not listed message
onebeastchris Jan 10, 2025
930b71f
update mod/proxy pages
onebeastchris Jan 12, 2025
e4ff344
Initial setup i18n
Kas-tle Feb 28, 2025
bb2b259
Add ability to hide proxy setup instructions by provider
Kas-tle Mar 1, 2025
bd5b3c6
Temporary auto deployment; fix broken links
Kas-tle Mar 1, 2025
0dd8a1f
Fix heading consistency
Kas-tle Mar 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 89 additions & 15 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- master
# Remove before merging
- feature/i18n
paths-ignore:
- '.github/CODEOWNERS'
- '.github/workflows/pr.yml'
Expand All @@ -26,9 +28,14 @@ concurrency:
cancel-in-progress: true

jobs:
build:
sync:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
outputs:
locales: ${{ steps.locales.outputs.locales }}
commit: ${{ steps.commit.outputs.commit-hash == '' && steps.commit.outputs.commit-hash || github.sha }}
permissions:
contents: write
steps:
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
Expand All @@ -41,40 +48,107 @@ jobs:
with:
fetch-depth: 0

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 22
cache: yarn

- name: Install dependencies
run: yarn install --immutable

- name: Sync Translations
run: yarn crowdin-sync
env:
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
CROWDIN_ORGANIZATION: ${{ secrets.CROWDIN_ORGANIZATION }}

- name: Commit Changes
id: commit
# See https://github.com/planetscale/ghcommit-action/releases
uses: planetscale/ghcommit-action@d4176bfacef926cc2db351eab20398dfc2f593b5 # v0.2.0
with:
commit_message: "Sync translations with Crowdin"
repo: ${{ github.repository }}
branch: ${{ github.head_ref || github.ref_name }}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Get locales
run: yarn output-locales

- name: Define matrix
id: locales
run: echo "locales=$(cat locales.json)" >> $GITHUB_OUTPUT

build:
runs-on: ubuntu-latest
needs: sync
strategy:
matrix:
locales: ${{ fromJson(needs.sync.outputs.locales) }}
steps:
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 22

- name: Enable Corepack
run: corepack enable

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
fetch-depth: 0
ref: ${{ needs.sync.outputs.commit }}

- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 22
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- name: Build Locale
run: yarn build --locale ${{ matrix.locales }}

- name: Upload artifact
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1
with:
path: build
name: ${{ matrix.locales }}

- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57
combine:
runs-on: ubuntu-latest
needs: [build, sync]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
path: |
${{ github.workspace }}/.docusaurus
${{ github.workspace }}/**/.cache
key: |
${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}
fetch-depth: 0
ref: ${{ needs.sync.outputs.commit }}

- name: Build website
run: yarn build
- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b

- name: Download artifacts
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806
with:
path: build

- name: Move default locale to root build
run: |
mv build/en/* build/
rm -rf build/en

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: build

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
needs: combine
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
cache: yarn

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install --immutable

- uses: actions/cache/restore@1bd1e32a3bdc45362d1e726936510720a7c30a57
with:
Expand All @@ -38,7 +38,7 @@ jobs:
${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}

- name: Build website
run: yarn build
run: yarn build --locale en

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ vendor
.env.development.local
.env.test.local
.env.production.local
locales.json

npm-debug.log*
yarn-debug.log*
Expand Down
9 changes: 6 additions & 3 deletions blog/2021-12-28-1-18-release-and-more.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
---
title: "1.18 Release, MCProtocolLib, Refactors & More!"
slug: "1-18-release-and-more"
title: '1.18 Release, MCProtocolLib, Refactors & More!'
slug: 1-18-release-and-more
authors: RednedEpic
hide_table_of_contents: false
description: "In this post, we will be covering all the changes that led up to the 1.18 release."
description: >-
In this post, we will be covering all the changes that led up to the 1.18
release.
crowdin_page_id: cd16bcf9-0de9-4239-946a-4ccdbeb372f6
---
Hi everyone 👋

Expand Down
7 changes: 4 additions & 3 deletions blog/2023-01-02-Looking-back-at-2022.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Looking back at 2022"
slug: "looking-back-at-2022"
title: Looking back at 2022
slug: looking-back-at-2022
authors: Camotoy
hide_table_of_contents: false
description: "A look back at the year of 2022 for Geyser."
description: A look back at the year of 2022 for Geyser.
crowdin_page_id: 921bcb8d-70cb-49d1-9f83-deb59979eafa
---
Hi.

Expand Down
7 changes: 4 additions & 3 deletions blog/2023-07-08-four-years-of-geyser.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Four Years of Geyser"
slug: "four-years-of-geyser"
title: Four Years of Geyser
slug: four-years-of-geyser
authors: RednedEpic
hide_table_of_contents: false
description: "Geyser is now four years old!"
description: Geyser is now four years old!
crowdin_page_id: 67cfbd70-8366-42ed-b564-b84ed9ce65b5
---

Hi everyone,
Expand Down
9 changes: 5 additions & 4 deletions blog/2024-05-02-geyser-1-20-5.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "Geyser Available for Java 1.20.5/1.20.6"
slug: "geyser-1-20-5"
title: Geyser Available for Java 1.20.5/1.20.6
slug: geyser-1-20-5
authors: Camotoy
hide_table_of_contents: false
description: "Support for Java 1.20.5 and 1.20.6 has been released"
description: Support for Java 1.20.5 and 1.20.6 has been released
crowdin_page_id: f0219b8c-1dab-417d-99bb-6a068307fae9
---

Support for Java 1.20.5 and 1.20.6 has been released. Thank you for your patience as we work on the update!
Expand Down Expand Up @@ -56,4 +57,4 @@ This update would have been a nightmare without the many hands we had to help im

[AJ Ferguson](https://github.com/AJ-Ferguson) and [Chris](https://github.com/onebeastchris) both helped with implementing new features and fixing regressions.

[Kastle](https://github.com/Kas-tle), hot off the heels of stronger security protections on the Bedrock side, assisted with custom skull reimplementation and entity properties implementation.
[Kastle](https://github.com/Kas-tle), hot off the heels of stronger security protections on the Bedrock side, assisted with custom skull reimplementation and entity properties implementation.
9 changes: 5 additions & 4 deletions blog/2024-05-05-raknet-amplification-attack.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
title: "RakNet Amplification Attack Summary and Response"
slug: "raknet-amplification-attack"
title: RakNet Amplification Attack Summary and Response
slug: raknet-amplification-attack
authors: Kas-tle
hide_table_of_contents: false
description: "A look at how we dealt with an exploit in the RakNet protocol"
description: A look at how we dealt with an exploit in the RakNet protocol
crowdin_page_id: 4a2c95a7-61af-4d0b-aa13-d034e0e5a0b9
---

In March, we were made aware of an exploit in the RakNet networking library used by Geyser, making Geyser instances vulnerable to use in a Distributed Denial of Service (DDoS) amplification attack. This bug was patched on all builds of Geyser numbered 478 and later. If you are still running an outdated build of Geyser, you should update immediately by downloading the latest build from [https://geysermc.org/download](https://geysermc.org/download). The original [security advisory](https://github.com/CloudburstMC/Network/security/advisories/GHSA-6h3m-c6fv-8hvh) for this vulnerability was published on the [CloudburstMC/Network](https://github.com/CloudburstMC/Network) repository. This post will detail the timeline, anatomy of the attack, our response, and additional measures we have taken to prevent similar attacks in the future.
Expand Down Expand Up @@ -239,4 +240,4 @@ It is extremely important that all those running vulnerable instances of Geyser

## Acknowledgements

We thank the community for their patience as we addressed this issue, all those who responsibly disclosed this issue to us, the developers at Cloudburst and Geyser that worked to mitigate the issue, the server hosts that took an active role in ensuring instances on their hosting services were patched as soon as possible, all donors for their financial support of Geyser, and Cubecraft for their continued financial and operational support of the project.
We thank the community for their patience as we addressed this issue, all those who responsibly disclosed this issue to us, the developers at Cloudburst and Geyser that worked to mitigate the issue, the server hosts that took an active role in ensuring instances on their hosting services were patched as soon as possible, all donors for their financial support of Geyser, and Cubecraft for their continued financial and operational support of the project.
77 changes: 71 additions & 6 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,37 @@ const config: Config = {

i18n: {
defaultLocale: 'en',
locales: ['en'],
locales: ['en', 'ar','crp', 'cs', 'de', 'fr', 'it', 'ja', 'ru', 'tr', 'uk', 'zh-CN'],
localeConfigs: {
crp: {
label: 'Crowdin',
direction: 'ltr',
htmlLang: 'crp',
calendar: 'gregory',
path: 'crp',
}
}
},

markdown: process.env.DOCUSAURUS_CURRENT_LOCALE === 'crp' ? {
preprocessor: ({ fileContent }) => {
const lines = fileContent.split('\n');

for (let i = 0; i < lines.length; i++) {
if (lines[i].startsWith('#')) {
const lastOpenCurly = lines[i].lastIndexOf('{');
const lastCloseCurly = lines[i].lastIndexOf('}');
if (lastCloseCurly !== -1 && lastOpenCurly !== -1 && lastCloseCurly > lastOpenCurly) {
const curly = lines[i].substring(lastOpenCurly, lastCloseCurly + 1);
lines[i] = lines[i].replace(curly, '').replace('\\', '') + ' ' + curly;
}
}
}

return lines.join('\n');
}
} : {},

presets: [
[
'classic',
Expand Down Expand Up @@ -80,10 +108,47 @@ const config: Config = {
],
'docusaurus-plugin-sass',
'./src/plugins/create-versions-json.ts',
'./src/plugins/create-providers-json.ts'
'./src/plugins/create-providers-json.ts',
[
'./src/plugins/crowdin-sync.ts',
{
projectId: 11,
markdownFolders: [
{ path: 'wiki', destination: 'docusaurus-plugin-content-docs/current' },
{ path: 'blog', destination: 'docusaurus-plugin-content-blog' },
],
jsonKeyExclusions: [ 'providers.provider.' ]
}
],
'./src/plugins/output-locales.ts',
'./src/plugins/modify-webpack.ts',
],
themes: ["docusaurus-theme-openapi-docs"],

headTags: process.env.DOCUSAURUS_CURRENT_LOCALE === 'crp' ? [
{
tagName: 'script',
attributes: {
type: 'text/javascript',
},
innerHTML: `
var _jipt = [];
_jipt.push(['project', '88ac5ea17501f26d48048e17e149fee3']);
_jipt.push(['domain', 'geysermc']);
_jipt.push(['before_dom_insert', function(text, node, attribute) {
return text.replace(/.?\{#[^}]+\}/g, '');
}]);
`
},
{
tagName: 'script',
attributes: {
type: 'text/javascript',
src: '//cdn.crowdin.com/jipt/jipt.js'
}
}
] : [],

themeConfig: {
image: 'img/site/geyser.png',
navbar: {
Expand Down Expand Up @@ -162,10 +227,10 @@ const config: Config = {
position: 'right',
className: 'header-discord-link'
},
// {
// type: 'localeDropdown',
// position: 'right',
// },
{
type: 'localeDropdown',
position: 'right',
},
],
},
footer: {
Expand Down
Loading