Thread Tools Display Modes
02/14/19, 03:20 PM   #1
Klingo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 16
Reusing ESO localization, but to what extend?

Hi

In the past I had every single word that was used in the addon put in my own translation files. While replacing them with the official ones from ESO itself (with: GetString(...)), I started to wonder to what extend this makes sense and when it is more wise to have custom translations for it.

Here are some examples with increasing uncertainty:


1) List professions, respectively re-use the different tabs from the Craft Bag. Getting the name from Filter Types seems still safe.
Lua Code:
  1. -- SI_ITEMFILTERTYPE17 = "Enchanting"
  2. GetString(SI_ITEMFILTERTYPE17)
  3. -- SI_ITEMFILTERTYPE18 = "Provisioning"
  4. GetString(SI_ITEMFILTERTYPE18)
  5. -- SI_ITEMFILTERTYPE19 = "Style Materials"
  6. GetString(SI_ITEMFILTERTYPE19)

2) Group the different glyphs under one common name. Reading the text from a gamepad category might already be more vague whether this value is always there?
Lua Code:
  1. -- SI_GAMEPADITEMCATEGORY13 = "Glyphs"
  2. GetString(SI_GAMEPADITEMCATEGORY13)

3) Group different "liquids" together under one common name. Here a text that would fit that such a group can be found from a customer service feedback category.
Lua Code:
  1. -- SI_CUSTOMERSERVICESUBMITFEEDBACKSUBCATEGORIES402 = "Potions & Poisons"
  2. GetString(SI_CUSTOMERSERVICESUBMITFEEDBACKSUBCATEGORIES402)

4) Group the different repair kits under one common name. Reading a hook point and cut off the colon at the end, because there is no native string for "Repair Kit(s)".
Lua Code:
  1. -- SI_HOOK_POINT_STORE_REPAIR_KIT_HEADER = "Repair Kits:"
  2. string.sub(GetString(SI_HOOK_POINT_STORE_REPAIR_KIT_HEADER),0,-2) -- "Repair Kit"


While the first two examples seem quite safe to me, I am not so sure with the third (and especially the fourth) one how reliable this really is. What would other developers recommend? Re-Use as much as possible from ESO to reduce custom localizations, or only take it from ESO when there is a 100% match?

Cheers
Klingo


PS: I took this as the base for finding keys: https://github.com/esoui/esoui/blob/...tedstrings.lua

Last edited by Dolby : 02/14/19 at 06:17 PM. Reason: fixing post cache
  Reply With Quote
02/14/19, 04:48 PM   #2
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
If something exists already that makes sense to use, then go with that. In the grand scheme, loading a few extra strings into memory won't break the game... probably.
  Reply With Quote
02/15/19, 06:10 AM   #3
merlight
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 671
Originally Posted by Klingo View Post
1) List professions, respectively re-use the different tabs from the Craft Bag. Getting the name from Filter Types seems still safe.
Yes, this is relatively safe, as long as the filters remain available. But don't hardcode the enum value, these are not so unlikely to change sometimes.
Lua Code:
  1. -- SI_ITEMFILTERTYPE17 = "Enchanting"
  2. GetString("SI_ITEMFILTERTYPE", ITEMFILTERTYPE_ENCHANTING)


Originally Posted by Klingo View Post
4) Group the different repair kits under one common name. Reading a hook point and cut off the colon at the end, because there is no native string for "Repair Kit(s)".
Lua Code:
  1. -- SI_HOOK_POINT_STORE_REPAIR_KIT_HEADER = "Repair Kits:"
  2. string.sub(GetString(SI_HOOK_POINT_STORE_REPAIR_KIT_HEADER),0,-2) -- "Repair Kit"
I wouldn't do this. You can't be sure that there will be a colon in other languages. There might be some multi-byte character (like an innocent non-breaking space), and this would make the string ill-formed UTF-8.

edit: oh, you're cutting not just the colon, but the "s", too. Well that is plain wrong, different languages form plurals in different ways
edit 2: no you're not, I got confused by the comment "Repair Kit". sub(s, 1, -2) cuts one byte.

Last edited by merlight : 02/15/19 at 06:16 AM.
  Reply With Quote
02/15/19, 10:48 AM   #4
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
I reuse quite a lot of ingame strings in AwesomeGuildStores and even do the "cut off a character at the end" thing (although I am working on getting rid of those). Never had a problem in the past 4 years, but I also wouldn't recommend using strings from the support sections of the game or some that are used in a different context in the vanilla UI.

I'd say texts that are tied into core systems are generally very unlikely to change and as a rule of thumb, the shorter it is, the safer it is to reuse.
  Reply With Quote
02/16/19, 10:24 AM   #5
Klingo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 16
Thanks for your feedback, and the recommendation with the hardcoded enum. Much appreciated!
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Reusing ESO localization, but to what extend?

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