mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-14 19:29:36 +01:00
Add dative case function to loc manager (#5510)
* dative * slipped it * slipped it twice
This commit is contained in:
@@ -20,6 +20,15 @@ zzzz-object-pronoun = { GENDER($ent) ->
|
||||
*[neuter] it
|
||||
}
|
||||
|
||||
# Used internally by the DAT-OBJ() function.
|
||||
# Not used in en-US. Created for supporting other languages.
|
||||
zzzz-dat-object = { GENDER($ent) ->
|
||||
[male] him
|
||||
[female] her
|
||||
[epicene] them
|
||||
*[neuter] it
|
||||
}
|
||||
|
||||
# Used internally by the POSS-PRONOUN() function.
|
||||
zzzz-possessive-pronoun = { GENDER($ent) ->
|
||||
[male] his
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace Robust.Shared.Localization
|
||||
AddCtxFunction(bundle, "GENDER", FuncGender);
|
||||
AddCtxFunction(bundle, "SUBJECT", FuncSubject);
|
||||
AddCtxFunction(bundle, "OBJECT", FuncObject);
|
||||
AddCtxFunction(bundle, "DAT-OBJ", FuncDatObj);
|
||||
AddCtxFunction(bundle, "POSS-ADJ", FuncPossAdj);
|
||||
AddCtxFunction(bundle, "POSS-PRONOUN", FuncPossPronoun);
|
||||
AddCtxFunction(bundle, "REFLEXIVE", FuncReflexive);
|
||||
@@ -203,6 +204,16 @@ namespace Robust.Shared.Localization
|
||||
return new LocValueString(GetString("zzzz-object-pronoun", ("ent", args.Args[0])));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the dative form pronoun for the entity's gender.
|
||||
/// This method is intended for languages with a dative case, where indirect objects
|
||||
/// (e.g., "to him," "for her") require specific forms. Not applicable for en-US locale.
|
||||
/// </summary>
|
||||
private ILocValue FuncDatObj(LocArgs args)
|
||||
{
|
||||
return new LocValueString(GetString("zzzz-dat-object", ("ent", args.Args[0])));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the respective possessive adjective (his, her, their, its) for the entity's gender.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user