diff --git a/Resources/Locale/en-US/_engine_lib.ftl b/Resources/Locale/en-US/_engine_lib.ftl index 2ebba5d6b..d2db725c5 100644 --- a/Resources/Locale/en-US/_engine_lib.ftl +++ b/Resources/Locale/en-US/_engine_lib.ftl @@ -21,7 +21,8 @@ zzzz-object-pronoun = { GENDER($ent) -> } # Used internally by the DAT-OBJ() function. -# Not used in en-US. Created for supporting other languages. +# Not used in en-US. Created to support other languages. +# (e.g., "to him," "for her") zzzz-dat-object = { GENDER($ent) -> [male] him [female] her @@ -29,6 +30,16 @@ zzzz-dat-object = { GENDER($ent) -> *[neuter] it } +# Used internally by the GENITIVE() function. +# Not used in en-US. Created to support other languages. +# e.g., "у него" (Russian), "seines Vaters" (German). +zzzz-genitive = { GENDER($ent) -> + [male] his + [female] her + [epicene] their + *[neuter] its + } + # Used internally by the POSS-PRONOUN() function. zzzz-possessive-pronoun = { GENDER($ent) -> [male] his diff --git a/Robust.Shared/Localization/LocalizationManager.Functions.cs b/Robust.Shared/Localization/LocalizationManager.Functions.cs index 816126176..0704f2b34 100644 --- a/Robust.Shared/Localization/LocalizationManager.Functions.cs +++ b/Robust.Shared/Localization/LocalizationManager.Functions.cs @@ -23,6 +23,7 @@ namespace Robust.Shared.Localization AddCtxFunction(bundle, "SUBJECT", FuncSubject); AddCtxFunction(bundle, "OBJECT", FuncObject); AddCtxFunction(bundle, "DAT-OBJ", FuncDatObj); + AddCtxFunction(bundle, "GENITIVE", FuncGenitive); AddCtxFunction(bundle, "POSS-ADJ", FuncPossAdj); AddCtxFunction(bundle, "POSS-PRONOUN", FuncPossPronoun); AddCtxFunction(bundle, "REFLEXIVE", FuncReflexive); @@ -212,6 +213,15 @@ namespace Robust.Shared.Localization return new LocValueString(GetString("zzzz-dat-object", ("ent", args.Args[0]))); } + /// + /// Returns the respective genitive form (pronoun or possessive adjective) for the entity's gender. + /// This is used in languages with a genitive case to indicate possession or related relationships, + /// e.g., "у него" (Russian), "seines Vaters" (German). + private ILocValue FuncGenitive(LocArgs args) + { + return new LocValueString(GetString("zzzz-genitive", ("ent", args.Args[0]))); + } + /// /// Returns the respective possessive adjective (his, her, their, its) for the entity's gender. ///