Quantcast zo_strformat - lost in translation - ESOUI
Thread Tools Display Modes
08/23/18, 08:21 AM   #1
Gandalf
 
Gandalf's Avatar
Join Date: Aug 2016
Posts: 15
Exclamation 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
  Reply With Quote
08/23/18, 08:56 AM   #2
Mouton
 
Mouton's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2018
Posts: 6
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.

Last edited by Mouton : 08/23/18 at 09:03 AM.
  Reply With Quote
08/23/18, 11:42 AM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 460
Take a look here: http://wiki.esoui.com/How_to_add_localization_support
__________________
@votan73 (EU - megaserver)
  Reply With Quote
08/23/18, 11:53 AM   #4
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,816
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
  Reply With Quote
08/23/18, 01:08 PM   #5
Mouton
 
Mouton's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2018
Posts: 6
Originally Posted by Baertram View Post
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 ! )

Last edited by Mouton : 08/23/18 at 01:19 PM.
  Reply With Quote
08/23/18, 01:59 PM   #6
Baertram
 
Baertram's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 1,816
Oh, my French lessons were outdated (school was "some" years ago ) so I forgot about the y
Thanks for the clarification.

Merci beaucoup
  Reply With Quote
08/23/18, 03:15 PM   #7
Provision
 
Provision's Avatar
AddOn Author - Click to view addons
Join Date: May 2015
Posts: 42
Originally Posted by votan View Post
and : https://wiki.esoui.com/How_to_format...h_zo_strformat
  Reply With Quote
08/24/18, 08:14 AM   #8
Gandalf
 
Gandalf's Avatar
Join Date: Aug 2016
Posts: 15
Originally Posted by Provision View Post
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.

Last edited by Gandalf : 08/24/18 at 09:04 AM.
  Reply With Quote
08/24/18, 08:16 AM   #9
Gandalf
 
Gandalf's Avatar
Join Date: Aug 2016
Posts: 15
Originally Posted by Mouton View Post
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
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » zo_strformat - lost in translation

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off