docs: Update cn trans and provide proper indentation for 2 files

This commit is contained in:
Zhang Shuxian
2024-07-12 15:36:07 +08:00
parent c61c3ac32d
commit 348d834f97
4 changed files with 25 additions and 21 deletions

View File

@@ -6,7 +6,7 @@ Install Pre-commit Hook for ESP-IDF Project
Install ``pre-commit``
----------------------
Run ``pip install pre-commit``
Run ``pip install pre-commit``.
Install ``pre-commit`` Hook
---------------------------
@@ -20,10 +20,10 @@ Install ``pre-commit`` Hook
Uninstall ``pre-commit`` Hook
-----------------------------
Run ``pre-commit uninstall``
Run ``pre-commit uninstall``.
What Is More?
-------------
Related Documents
-------------------
For detailed usage, please refer to the documentation of pre-commit_.
@@ -34,17 +34,17 @@ Common Problems For Windows Users
``/usr/bin/env: python: Permission denied.``
If you are in Git Bash, please check the python executable location by run ``which python``.
If you are in Git Bash, please check the python executable location by run ``which python``.
If the executable is under ``~/AppData/Local/Microsoft/WindowsApps/``, then it is a link to Windows AppStore, not a real one.
If the executable is under ``~/AppData/Local/Microsoft/WindowsApps/``, then it is a link to Windows AppStore, not a real one.
Please install Python manually and update this in your ``PATH`` environment variable.
Please install Python manually and update this in your ``PATH`` environment variable.
Your ``USERPROFILE`` contains non-ASCII characters
``pre-commit`` may fail when initializing an environment for a particular hook when the path of ``pre-commit``'s cache contains non-ASCII characters. The solution is to set ``PRE_COMMIT_HOME`` to a path containing only standard characters before running pre-commit.
``pre-commit`` may fail when initializing an environment for a particular hook when the path of ``pre-commit``'s cache contains non-ASCII characters. The solution is to set ``PRE_COMMIT_HOME`` to a path containing only standard characters before running pre-commit.
- CMD: ``set PRE_COMMIT_HOME=C:\somepath\pre-commit``
- PowerShell: ``$Env:PRE_COMMIT_HOME = "C:\somepath\pre-commit"``
- git bash: ``export PRE_COMMIT_HOME="/c/somepath/pre-commit"``
- CMD: ``set PRE_COMMIT_HOME=C:\somepath\pre-commit``
- PowerShell: ``$Env:PRE_COMMIT_HOME = "C:\somepath\pre-commit"``
- git bash: ``export PRE_COMMIT_HOME="/c/somepath/pre-commit"``