Skip to content

Comments

Refactor gender localization with support for customizable pronouns#6182

Open
mqole wants to merge 20 commits intospace-wizards:masterfrom
mqole:robust-pronouns-2
Open

Refactor gender localization with support for customizable pronouns#6182
mqole wants to merge 20 commits intospace-wizards:masterfrom
mqole:robust-pronouns-2

Conversation

@mqole
Copy link

@mqole mqole commented Sep 4, 2025

required for space-wizards/space-station-14#40104

Adds a new prototype, PronounTensePrototype, which is used to dynamically generate FTL functions. Moved all existing pronoun tenses to this format. This means that grammar is no longer hardcoded, and users seeking to localize in languages with more grammatical tenses than RT defines can add their own grammatical tenses in yml and ftl.

FTL functions are regenerated when prototypes are refreshed. They must be generated AFTER prototypes are initialized so they cannot be in the locManager init.

GrammarComponent now contains a dictionary which can store non-standard pronouns for an entity for each grammatical tense. If a tense is called in FTL which a pronoun exists for, that pronoun will be used. Otherwise it will default to the enum gender of the entity.

@mqole
Copy link
Author

mqole commented Sep 4, 2025

those test fails are really scary. i'm not sure how to address them.

@iaada
Copy link
Member

iaada commented Sep 4, 2025

TestAllServerPrototypesAreSerializable and TestAllClientPrototypesAreSerializable seems to be consistently failing due to xenoborg actions on all robust PRs, so ignoring those all tests pass.

@iaada iaada added T: New Feature Type: New feature Priority: 3-Not Required S: Requires Content PR This PR breaks content and requires both to be merged together. S: Needs Review This PR needs to be reviewed before it can be merged. A: Localization labels Sep 4, 2025
@VoidMeticulous

This comment was marked as abuse.

@PJB3005
Copy link
Member

PJB3005 commented Sep 5, 2025

@VoidMeticulous You have been permanently banned from GitHub.

  1. Stop being a knee-jerk bigot
  2. Don't go to an unrelated PR just to bitch when the other two PRs were clearly locked for good reason. In fact the very thing you are suggesting instead is not possible without this PR you are complaining on.
  3. Don't harass contributors
  4. If there are issues with the code complexity, this is something maintainers should decide

@serbianshitsec

This comment was marked as abuse.

@mqole mqole marked this pull request as draft September 19, 2025 04:19
@mqole mqole marked this pull request as ready for review September 22, 2025 06:19
@mqole
Copy link
Author

mqole commented Sep 22, 2025

still need to test things on the content / db side, but optimistic given that migrations built ok. opening this up to review again in the meantime just to make sure i havent royally fucked it

edit: nvm i freeking hate unit test. not sure how to fix that one.

@mqole mqole requested a review from PJB3005 September 22, 2025 06:20
@arimah
Copy link
Contributor

arimah commented Feb 12, 2026

I'm going to be a real stickler for terminology here, please forgive me. This is in the interest of keeping the code comprehensible and correct, so that it communicates the correct intention :)

  • tense deals with how a verb relates to time: past, present, future, non-past, or whatever the language has.
  • pronouns do not typically have a tense, hence pronounTense makes little sense.
  • conjugation is specifically all the forms a verb takes. A pronoun cannot conjugate (usually).
  • Similarly, though I haven't seen the word used here, declension is for nouns and other noun-like things.
  • Grammatical case is what we call the I/me/my, he/him/his, they/them/their forms. Case encodes the role of a noun phrase within its clause (subject, object, etc.).
  • The most neutral term for "grammatical word change" is inflection.

Examples:

He is a young reptilian.
They are a young reptilian.

The change in verb form here is called personal conjugation. The FTL function CONJUGATE-BE() is correctly named.

You inject the syringe into her.
You inject the syringe into them.

The choice of her/them involves finding the right case. For English, it's the oblique case. In German, it might be accusative or dative, depending on how one phrases "inject into X".

You feel sick.
You felt sick.

This is a change in tense. :)

I think it would be more appropriate to call it pronounInflection, or perhaps even more generically pronounGrammar. Moreover, I would encourage you to ensure comments use appropriate terminology for the task they're trying to accomplish: don't say you're conjugating a pronoun! :D I haven't looked deeply at the code yet and can't comment more beyond semantic nitpickery at this time.

@mqole
Copy link
Author

mqole commented Feb 14, 2026

@arimah no need for forgiveness, i appreciate the nitpicks immensely!! i'm definitely not a grammar freak so i do sincerely thank you for the clarification. i'll give all the comments and documentation a tidying with your feedback in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A: Localization Priority: 3-Not Required S: Needs Review This PR needs to be reviewed before it can be merged. S: Requires Content PR This PR breaks content and requires both to be merged together. T: New Feature Type: New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants