genetive case (#6045)

* dative

* slipped it

* slipped it twice

* 1

* Update _engine_lib.ftl
This commit is contained in:
lzk
2025-06-23 22:47:50 +02:00
committed by GitHub
parent da0abd2535
commit e170bf1ad2
2 changed files with 22 additions and 1 deletions

View File

@@ -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

View File

@@ -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])));
}
/// <summary>
/// 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])));
}
/// <summary>
/// Returns the respective possessive adjective (his, her, their, its) for the entity's gender.
/// </summary>