ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Trasnlation Question (https://www.esoui.com/forums/showthread.php?t=2371)

circonian 11/01/14 01:33 PM

Trasnlation Question
 
I don't know if I'm doing something wrong or if it is supposed to be like this, but checking against the google translater it doesn't look like those ^f and ^n characters are supposed to be on the end of the strings.
Do you have to zo_strformat it too somehow?


This is what some of the code looks like:
Lua Code:
  1. name = GetString(SI_ITEMTYPE1), -- "[eng] Weapon", -- SI_ITEMTYPE1
  2. name = GetString(SI_ITEMTYPE44),    -- "[eng] Style Material", -- SI_ITEMTYPE44
  3. name = GetString(SI_ITEMTYPE45),    -- "[eng] Armor Trait", -- SI_ITEMTYPE45
  4. name = GetString(SI_ITEMTYPE46),    -- "[eng] Weapon Trait", -- SI_ITEMTYPE46

Garkin 11/01/14 02:34 PM

Quote:

Originally Posted by circonian (Post 12859)
I don't know if I'm doing something wrong or if it is supposed to be like this, but checking against the google translater it doesn't look like those ^f and ^n characters are supposed to be on the end of the strings.
Do you have to zo_strformat it too somehow?


This is what some of the code looks like:
Lua Code:
  1. name = GetString(SI_ITEMTYPE1), -- "[eng] Weapon", -- SI_ITEMTYPE1
  2. name = GetString(SI_ITEMTYPE44),    -- "[eng] Style Material", -- SI_ITEMTYPE44
  3. name = GetString(SI_ITEMTYPE45),    -- "[eng] Armor Trait", -- SI_ITEMTYPE45
  4. name = GetString(SI_ITEMTYPE46),    -- "[eng] Weapon Trait", -- SI_ITEMTYPE46

No, characters ^??? should not be at the end of german words. They are here just to help with localization - they indicates if the word is singular or plural and if it is masculine/femine/neuter gender:
http://www.esoui.com/forums/showthread.php?p=7321

You can use for example:
Lua Code:
  1. name = zo_strformat(SI_ITEMTYPE1)
  2. name = zo_strformat(GetString("SI_ITEMTYPE", itemType))

circonian 11/01/14 03:14 PM

Quote:

Originally Posted by Garkin (Post 12861)
You can use for example:
Lua Code:
  1. name = zo_strformat(SI_ITEMTYPE1)
  2. name = zo_strformat(GetString("SI_ITEMTYPE", itemType))

I already tried those, unless I am missing something, they didn't work either:

Garkin 11/01/14 03:54 PM

Hm, you are right, it seems that zo_strformat without pattern work just for strings like "<<player{male/female}>>", it doesn't remove control characters from strings. You will have to use some pattern like "<<1>>" (just remove control characters), <<t:1>> (capitalize first letter of each word) or "<<C:1>>" (capitalize first letter of the first word).

Lua Code:
  1. name = zo_strformat(SI_TOOLTIP_ITEM_NAME, GetString(SI_ITEMTYPE1))
  2. name = zo_strformat("<<t:1>>", GetString("SI_ITEMTYPE", itemType))


All times are GMT -6. The time now is 09:29 AM.

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