mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
Applied kev's suggestions
This commit is contained in:
parent
56c3f58649
commit
40bd9c52bb
@ -15,12 +15,12 @@ On the other hand, if Biome complains about a piece of code, **there's probably
|
||||
Biome has integration with many popular code editors. See [these](https://biomejs.dev/guides/editors/first-party-extensions/) [pages](https://biomejs.dev/guides/editors/third-party-extensions/) for information about enabling Biome in your editor of choice.
|
||||
|
||||
## Automated Runs
|
||||
Generally speaking, most users shouldn't need to run Biome directly; in addition to editor integration, a [pre-commit hook](../lefthook.yml) will periodically run Biome before each commit on any changed files.
|
||||
Generally speaking, most users shouldn't need to run Biome directly; in addition to editor integration, a [pre-commit hook](../lefthook.yml) will automatically format and lint all staged files before each commit.
|
||||
|
||||
> ![WARNING]
|
||||
> You will **not** be able to commit code if any staged files contain `error`-level linting problems. \
|
||||
> If you, for whatever reason, _absolutely need_ to bypass Lefthook for a given commit,
|
||||
> `LEFTHOOK=0 git commit` will skip running all pre-commit hooks during the commit process.
|
||||
> pass the `--no-verify` flag to `git commit`.
|
||||
|
||||
We also have a [Github Action](../.github/workflows/linting.yml) to verify code quality each time a PR is updated, preventing bad code from inadvertently making its way upstream. \
|
||||
These are effectively the same commands as run by Lefthook, merely on a project-wide scale.
|
||||
@ -52,6 +52,6 @@ Some things to consider:
|
||||
- Some rules are currently marked as warnings (`warn`) to allow for gradual refactoring without blocking development. **Do not write new code that triggers these rules!**
|
||||
- The linter is configured to ignore specific files and folders (such as excessively large files or ones in need of refactoring) to improve performance and focus on actionable areas.
|
||||
|
||||
Any questions about linting rules can be brought up in the `#dev-corner` channel in the communityDiscord.
|
||||
Any questions about linting rules can be brought up in the `#dev-corner` channel in the community Discord.
|
||||
|
||||
[^1]: A complete list of rules can be found in the [`biome.jsonc`](../biome.jsonc) file in the project root. Many rules are accompanied by comments explaining the reasons for their inclusion (or lack thereof).
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Localization 101
|
||||
|
||||
PokéRogue's localization team puts immense effort into making the game accessible around the world, supporting over 12 different languages at the time of writing this document.
|
||||
PokéRogue's localization team puts immense effort into making the game accessible around the world, supporting over 12 different languages at the time of writing this document. \
|
||||
As a developer, it's important to help maintain global accessibility by effectively coordinating with the Translation Team on any new features or enhancements.
|
||||
|
||||
This document aims to cover everything you need to know to help keep the integration process for localization smooth and simple.
|
||||
@ -33,14 +33,14 @@ The parent repo (the "superproject") houses a cloned version of the 2nd reposito
|
||||
|
||||
The following command will initialize your branch's locales repository and update its HEAD:
|
||||
```bash
|
||||
pnpm update:locales
|
||||
pnpm update-locales
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> This command is run _automatically_ after cloning, merging or changing branches, so you should rarely have to run it manually.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> If you EVER run into issues with the `locales` submodule, try deleting the `.git/modules/public` and `public/locales` folders before re-initializing the repository.
|
||||
> If you EVER run into issues with the `locales` submodule, try deleting the `.git/modules/public` and `public/locales` folders before re-initializing it again.
|
||||
|
||||
## How Are Translations Integrated?
|
||||
|
||||
@ -80,7 +80,7 @@ Given `pokerogue-locales` is a full-fledged `git` repository _inside_ `pokerogue
|
||||
|
||||
> [!WARNING]
|
||||
> Make sure to checkout or rebase onto `upstream/main` (`pnpm update-locales:remote`) **BEFORE** creating a locales PR!
|
||||
> The checked-out commit is based on the superproject's SHA-1 by default, so hastily making changes may see you basing your commits on last week 's `HEAD`.
|
||||
> The checked-out commit is based on the superproject's SHA-1 by default, so hastily making changes may see you basing your commits on last week's `HEAD`.
|
||||
|
||||
## Requirements for Adding Translated Text
|
||||
When a new feature or enhancement requires adding a new locales key **without changing text in existing keys**, we have the following workflow with regards to localization:
|
||||
@ -139,7 +139,7 @@ The easiest way to do this is by **pinging the current Head of Translation** in
|
||||
|
||||
<!-- Remember to update this everytime the head of translation changes! -->
|
||||
> [!IMPORTANT]
|
||||
> The current Head of Translation is:
|
||||
> The current Head of Translation is: \
|
||||
> ** @lugiadrien **
|
||||
|
||||
# Closing Remarks
|
||||
|
@ -6,7 +6,7 @@ pre-commit:
|
||||
biome-lint:
|
||||
# Disable colors as certain IDEs don't support it in the output pane.
|
||||
# Summary mode looks decent in plain ASCII anyhow
|
||||
run: pnpm exec biome check --write --colors=off --reporter=summary --staged --no-errors-on-unmatched
|
||||
run: pnpm exec biome check --write --colors=off --reporter=summary --staged --no-errors-on-unmatched --diagnostic-level=error
|
||||
stage_fixed: true
|
||||
ls-lint:
|
||||
run: pnpm exec ls-lint
|
||||
|
Loading…
Reference in New Issue
Block a user