Interkarma / daggerfall-unity

Open source recreation of Daggerfall in the Unity engine
http://www.dfworkshop.net
MIT License
2.67k stars 326 forks source link

Add %pg4 for missing pronoun His/Hers #2645

Open Jagget opened 3 months ago

Jagget commented 3 months ago

This is part for player-realted pronoun. Other languages need that part. Didn't address this in commit 83ce86660e39021e4682c0b8ff5ca730efa4b266 His/Her is represented by %pg3, but there was no equivalent for His/Hers. This is now represented by %pg4. "pronounHers" text already available in localization tables.

KABoissonneault commented 3 months ago

Change seems good.

I'm wondering, doesn't the fact that DFU reuses the same localization key in different situations an issue in certain languages? For example, %g2 is him/her, and %g3 is his/her, and it uses the key "pronounHer" for both, which means a language has to translate the feminine of both %g2 and %g3 with the same word, which works in English, but I'm not sure it's universal. Same thing for %g3 his and %g4 his.

I'm wonder if we should just duplicate these entries into two different keys, so languages where they differ can do that. Either just put a number at the end and let the localizer figure it out, or go fancier with pronounHisPossessivePronoun vs pronounHisPossessiveDeterminer

Jagget commented 3 months ago

Yes, that fact that DFU didn't use pronounHers was a drawback, that why IK add %g4 by my request. And I just recently realized that I need %pg4 as well.

With go fancier approach we might get too fancy. For example I need 7 forms of she and 8 forms of he for Russian 😄

она её неё ей ней ею нею
он его ему им него нему ним нём
KABoissonneault commented 3 months ago

Well we can't invent new context that DFU doesn't provide. I'm thinking that since DFU already distinguishes this context, we should provide two different hooks for localization, that's really not too hard. We could even have a fallback so that if a language does not implement pronounHis2, it falls back to pronounHis. Hopefully it's better than what we have now.

Just a suggestion.

Daneel53 commented 1 month ago

I agree that %pg4 should be added besides %g4, but we must go further to be able to use it properly in other languages that English. If we consider that the proposal is accepted, we will arrive to a situation where the English pronouns "his" and "her" shall be used twice in two different macros: %pg2 and %pg3 for "her", and %g3 and %g4 for "his", with only six possible translation strings in Internal_Strings.csv.

Pronouns and macros_2024-06-19_14-31-05

I propose to introduce two new pronoun definitions, pronounHer2 and pronounHis2 following the new definition given in the snapshot, and to add the two new definition into Internal_Strings.csv.

As you can see, this will change nothing for English that will keep on using "his" and "her" where needed, but this shall permit, for all languages other than English that need it, to give different values for each macro %gx and %pgx.

Jagget commented 1 week ago

@Daneel53 Updated the PR. Added pronounHis2/pronounHer2

ivankuzyk commented 3 days ago

Hi all! I have one question - is it possible to add additional macros in the Dagerfall localization, for example: %g5 %g6 %g7 %g8 %g9?

KABoissonneault commented 3 days ago

You can open an issue if you want to open this discussion. Adding new macros is easy enough, but you'd have to define when to use each and what the expected output should be

ivankuzyk commented 3 days ago

I want to make a Ukrainian localization of the game and I came across this problem with macros, here's an example: він/вона - %g1,%g йому/їй - %g2 його/її - %g4 ним/нею - %g2self нього/неї - ???? Is it at least possible to introduce the %g5 macro?

Jagget commented 3 days ago

I noticed that you don't use g3. Granted, in the current state, g3 is partially equal to g2 and g4, but after this PR is merged, you'll be able to make all 4 macros unique. This will give you 4 different variants. You can also use prefixes and postfixes with macros, which also increases versatility.

Adding a new macro is easy, yes, but needs to be justified for widespread use, I think.

ivankuzyk commented 2 days ago

The %g3 macro is broken for both Russian and Ukrainian localizations, you yourself once pleaded on the Interkarma forum to add a %g4 macro to replace %g3. I propose to add a few additional macros (%g5 %g6 %g7 %g8 %g9) with the possibility to localize them in their own way, and then, I think, everyone will take the right number of macros for their localization. I need at least %g5 for the Ukrainian localization so that I can add (нього/неї), but it's not a given that maybe in a month or six months someone else won't write to you with a similar problem and ask you to add more macros, so I suggest making them with a reserve. If it is possible.

KABoissonneault commented 2 days ago

I did ask you to explain what these new macros would do, concretely. %pg4 does his/hers, and is used where possessive pronouns are needed. That makes sense in all languages, even in languages where those pronouns aren't distinguished (they can just reuse an existing string). Would it only be used in Russian/Ukrainian text, so only interpreted while running those languages? If so, I think we should make it so localization mods can add macro handlers themselves. No sense pushing macros to the base game if we can't even explain what they're used for

Jagget commented 2 days ago

So you're saing, that you need 4 different macros. g1, g2, g4, and g5, but you don't need g5!

I just told you that after this PR is merged, you'll be able to set g3 in a proper way. So you'll get your 4 unique macros, it'll be g1, g2, g3, and g4.

ivankuzyk commented 2 days ago

То есть вы говорите, что вам нужны 4 разных макроса. g1, g2, g4 и g5, но вам не нужен g5!

Я только что сказал вам, что после объединения этого PR вы сможете правильно настроить g3 . Таким образом, вы получите 4 уникальных макроса, это будут g1, g2, g3 и g4. How can this be done?

Jagget commented 2 days ago

image

ivankuzyk commented 2 days ago

Interesting, so you're saying we can do it like this: він/вона - %g1,%g йому/їй - %g2 його/її - %g4 ним/нею - %g2self нього/неї - %g3

Then in which file can I localize %g3 to use it?

Jagget commented 2 days ago

The same file. Add pronounHer2 and pronounHis2 next to pronounHer and pronounHis

ivankuzyk commented 2 days ago

I tried it, it doesn't work. From the macro "%g3", the game displays the localization with the string "pronounHer"

KABoissonneault commented 2 days ago

Can you discuss this somewhere else? I don't think this PR should add more