View Single Post
04/10/16, 04:49 PM   #52
TERAB1T
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 28
Okay, you said it's hard to fix. But how about this? We can move all fonts to separate .str file (say "*_fonts.str") and load this file in Crown Store UI without loading custom interface strings.

Our goal: we need to make custom fonts support, BUT we also want to disallow editing of interface strings in Crown Store.

We have three files:

1. \esoui\pregamelocalization\pregamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\PregameLocalization\LocalizePregameGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_pregame.lua
  4. $(languageDirectory)\lang\$(language)_pregame.str

2. \esoui\ingamelocalization\ingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\IngameLocalization\LocalizeGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_client.lua
  4. $(languageDirectory)\lang\$(language)_client.str

3. \esoui\internalingamelocalization\internalingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\InternalIngameLocalization\LocalizeInternalIngameGeneratedStrings.lua
  3. ; For now, all of the InternalIngame strings will be compiled into the client.lua files
  4. ; if memory becomes an issue, since we are duplicating ingame strings into another GUI,
  5. ; we will need game tools to create new output internalingame.lua files
  6. $(languageDirectory)\lang\$(officialLanguage)_client.lua

So what do we need to do? Move all fonts from $(language)_pregame.str and $(language)_client.str to the new file: $(language)_fonts.str. From now "pregame.str" and "client.str" will contain only strings, and "fonts.str" - only fonts. So those three files above can be changed like this:

1. \esoui\pregamelocalization\pregamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\PregameLocalization\LocalizePregameGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_pregame.lua
  4. $(languageDirectory)\lang\$(language)_pregame.str
  5. $(languageDirectory)\lang\$(language)_fonts.str

2. \esoui\ingamelocalization\ingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\IngameLocalization\LocalizeGeneratedStrings.lua
  3. $(languageDirectory)\lang\$(officialLanguage)_client.lua
  4. $(languageDirectory)\lang\$(language)_client.str
  5. $(languageDirectory)\lang\$(language)_fonts.str

3. \esoui\internalingamelocalization\internalingamelocalization.txt

Lua Code:
  1. ## DependsOn: ZO_FontDefs
  2. EsoUI\InternalIngameLocalization\LocalizeInternalIngameGeneratedStrings.lua
  3. ; For now, all of the InternalIngame strings will be compiled into the client.lua files
  4. ; if memory becomes an issue, since we are duplicating ingame strings into another GUI,
  5. ; we will need game tools to create new output internalingame.lua files
  6. $(languageDirectory)\lang\$(officialLanguage)_client.lua
  7. $(languageDirectory)\lang\$(language)_fonts.str

I don't know is it possible (since I don't know how the system works on deeper levels), but I hope this will help. What do you think?

Last edited by TERAB1T : 05/09/16 at 04:53 AM.
  Reply With Quote