Add Russian

This commit is contained in:
2023-07-10 23:48:04 +03:00
parent 7472aaf206
commit 3be544eab2
14 changed files with 272 additions and 11 deletions
+45
View File
@@ -0,0 +1,45 @@
{
"": "Basic phases",
"hello": "Hello from KuiToi-Server!",
"config_path": "Use {} for config.",
"init_ok": "Initializing ready.",
"start": "Server started!",
"stop": "Goodbye!",
"": "Server auth",
"auth_need_key": "BEAM key needed for starting the server!",
"auth_empty_key": "Key is empty!",
"auth_cannot_open_browser": "Cannot open browser: {}",
"auth_use_link": "Use this link: {}",
"": "GUI phases",
"GUI_yes": "Yes",
"GUI_no": "No",
"GUI_ok": "Ok",
"GUI_cancel": "Cancel",
"GUI_need_key_message": "BEAM key needed for starting the server!\nDo you need to open the web link to obtain the key?",
"GUI_enter_key_message": "Please type your key:",
"GUI_cannot_open_browser": "Cannot open browser.\nUse this link: {}",
"": "Command: man",
"man_message_man": "man - display the manual page for COMMAND.\nUsage: man COMMAND",
"help_message_man": "Display the manual page for COMMAND.",
"man_for": "Manual for command",
"man_message_not_found": "man: Manual message not found.",
"man_command_not_found": "man: command \"{}\" not found!",
"": "Command: help",
"man_message_help": "help - display names and brief descriptions of available commands.\nUsage: help [--raw]\nThe `help` command displays a list of all available commands along with a brief description of each command.",
"help_message_help": "Display names and brief descriptions of available commands",
"help_command": "Command",
"help_message": "Help message",
"help_message_not_found": "No help message found",
"": "Command: stop",
"man_message_stop": "stop - Just shutting down the server.\nUsage: stop",
"help_message_stop": "Server shutdown.",
"": "Command: exit",
"man_message_exit": "exit - Just shutting down the server.\nUsage: stop",
"help_message_exit": "Server shutdown."
}
View File
+36
View File
@@ -0,0 +1,36 @@
import BEAMP # Import server object
beam = BEAMP("TestPlugin") # Init plugin with name "TestPlugin"
log = beam.log # Use logger from server
def on_load():
# When plugin initialization Server uses plugin.load() to load plugin.
# def load(): is really needed
log.info(beam.name)
# Events handlers
def on_started():
# Simple event handler
log.info("Server starting...")
# Simple event register
beam.register_event("on_started", on_started)
def any_func(data=None):
# Custom event handler
log.info(f"Data from any_func: {data}")
# Create custom event
beam.register_event("my_event", any_func)
# Call custom event
beam.call_event("my_event")
beam.call_event("my_event", "Some data")
# This will be an error since any_func accepts only one argument at the input
beam.call_event("my_event", "Some data", "Some data1")
+32
View File
@@ -0,0 +1,32 @@
# Plugins System
## Install
###### (Lib can't ready to use)
* From pip:\
`$ pip install ...`
* From source:\
`git clone https://github.com/kuitoi/...`
## Example
```python
import BEAMP
beam = BEAMP("TestPlugin")
logger = beam.log
def load(): # Plugins load from here
print(beam.name)
def on_started():
logger.info("Server starting...")
beam.register_event("on_started", on_started)
```
* Basic Events: ['on_started', 'on_auth, 'on_stop']
* Create new event : `beam.register_event("my_event", my_event_function)`
* Call event: `beam.call_event("my_event")`
* Call event with some data: `beam.call_event("my_event", data, data2)`
* Calls _**can't support**_ like this: `beam.call_event("my_event", data=data)`
+8
View File
@@ -0,0 +1,8 @@
# Documentation for KuiToi Server
#### The documentation has not been perfected yet, but one day it will definitely happen
1. Setup and Start server - [here](setup)
2. Plugins and Events system - [here](plugins)
3. MultiLanguage - [here](./multilanguage)
4. Something new
+33
View File
@@ -0,0 +1,33 @@
# Hello from KuiToi Server
## Start
* Need **Python 3.10.x** to start!
* After cloning use this:
```bash
$ python3 --version # Python 3.10.6
$ python3 main.py --help # Show help message
$ python3 main.py # Start server
```
## Setup
* After starting server creating `kuitoi.yaml`; Default:
```yaml
!!python/object:modules.ConfigProvider.config_provider.Config
Auth:
key: null
private: true
Game:
map: gridmap_v2
max_cars: 1
players: 8
Server:
debug: true
description: This server uses KuiToi!
name: KuiToi-Server
server_ip: 0.0.0.0
server_port: 30814
```
* Server can't start without BEAM Auth.key