ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   zo_strformat - lost in translation (https://www.esoui.com/forums/showthread.php?t=8021)

Gandalf 08/23/18 08:21 AM

zo_strformat - lost in translation
 
Heya,

Run into a strange behavior of zo_strformat:

When using:
Code:

/script SetCVar("language.2", "en") or /script SetCVar("language.2", "de")
/script d( zo_strformat("<<1>>","Show me your Face") )

It returns:
Code:

"Show me your Face"
When using:
Code:

/script SetCVar("language.2", "fr")
/script d( zo_strformat("<<1>>","Show me your Face") )

It returns:
Code:

"Show m’your Face"!
Any idea why I get in "French" mode such a highly sophisticated output?

Using good old string.format causes no issues.

Cheers,
Gandalf

Mouton 08/23/18 08:56 AM

Actually i saw this behaviour recently on my plugin.
It seems ZOS translation is including some contraction rules for french language.

"me" in french is a personal pronoun (referring to the subject) that is contracted to "m'" when followed by a vowel. (English ref. http://www.saberfrances.com.ar/gramm...-pronouns.html)

Some rules may even replace part of guild names: I saw on my plugin than the incorrect static french translation
Code:

Vous avez rencontré quelqu'un de <<Le comptoir des artisans>>
("You met somebody from Le comptoir des artisans" - "Le comptoir des artisans" beeing a guild name) was correctly fixed to :
Code:

Vous avez rencontré quelqu'un du <<comptoir des artisans>>
"De le" ("from the" in masculine gender in French) is wrong and replaced by the correct contracted form "du".

I don't know how many grammar rules are implemented.

votan 08/23/18 11:42 AM

Take a look here: http://wiki.esoui.com/How_to_add_localization_support

Baertram 08/23/18 11:53 AM

But shouldn't "Show me your face" just abbreviate the pronoun me if there is a vowel in the next word's beginning?
me your -> me your
me any -> m'any

Mouton 08/23/18 01:08 PM

Quote:

Originally Posted by Baertram (Post 35790)
But shouldn't "Show me your face" just abbreviate the pronoun me if there is a vowel in the next word's beginning?
me your -> me your
me any -> m'any

In French, Y is a vowel (A,E, I, O U, Y). It seems it's not always the case in English though.
And even if there are no pronominal verb in french starting with the letter Y, we have a pronoun "y" that can replace location or things.
- "Je m'y suis habitué" (I got used to it) and not "Je me y suis habitué"
- "Vous vous y êtes habitué" (You got used to it) is not contracted.

And as always in french, there might be exceptions. ;)
(And thank you for attending this French lesson ! :D )

Baertram 08/23/18 01:59 PM

Oh, my French lessons were outdated (school was "some" years ago :p) so I forgot about the y :D
Thanks for the clarification.

Merci beaucoup

Provision 08/23/18 03:15 PM

Quote:

Originally Posted by votan (Post 35786)

and : https://wiki.esoui.com/How_to_format...h_zo_strformat

Gandalf 08/24/18 08:14 AM

Quote:

Originally Posted by Provision (Post 35801)

As fare I know, there is no documentation of what implicit conversions zo_strformat does apply.
Nor that implicit conversions are language specific.

However there is still the explicit modifier <<X:1>> :)
Since this suppresses the implicit conversion. Might be worth to point that out in the documentation.

Gandalf 08/24/18 08:16 AM

Quote:

Originally Posted by Mouton (Post 35782)
Actually i saw this behaviour recently on my plugin.
It seems ZOS translation is including some contraction rules for french language.

"me" in french is a personal pronoun (referring to the subject) that is contracted to "m'" when followed by a vowel. (English ref. http://www.saberfrances.com.ar/gramm...-pronouns.html)

Some rules may even replace part of guild names: I saw on my plugin than the incorrect static french translation
Code:

Vous avez rencontré quelqu'un de <<Le comptoir des artisans>>
("You met somebody from Le comptoir des artisans" - "Le comptoir des artisans" beeing a guild name) was correctly fixed to :
Code:

Vous avez rencontré quelqu'un du <<comptoir des artisans>>
"De le" ("from the" in masculine gender in French) is wrong and replaced by the correct contracted form "du".

I don't know how many grammar rules are implemented.


Many thanks, that was the information I was looking for!

Cheers,
Gandalf


All times are GMT -6. The time now is 11:51 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI