mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-04-07 14:06:16 +08:00
[i18n] changed the instruction
This commit is contained in:
51
translation/help/Readme.md
Normal file
51
translation/help/Readme.md
Normal file
@ -0,0 +1,51 @@
|
||||
# Sprite Image Build Script Requirements
|
||||
|
||||
To run the sprite image build script, Python version 3.6 or higher is required.
|
||||
|
||||
# Adding an Image Common to All Languages
|
||||
|
||||
1. Open the folder:
|
||||
- `web-apps/apps/common/main/resources/help/images/src` if the image is used in at least two editors,
|
||||
- or `web-apps/apps/{editor}/main/resources/help/images/src` if the image is used in only one editor:
|
||||
* Place images for button or icon in the `icons` folder. The image name will correspond to the CSS selector name.
|
||||
* Place larger images in the `big` folder.
|
||||
* Place symbols in the `symbols` folder.
|
||||
|
||||
2. Launch the terminal (command line).
|
||||
|
||||
3. Navigate to the `web-apps/translation/help` folder using the command: `cd path_to_folder`
|
||||
- **NOTE!** [For Windows] If the folder is not on the C drive, switch to another drive using the command `cd Drive_Letter:` and then press `Enter` (e.g., `cd F:`).
|
||||
|
||||
4. Run the script with the command: `python helpsprite.py`
|
||||
|
||||
- If the command returns an error `ModuleNotFoundError: No module named 'PIL'`, execute the following in the terminal:
|
||||
- For Windows: `python -m pip install Pillow`
|
||||
- For other OS: `python pip install Pillow`
|
||||
|
||||
- If the error `ImportError: cannot import name '_imaging' from 'PIL'...` occurs, execute:
|
||||
- For Windows:
|
||||
```bash
|
||||
python -m pip uninstall Pillow
|
||||
python -m pip install Pillow
|
||||
```
|
||||
- For other OS:
|
||||
```bash
|
||||
python pip uninstall Pillow
|
||||
python pip install Pillow
|
||||
```
|
||||
|
||||
5. Example of Using an Image from the Sprite
|
||||
To add an image to the page text, insert:
|
||||
- For images from the `icons` folder:
|
||||
```html
|
||||
<div class="icon icon-file_name_without_extension"></div>
|
||||
```
|
||||
- For images from the `big` folder:
|
||||
```html
|
||||
<div class="big big-file_name_without_extension"></div>
|
||||
```
|
||||
- For images from the `symbols` folder:
|
||||
```html
|
||||
<div class="smb smb-file_name_without_extension"></div>
|
||||
```
|
||||
```
|
||||
@ -1,37 +0,0 @@
|
||||
Для работы скрипта сборки спрайта картинок нужен python версии 3.6+
|
||||
|
||||
Для добавления картинки общей для всех языков
|
||||
1. Откройте папку web-apps/apps/common/main/resources/help/images/src, если картинка используется как минимум в двух редакторах
|
||||
или web-apps/apps/{редактор}/main/resources/help/images/src, если картинка используется только в одном редакторе:
|
||||
a) изображение кнопки или иконки положите в папку"icons". название картинки будет соответствовать названию селектора для css;
|
||||
b) более крупное изображение положите в папку "big";
|
||||
c) символ в папку "symbols".
|
||||
|
||||
2. Запустите терминал(командную строку)
|
||||
|
||||
3. Передите в папку web-apps/translation/help c помощью команды: cd путь_к_папке
|
||||
(ВНИМАНИЕ! [для windows] ecли папка лежит не на дике С, перейти на другой диск можно комадой "cd Буква_диска:" после нажать "enter" ([Пример:] cd F:))
|
||||
|
||||
4. Запустить скрипт командой: python helpsprite.py
|
||||
|
||||
если команда выдаст ошибку "ModuleNotFoundError: No module named 'PIL'", нужно выполнить в терминале
|
||||
для windows: python -m pip install Pillow
|
||||
для остальных os: python pip install Pillow
|
||||
|
||||
если при выполнении появилась ошибка "ImportError: cannot import name '_imaging' from 'PIL'....", нужно выполнить
|
||||
для windows:
|
||||
python -m pip uninstall Pillow
|
||||
python -m pip install Pillow
|
||||
|
||||
для остальных os:
|
||||
python pip uninstall Pillow
|
||||
python pip install Pillow
|
||||
|
||||
5. Пример использования картинки из спрайта
|
||||
Чтобы добавить картинку в текст страницы нужно вставить:
|
||||
a) Для изображений из папки icons:
|
||||
<div class="icon icon-имя_файла_без_расширения"></div>
|
||||
b) Для изображений из папки big:
|
||||
<div class="big big-имя_файла_без_расширения"></div>
|
||||
c) Для изображений из папки big:
|
||||
<div class="smb smb-имя_файла_без_расширения"></div>
|
||||
@ -1,37 +0,0 @@
|
||||
Для работы скрипта сборки спрайта картинок нужен python версии 3.6+
|
||||
|
||||
Для добавления картинки общей для всех языков
|
||||
1. Откройте папку web-apps/apps/common/main/resources/help/images/src, если картинка используется как минимум в двух редакторах
|
||||
или web-apps/apps/{редактор}/main/resources/help/images/src, если картинка используется только в одном редакторе:
|
||||
a) изображение кнопки или иконки положите в папку"icons". название картинки будет соответствовать названию селектора для css;
|
||||
b) более крупное изображение положите в папку "big";
|
||||
c) символ в папку "symbols".
|
||||
|
||||
2. Запустите терминал(командную строку)
|
||||
|
||||
3. Передите в папку web-apps/translation/help c помощью команды: cd путь_к_папке
|
||||
(ВНИМАНИЕ! [для windows] ecли папка лежит не на дике С, перейти на другой диск можно комадой "cd Буква_диска:" после нажать "enter" ([Пример:] cd F:))
|
||||
|
||||
4. Запустить скрипт командой: python helpsprite.py
|
||||
|
||||
если команда выдаст ошибку "ModuleNotFoundError: No module named 'PIL'", нужно выполнить в терминале
|
||||
для windows: python -m pip install Pillow
|
||||
для остальных os: python pip install Pillow
|
||||
|
||||
если при выполнении появилась ошибка "ImportError: cannot import name '_imaging' from 'PIL'....", нужно выполнить
|
||||
для windows:
|
||||
python -m pip uninstall Pillow
|
||||
python -m pip install Pillow
|
||||
|
||||
для остальных os:
|
||||
python pip uninstall Pillow
|
||||
python pip install Pillow
|
||||
|
||||
5. Пример использования картинки из спрайта
|
||||
Чтобы добавить картинку в текст страницы нужно вставить:
|
||||
a) Для изображений из папки icons:
|
||||
<div class="icon icon-имя_файла_без_расширения"></div>
|
||||
b) Для изображений из папки big:
|
||||
<div class="big big-имя_файла_без_расширения"></div>
|
||||
c) Для изображений из папки big:
|
||||
<div class="smb smb-имя_файла_без_расширения"></div>
|
||||
Reference in New Issue
Block a user