04/04/22, 07:28 PM | #1 | |
Join Date: Apr 2021
Posts: 8
|
Adding Font on Addon
Hi. I'm trying to translate the game to my language and I need some assistance. I finished client and pregame files translation. I don't know how coding work so i took .lua and .str files from another translation team. (with their consent ofc) My questions are :
1-) There are some letters in my language like : "ş,ğ,ö,ü,ı,İ" These letters seems without error except "İ" and "ı" . For example : https://imgur.com/boFfJoZ If i change "Lore Kitaplığı" to "Lore KitaplIğI" , thats fixing the situation in one side. Then it brokes the other side. Lower case letters not seems right when they are becoming upper case letters. How can I make "ı" to "I" or "i" to "İ" ? 2-) I started translate .lang file recently. But this time the letters that i said earlier seems like this : https://imgur.com/gXiIxvq I tried to fix it with adding Font commands to client and pregame files like this : [Font:ZoFontGame] = "fonts/univers57.otf|18|soft-shadow-thin" [Font:ZoFontGameMedium] = "fonts/univers57.otf|18|soft-shadow-thin" [Font:ZoFontGameLarge] = "fonts/univers57.otf|18|soft-shadow-thin" [Font:ZoFontEdit] = "fonts/univers57.otf|18|shadow"/> [Font:ZoFontChat] = "fonts/univers57.otf|18|soft-shadow-thin" [Font:ZoFontEditChat] = "fonts/univers57.otf|18|shadow" [Font:ZoFontTooltipSubtitle] = "fonts/univers57.otf|18" [Font:ZoFontKeybindStripKey] = "fonts/univers57.otf|20|soft-shadow-thin" [Font:ZoFontSubtitleText] = "fonts/univers57.otf|28|soft-shadow-thick" [Font:ZoMarketAnnouncementKeyboardDescriptionFont] = "fonts/univers57.otf|22" I checked my univers57 font have all of those letters. BUT after that it become like this : https://imgur.com/oWnofly So all the letters that i said before become hidden this time. 3-) I need to know if there is any letter limit on .lang file. Let me explain : I changed "Crusty Bread" to "Kuru Ekmek". After that, some items in my inventory lost 2 letters from left like "Ferno Staff of a Mother's Sorrow" . I put 2 space after my translation and it's fixed. But how can i make it right if the translated word have more letters than the original ? I know I asked too much with too little English lol. But I spend like 2 month for this and I REALY want to make my translation right. Last edited by Balgamov : 04/04/22 at 07:34 PM. Reason: type mistakes |
|
04/04/22, 07:54 PM | #2 |
Which language, Turkish? The two letter abbreviation is "tr", correct?
Where in your unofficial translation mod do you store the font with the Glyphs for Turkish? .\live\Addons\EsoTR\fonts .\live\Addons\EsoTR\fonts\univers57.otf Do you do that for example? Last edited by Sharlikran : 04/04/22 at 08:04 PM. |
|
04/05/22, 06:15 AM | #3 | ||
Join Date: Apr 2021
Posts: 8
|
Fonts are inside of "\live\Addons\fonts\univers57.otf" Client and Pregame files are inside of "\live\AddOns\EsoUI\lang" .lang and .dat files are inside of "\live\AddOns\gamedata\lang" Mod .lua files are inside of "\live\AddOns\TurkishScrollsOnline" Am I doing something wrong ? I don't realy know if I have to add something to .lua file for fonts. I can upload it too if you want ? Edit : I tried putting font folder inside mod folder. Nothing changed. Edit 2 : I also tried another font which I'm %100 sure about its contain letters "ş,ı,ü,ç.." . Letters dissapeared again : Last edited by Balgamov : 04/05/22 at 05:44 PM. |
||
04/06/22, 01:58 PM | #4 |
Read the information at this link.
Don't copy the routine con2CNKR because they do that since the game does not support Korean Glyphs form Hangul. However, if you look at that file there is a way to assign fonts to everything in the game. Not just in the tr_pregame.str or tr_client.str files but from the mod. The function fontChangeWhenInit should run through the table for fontFaces so that the game has your font properly assigned so you can see the Turkish glyphs. |
|
04/06/22, 09:33 PM | #5 | ||
Join Date: Apr 2021
Posts: 8
|
- I added some lines from EsoKR and changed it with TurkishScrollsOnline (inside .lua): Code:
function TurkishScrollsOnline:fontChangeWhenInit() local path = TurkishScrollsOnline:getFontPath() local pair = { "ZO_TOOLTIP_STYLES", "ZO_CRAFTING_TOOLTIP_STYLES", "ZO_GAMEPAD_DYEING_TOOLTIP_STYLES" } local function f(x) return path .. x end local fontFaces = TurkishScrollsOnline.fontFaces for _, v in pairs(pair) do for k, fnt in pairs(fontFaces[v]) do _G[v][k]["fontFace"] = f(fnt) end end SetSCTKeyboardFont(f(fontFaces.UNI67) .. "|29|soft-shadow-thick") SetSCTGamepadFont(f(fontFaces.UNI67) .. "|35|soft-shadow-thick") SetNameplateKeyboardFont(f(fontFaces.UNI67), 4) SetNameplateGamepadFont(f(fontFaces.UNI67), 4) -- this is set up by TurkishScrollsOnline in fontFaces.lua -- ["Univers 55"] = UNI55, -- ["Univers 57"] = UNI57, -- ["Univers 67"] = UNI67, -- ["Skyrim Handwritten"] = HAND, -- ["ProseAntique"] = ANTIQUE, -- ["Trajan Pro"] = TRAJAN, -- ["Futura Condensed"] = FTN57, -- ["Futura Condensed Bold"] = FTN87, -- ["Futura Condensed Light"] = FTN47, for k, v in pairs(fontFaces.fonts) do LMP.MediaTable.font[k] = nil LMP:Register("font", k, f(v)) end LMP:SetDefault("font", "Univers 57") -- Loop through list and make sure it is using ESORK Font local uni57 = f(fontFaces.UNI57) local uni47 = f(fontFaces.FTN47) local fontList = { "Arial Narrow", "Consolas", "ESO Cartographer", "Fontin Bold", "Fontin Italic", "Fontin Regular", "Fontin SmallCaps", "Futura Condensed", } for i = 1, #fontList do LMP.MediaTable.font[fontList[i]] = nil LMP:Register("font", fontList[i], uni57) end -- do single because it is different if LMP:Fetch("font", "Futura Light") ~= uni47 then LMP.MediaTable.font["Futura Light"] = nil LMP:Register("font", "Futura Light", uni47) end if LWF3 then LWF3.data.Fonts = { ["Arial Narrow"] = uni57, ["Consolas"] = uni57, ["ESO Cartographer"] = uni57, ["Fontin Bold"] = uni57, ["Fontin Italic"] = uni57, ["Fontin Regular"] = uni57, ["Fontin SmallCaps"] = uni57, ["Futura Condensed"] = uni57, ["Futura Light"] = path .. fontFaces.FTN47, } for k, v in pairs(fontFaces.fonts) do LWF3.data.Fonts[k] = f(v) end end if LWF4 then LWF4.data.Fonts = { ["Arial Narrow"] = uni57, ["Consolas"] = uni57, ["ESO Cartographer"] = uni57, ["Fontin Bold"] = uni57, ["Fontin Italic"] = uni57, ["Fontin Regular"] = uni57, ["Fontin SmallCaps"] = uni57, ["Futura Condensed"] = uni57, ["Futura Light"] = path .. fontFaces.FTN47, } for k, v in pairs(fontFaces.fonts) do LWF4.data.Fonts[k] = f(v) end end function ZO_TooltipStyledObject:GetFontString(...) local fontFace = self:GetProperty("fontFace", ...) local fontSize = self:GetProperty("fontSize", ...) if fontFace == "$(GAMEPAD_LIGHT_FONT)" then fontFace = f(fontFaces.FTN47) end if fontFace == "$(GAMEPAD_MEDIUM_FONT)" then fontFace = f(fontFaces.FTN57) end if fontFace == "$(GAMEPAD_BOLD_FONT)" then fontFace = f(fontFaces.FTN87) end if (fontFace and fontSize) then if type(fontSize) == "number" then fontSize = tostring(fontSize) end local fontStyle = self:GetProperty("fontStyle", ...) if (fontStyle) then return string.format("%s|%s|%s", fontFace, fontSize, fontStyle) else return string.format("%s|%s", fontFace, fontSize) end else return "ZoFontGame" end end end local function fontChangeWhenPlayerActivaited() local path = TurkishScrollsOnline:getFontPath() local function f(x) return path .. x end local fontFaces = TurkishScrollsOnline.fontFaces SetSCTKeyboardFont(f(fontFaces.UNI67) .. "|29|soft-shadow-thick") SetSCTGamepadFont(f(fontFaces.UNI67) .. "|35|soft-shadow-thick") SetNameplateKeyboardFont(f(fontFaces.UNI67), 4) SetNameplateGamepadFont(f(fontFaces.UNI67), 4) end - I created fontFaces folder inside mod and AddOns folder. - Fonts that EsoKR using are same with my fonts (uni57,uni67,etc..) BUT my fonts have the letters that i said before. (ş,ğ,ü,ç..) I realy need help for .lua file. I don't want to bother you with this but please, can you just look it up and tell me what is wrong ? |
||
04/06/22, 09:39 PM | #6 |
I don't mind looking but do you have the complete Turkish mod on esoui? If not is it on GitHub? To test it I really need to just load the entire mod myself. I only speak Spanish and English but I have all 10 languages that I can choose from if needed. I will be able to better understand the issue with the complete mod, and all font files etc. If you don't have the entire mod on ESOUI and don't want to may I have a Mediafire link?
Also I will probably check the loaded fonts with MerTorchbug. So having everything will help. That file requires LibMediaProvider. Add to TurkishScrollsOnline.txt ## DependsOn: LibMediaProvider-1.0>=17 EDIT: Also I just noticed your EVENT_ADD_ON_LOADED isn't set up properly. Once I have the entire TurkishScrollsOnline I can look into it. Last edited by Sharlikran : 04/06/22 at 09:53 PM. |
|
04/06/22, 10:13 PM | #7 | ||
Join Date: Apr 2021
Posts: 8
|
|
||
04/07/22, 12:15 AM | #8 |
Sent you a PM with New Files.
So to start with some of it was just simple Lua stuff. If there is a function self:getLanguage() but you don't have a function "TurkishScrollsOnline:getLanguage()" then it will not check the language set by the game. It will probably error but I didn't see that because I noticed it right away and changed it first. However, there was a few other things. Like isNeedToChangeAdditionalFontTable is a table of languages that are supported. For example tr and en. So you need a table for the for loop. Then in the TurkishScrollsOnline.txt you did not specify that LibMediaProvider was a dependency, and you did not even load the fontFaces.lua file. You had Code:
## Title: Turkish Scrolls Online - Türkçe Çeviri ## Author: Balgamov ## APIVersion: 101032 ## SavedVariables: TurkishScrollsOnlineVars ## Version: 0.106 ## Description: Elder Scrolls Online Türkçe Çeviri - Balgamov TurkishScrollsOnline.lua TurkishScrollsOnline.xml Code:
## Title: Turkish Scrolls Online - Türkçe Çeviri ## Author: Balgamov ## APIVersion: 101032 ## SavedVariables: TurkishScrollsOnlineVars ## Version: 0.106 ## Description: Elder Scrolls Online Türkçe Çeviri - Balgamov ## DependsOn: LibMediaProvider-1.0>=17 TurkishScrollsOnline.lua TurkishScrollsOnline.xml fontFaces.lua Code:
local function OnLoad(eventCode, addOnName) if addOnName == TurkishScrollsOnline.name then EVENT_MANAGER:UnregisterForEvent(TurkishScrollsOnline.name, EVENT_ADD_ON_LOADED) << Do Stuff >> end end EVENT_MANAGER:RegisterForEvent(TurkishScrollsOnline.name, EVENT_ADD_ON_LOADED, OnLoad) Then also if there is a function to alter the fonts like TurkishScrollsOnline:fontChangeWhenInit() to set all the fonts you need to actually call it during initialization prior to TurkishScrollsOnline:RefreshUI(). In the "EsoUI\lang" folder those files need to have font declerations Code:
[Font:ZoFontWinH1] = "TurkishScrollsOnline/fonts/univers67.otf|30|soft-shadow-thick" Lastly I could not for the life of me figure out how to change the language. I could not figure out how to get the flags to show up so I could click the Turkish flag. Why is that important? Well because when your language is EN then you use the English client and pregame files with the standard default EsoUI fonts. To get the game to use the Turkish fonts you need to actually set the language to "tr" or the files won't be loaded at all. /script SetCVar("language.2","tr") /script SetCVar("language.2","en") You have to load the game with the files I sent you and THEN switch to TR or you will not experience the font changes. So if you know how to use the flags with your mod then click the red Turkish flag and the fonts should change. If you do not click the Turkish flag (because you didn't set that up yet) then you have to manually change the language. Changing the language is the last step and if you don't do it then the mod doesn't alter the fonts. Last edited by Sharlikran : 04/07/22 at 12:25 AM. |
|
04/07/22, 12:40 AM | #9 |
Opps, be sure to check your PM and get TurkishScrollsOnline_2.zip, I messed up and forgot to include a few other altered files.
|
|
04/07/22, 08:40 PM | #10 |
Get TurkishScrollsOnline_3 because I made it so that the flags would show and hide in the lower right corner so you can click them and switch languages easily.
|
|
04/09/22, 04:05 AM | #11 | |
Join Date: Apr 2021
Posts: 8
|
I clicked on English flag and it said " Spanish Scrolls Online " LOL . I changed it, it is ok )
I am realy sorry but i could't manage to change it again. Turkish letters still not appearing. Then I realize 3 of my fonts don't have those letters. So I have downloaded FontForge and started adding letters. I will try - Delete everything -include other language mods- - Add fonts that I mentioned Again I'm sorry but I can't understand how these mods work. You said something about /script command. I writed it inside game and nothing happened. I tried adding it to .lua file, nothing happened again. I'm feeling bad because I'm feeling like wasting your time. So sorry about that. Btw I didn't add Flags. I took .lua file from ItalianScrollsOnline team. So I don't realy know how that works either. Before wasting your time again i will work on it first. I will write you when I fixing those things first. Thank you |
|
04/09/22, 05:57 AM | #12 |
Command starting with script need to be entered into the chat editbox and you need to press the return key afterwards
/script SetCVar("language.2","en") Changes the UI language to English and reloads the UI. /script SetCVar("language.2","de") Changes the UI language to German and reloads the UI. /script SetCVar("language.2","tr") Changes the UI language to Turkish, if tr was registered as valid language to the game (don't aks me how to do this :-) ) and reloads the UI. At least en and de should work for you too if you enter them in the chat editbox an press the return key. Attention: CASE SENSITIVE! do not write all in small characters. Last edited by Baertram : 04/09/22 at 03:39 PM. |
|
04/09/22, 06:44 AM | #13 | ||
Join Date: Apr 2021
Posts: 8
|
I 'm going to translate other parts of .lang file to see if it's happening because of my fonts. |
||
04/09/22, 07:15 AM | #14 |
04/09/22, 01:13 PM | #15 | ||
Join Date: Apr 2021
Posts: 8
|
Trajan Pro have them too but don't use lower case letters. So there is no "ı" . But have all other glyps. I will fix it with FontForge like I did before in Prose Antique. Edit : I fixed Trajan Pro too. Last edited by Balgamov : 04/09/22 at 01:25 PM. |
||
04/09/22, 04:36 PM | #16 |
If you fixed the fonts then make sure you have clicked the Turkish flag icon and it has switched so it uses the files with the different font assignments.
Then see if the screen shot is different or if it still shows squares in place of the Glyphs you want to display. |
|
04/10/22, 12:02 AM | #17 | ||
Join Date: Apr 2021
Posts: 8
|
Hey. Can you show me Sorcerer - Dark Magic - Negate Magic Skill Description inside game please ? |
||
04/10/22, 04:41 AM | #18 |
Did you translate all the levels and morphs? Because mine is low level. I don't know if I have that st level IV.
|
|
ESOUI » AddOns » AddOn Help/Support » Adding Font on Addon |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|