forked from ParadiseSS13/Paradise
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update translate from tg again (#1633)
<!-- Пишите **НИЖЕ** заголовков и **ВЫШЕ** комментариев, иначе что то может пойти не так. --> <!-- Вы можете прочитать Contributing.MD, если хотите узнать больше. --> ## Что этот PR делает <!-- Вкратце опишите изменения, которые вносите. --> <!-- Опишите **все** изменения, так как противное может сказаться на рассмотрении этого PR'а! --> <!-- Если вы исправляете Issue, добавьте "Fixes #xxxx" (где xxxx - номер Issue) где-нибудь в описании PR'а. Это автоматически закроет Issue после принятия PR'а. --> С ТГ портируем поддержку переводов из toml
- Loading branch information
Showing
11 changed files
with
2,030 additions
and
792 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
GLOBAL_LIST_EMPTY(ru_attack_verbs) | ||
GLOBAL_LIST_EMPTY(ru_eat_verbs) | ||
GLOBAL_LIST_EMPTY(ru_say_verbs) | ||
|
||
/datum/modpack/translations | ||
name = "Переводы" | ||
desc = "Добавляет переводы" | ||
author = "Vallat, Larentoun, dj-34" | ||
|
||
/datum/modpack/translations/post_initialize() | ||
var/toml_path = "[PATH_TO_TRANSLATE_DATA]/ru_verbs.toml" | ||
if(!fexists(file(toml_path))) | ||
return | ||
var/list/verbs_toml_list = rustg_read_toml_file(toml_path) | ||
|
||
var/list/attack_verbs = verbs_toml_list["attack_verbs"] | ||
for(var/attack_key in attack_verbs) | ||
GLOB.ru_attack_verbs += list("[attack_key]" = attack_verbs[attack_key]) | ||
|
||
var/list/eat_verbs = verbs_toml_list["eat_verbs"] | ||
for(var/eat_key in eat_verbs) | ||
GLOB.ru_eat_verbs += list("[eat_key]" = eat_verbs[eat_key]) | ||
|
||
var/list/say_verbs = verbs_toml_list["say_verbs"] | ||
for(var/say_key in say_verbs) | ||
GLOB.ru_say_verbs += list("[say_key]" = say_verbs[say_key]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
// Все изменения следует дублировать на ТГ и наоборот. | ||
|
||
#include "_translations.dm" | ||
|
||
#include "code/defines.dm" | ||
|
||
#include "_translations.dm" | ||
|
||
#include "code/pronouns.dm" | ||
#include "code/translate_attack_verb.dm" | ||
#include "code/translate_eat_verb.dm" | ||
#include "code/translate_say.dm" | ||
#include "code/translate_verbs.dm" | ||
#include "code/ru_names/ru_name_base.dm" | ||
|
||
#include "code/~undefs.dm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
#define RU_NAMES_LENGTH 7 // 6 падежей, 1 base | ||
#define PATH_TO_TRANSLATE_DATA "modular_ss220/translations/code/translate_data" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.