forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ss220-master' into merge-upstream
- Loading branch information
Showing
12 changed files
with
198 additions
and
74 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
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
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 @@ | ||
#define PATH_TO_TRANSLATE_DATA "modular_bandastation/translations/code/data" | ||
#define PATH_TO_TRANSLATE_DATA "modular_bandastation/translations/code/translation_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
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
22 changes: 14 additions & 8 deletions
22
modular_bandastation/translations/code/ru_names/ru_name_materials.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,9 +1,15 @@ | ||
/datum/material/declent_ru(case_id, list/ru_names_override) | ||
/datum/material | ||
/// List consists of ("name", "именительный", "родительный", "дательный", "винительный", "творительный", "предложный", "gender") | ||
var/list/ru_names | ||
|
||
/datum/material/New() | ||
. = ..() | ||
ru_names = ru_names_toml(name) | ||
|
||
/datum/material/declent_ru(declent) | ||
. = name | ||
if(!ispath(sheet_type)) | ||
CRASH("Sheet type couldn't be declented because it's not a path!") | ||
var/atom/sheet = sheet_type | ||
var/list/list_to_use = ru_names_override || ru_names_toml(name) || ru_names_toml(sheet::name) | ||
if(length(list_to_use) && list_to_use["base"] == name && list_to_use[case_id]) | ||
return list_to_use[case_id] | ||
return name | ||
if(declent == "gender") | ||
. = NEUTER | ||
if(!length(ru_names) || ru_names["base"] != name) | ||
return . | ||
return get_declented_value(ru_names, declent, .) |
16 changes: 9 additions & 7 deletions
16
modular_bandastation/translations/code/ru_names/ru_name_orderables.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,17 +1,19 @@ | ||
/datum/orderable_item | ||
var/use_translate = TRUE | ||
/// List consists of ("name", "именительный", "родительный", "дательный", "винительный", "творительный", "предложный", "gender") | ||
var/list/ru_names | ||
|
||
/datum/orderable_item/New() | ||
. = ..() | ||
ru_names = ru_names_toml(purchase_path::name) | ||
if(!use_translate) | ||
return | ||
name = capitalize(declent_ru(NOMINATIVE)) | ||
|
||
/datum/orderable_item/declent_ru(case_id, list/ru_names_override) | ||
/datum/orderable_item/declent_ru(declent) | ||
. = name | ||
if(!ispath(purchase_path)) | ||
CRASH("Purchase type couldn't be declented because it's not a path!") | ||
var/list/list_to_use = ru_names_override || ru_names_toml(purchase_path::name) | ||
if(length(list_to_use) && list_to_use["base"] == name && list_to_use[case_id]) | ||
return list_to_use[case_id] | ||
return name | ||
if(declent == "gender") | ||
. = NEUTER | ||
if(!length(ru_names)) | ||
return . | ||
return get_declented_value(ru_names, declent, .) |
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
File renamed without changes.
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
2 changes: 2 additions & 0 deletions
2
modular_bandastation/translations/code/translation_data/ru_reagents.toml
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
["reagents_desc"] | ||
#"Oxygen" = "Описание кислорода" |
File renamed without changes.