website: fixed typos and update translation (#1407)

This commit is contained in:
igor 2024-03-04 08:16:39 -03:00 committed by GitHub
parent 170cd3f912
commit 217755bb5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 22 additions and 19 deletions

View File

@ -67,13 +67,12 @@ We do not recommend you to modify the system partition directly. You should use
Of course. But KernelSU doesn't have builtin hosts support, you can install [systemless-hosts](https://github.com/symbuzzer/systemless-hosts-KernelSU-module) to do it.
## Why is there a huge 1T file?
## Why is there a huge 1 TB file?
The 1T size `modules.img` is a disk image file, **don't worry about its size**, it's a special type of file known as a [sparse file](https://en.wikipedia.org/wiki/Sparse_file), its actual size is only the size of the module you use, and it will dynamically shrink after you delete the module; it does not actually occupy 1T of disk space (actually your mobile phone may not have that much space).
The 1 TB size `modules.img` is a disk image file, **don't worry about its size**, it's a special type of file known as a [sparse file](https://en.wikipedia.org/wiki/Sparse_file), its actual size is only the size of the module you use, and it will dynamically shrink after you delete the module; it does not actually occupy 1 TB of disk space (actually your mobile phone may not have that much space).
If you're really unhappy with the size of this file, you can use the `resize2fs -M` command to make it the actual size; but the module may not work properly at this time, and we won't provide any support for this.
## Why does my device show wrong storage size?
Certain devices use non-standard methods for calculating device's storage size, potentially leading to inaccurate storage calculations in system apps and menus, especially when dealing with 1TB sparse files. While this problem seems to be specific to Samsung devices, affecting only Samsung apps and services, it's essential to note that the discrepancy is primarily in the total storage size, and the free space calculation remains accurate.
Certain devices use non-standard methods for calculating device's storage size, potentially leading to inaccurate storage calculations in system apps and menus, especially when dealing with 1 TB sparse files. While this problem seems to be specific to Samsung devices, affecting only Samsung apps and services, it's essential to note that the discrepancy is primarily in the total storage size, and the free space calculation remains accurate.

View File

@ -30,7 +30,7 @@ KernelSU provides a JavaScript library and [publishes it on npm](https://www.npm
For example, you can execute a shell command to obtain a specific configuration or modify a property:
```javascript
```JavaScript
import { exec } from 'kernelsu';
const { errno, stdout } = exec("getprop ro.product.model");

View File

@ -6,7 +6,7 @@ KernelSU のモジュールは、ブートスクリプトの実行やシステ
## webroot ディレクトリ
Web リソースファイルは、モジュールのルートディレクトリの webroot サブディレクトリに置かれるべきであり、index.html という名前のファイルが必ず存在しなければなりません。これがモジュールページのエントリです。Web インターフェイスを含む最もシンプルなモジュール構造は以下の通りです:
Web リソースファイルは、モジュールのルートディレクトリの `webroot` サブディレクトリに置かれるべきであり、`index.html` という名前のファイルが必ず存在しなければなりません。これがモジュールページのエントリです。Web インターフェイスを含む最もシンプルなモジュール構造は以下の通りです:
```txt
tree .
@ -22,15 +22,15 @@ Web リソースファイルは、モジュールのルートディレクトリ
ページに css や JavaScript が含まれている場合は、このディレクトリに配置する必要があります。
## Javascript API
## JavaScript API
単なる表示ページであれば、通常の Web ページとの違いはありません。より重要なのは、KernelSU がモジュールの固有機能を実装させるための一連のシステム API を提供することです。
KernelSU は Javascript ライブラリを提供し、[npm で公開しています](https://www.npmjs.com/package/kernelsu)。これを Web ページの JavaScript コードで使用することができます。
KernelSU は JavaScript ライブラリを提供し、[npm で公開しています](https://www.npmjs.com/package/kernelsu)。これを Web ページの JavaScript コードで使用することができます。
たとえば、特定の設定を取得したり、プロパティを変更するために、シェルコマンドを実行することができます:
```javascript
```JavaScript
import { exec } from 'kernelsu';
const { errno, stdout } = exec("getprop ro.product.model");
@ -44,5 +44,5 @@ const { errno, stdout } = exec("getprop ro.product.model");
## いくつかのヒント
1. localStorage を通常通りに使用してデータを保存することができますが、Manager アプリをアンインストールした後には失われます。永続的に保存する必要がある場合は、自分でいくつかのディレクトリにデータを書き込むことができます。
1. `localStorage` を通常通りに使用してデータを保存することができますが、Manager アプリをアンインストールした後には失われます。永続的に保存する必要がある場合は、自分でいくつかのディレクトリにデータを書き込むことができます。
2. シンプルなページには、[parceljs](https://parceljs.org/)を使用することをお勧めします。設定が不要で非常に便利です。しかし、フロントエンドの達人である場合や、自分の好みがある場合は、気に入ったものを選んでください!

View File

@ -67,8 +67,12 @@ Não recomendamos que você modifique a partição do sistema diretamente. Você
Claro. Mas o KernelSU não tem suporte a hosts integrados, você pode instalar [systemless-hosts](https://github.com/symbuzzer/systemless-hosts-KernelSU-module) para fazer isso.
## Por que existe um enorme arquivo de 1T?
## Por que existe um enorme arquivo de 1 TB?
O arquivo `modules.img` de 1T é um arquivo de imagem de disco, **não se preocupe com seu tamanho**, é um tipo especial de arquivo conhecido como [arquivo esparso](https://en.wikipedia.org/wiki/Sparse_file), seu tamanho real é apenas o tamanho do módulo que você usa e diminuirá dinamicamente após você excluir o módulo. Na verdade, ele não ocupa 1T de espaço em disco (na verdade, seu celular pode não ter tanto espaço).
O arquivo `modules.img` de 1 TB é um arquivo de imagem de disco, **não se preocupe com seu tamanho**, é um tipo especial de arquivo conhecido como [arquivo esparso](https://en.wikipedia.org/wiki/Sparse_file), seu tamanho real é apenas o tamanho do módulo que você usa e diminuirá dinamicamente após você excluir o módulo. Na verdade, ele não ocupa 1 TB de espaço em disco (na verdade, seu celular pode não ter tanto espaço).
Se você estiver realmente insatisfeito com o tamanho deste arquivo, você pode usar o comando `resize2fs -M` para torná-lo seu tamanho real, mas o módulo pode não funcionar corretamente neste momento e não forneceremos nenhum suporte para isso.
## Por que meu dispositivo mostra o tamanho do armazenamento errado?
Certos dispositivos usam métodos não padrão para calcular o tamanho do armazenamento do dispositivo, potencialmente levando a cálculos de armazenamento imprecisos em apps e menus do sistema, especialmente ao lidar com arquivos esparsos de 1 TB. Embora esse problema pareça ser específico para os dispositivos Samsung, afetando apenas apps e serviços da Samsung, é essencial observar que a discrepância está principalmente no tamanho total do armazenamento, e o cálculo do espaço livre permanece preciso.

View File

@ -30,7 +30,7 @@ KernelSU fornece uma biblioteca JavaScript e [publica-a no npm](https://www.npmj
Por exemplo, você pode executar um comando shell para obter uma configuração específica ou modificar uma propriedade:
```javascript
```JavaScript
import { exec } from 'kernelsu';
const { errno, stdout } = exec("getprop ro.product.model");

View File

@ -67,8 +67,8 @@ GKI1 跟 GKI2 完全是两个东西,所以你需要自行编译内核。
当然可以。但这个功能 KernelSU 没有内置,你可以安装这个 [systemless-hosts](https://github.com/symbuzzer/systemless-hosts-KernelSU-module)
## 为什么有个 1T 的超大文件?
## 为什么有个 1 TB 的超大文件?
1T 大小的 `modules.img` 是一个磁盘镜像文件,**不要担心它的大小**,它是一种被称之为[稀疏文件](https://en.wikipedia.org/wiki/Sparse_file)的文件格式,它的实际大小只有你使用的模块的大小,并且你在删除模块后它会动态缩小;它并不实际占用 1T 大小的磁盘空间(实际上你手机可能并没有这么多空间)。
1 TB 大小的 `modules.img` 是一个磁盘镜像文件,**不要担心它的大小**,它是一种被称之为[稀疏文件](https://en.wikipedia.org/wiki/Sparse_file)的文件格式,它的实际大小只有你使用的模块的大小,并且你在删除模块后它会动态缩小;它并不实际占用 1 TB 大小的磁盘空间(实际上你手机可能并没有这么多空间)。
如果你真的对这个文件的大小感到不爽,你可以使用 `resize2fs -M` 命令让它变成实际大小;但此时模块可能无法正常工作,我们也不会为此提供任何支持。

View File

@ -2,7 +2,7 @@
KernelSU 的模块除了执行启动脚本和修改系统文件之外,还支持显示 UI 界面和与用户交互。
你可以通过任何 Web 技术编写 HTML + CSS + Javascript 页面KernelSU 的管理器将通过WebView 显示这些页面。此外KernelSU 还提供了一些用于与系统交互的 Javascript API例如执行shell命令。
你可以通过任何 Web 技术编写 HTML + CSS + JavaScript 页面KernelSU 的管理器将通过WebView 显示这些页面。此外KernelSU 还提供了一些用于与系统交互的 JavaScript API例如执行shell命令。
## WebUI 根目录
@ -20,17 +20,17 @@ Web 资源文件应放置在模块根目录的 `webroot` 子目录中,并且
安装模块时KernelSU 会自动设置 `webroot` 目录的权限和 SELinux context如果您不知道自己在做什么请不要自行设置该目录的权限
:::
如果您的页面包含 css 和 javascript您也需要将其放入此目录中。
如果您的页面包含 CSS 和 JavaScript您也需要将其放入此目录中。
## JavaScript API
如果只是一个显示页面那它和普通网页没有什么区别。更重要的是KernelSU 提供了一系列的系统API可以让您实现模块特有的功能。
KernelSU 提供了一个 Javascript 库并[在 npm 上发布](https://www.npmjs.com/package/kernelsu),您可以在网页的 javascript 代码中使用它。
KernelSU 提供了一个 JavaScript 库并[在 npm 上发布](https://www.npmjs.com/package/kernelsu),您可以在网页的 JavaScript 代码中使用它。
例如,您可以执行 shell 命令来获取特定配置或修改属性:
```javascript
```JavaScript
import { exec } from 'kernelsu';
const { errno, stdout } = await exec("getprop ro.product.model");