GSE: Sequences, Variables, Macros

GSE: Sequences, Variables, Macros

6M Downloads

Localisation

TimothyLuke opened this issue · 43 comments

commented

There needs to be a way of converting a sequence from English to a localised language. There are a couple of ways of doing this

1 - Find an internal API that allows us to translate English -> localised language similar to classDisplayName, classTag, classID = GetClassInfo(index) where classTag = an elglish capitalised static of the class.
2 - Create Sequence Addons Packs for each Language
3 - Store the Spell ID's for a Sequence and then have each client create the PreMacro, PostMacro and Sequence from these SpellID's into their local language.
4 - Use a translation lib (wowace?) to to string substitutions aka version 1

Of these options, 1 doesnt seem to exist. 2 is a lot of work and unsustainable. People cant copy a Sequence from English and reuse it. 3 is not pretty and needs more work from the author. I could get the editor to export this but its a PITA and not easily readable. 4 may be the best option but it depends on it existing.

commented

Off the previous list of things to do,

Add Localisation for the mod (eg allow the visable strings like "Sequence Viewer" etc to be translated)

Will happen in #39

commented

I got minimum skills to programming, but i can help you into translate castillian / spanish.

commented

can you add language flag for macros?
something like

Sequences['DB_Arcane'] = {
specID = 62,
--by default lang=en
author = "Flashgreer - wowlazymacros.com",
helpTxt = "2122132",
PreMacro = [[
/targetenemy [noharm][dead]
]],
'/castsequence [nochanneling]Arcane Blast,Arcane Blast,Arcane Blast,Arcane Blast,Arcane Barrage',
'/cast [nochanneling]Arcane Missiles',
'/castsequence [nochanneling]charged up, Arcane Barrage',
'/cast [nochanneling]Rune of power',
PostMacro = [[
/startattack
/cast [combat]Arcane Power
/cast [combat]Presence of Mind
]],
}

russian as example:
Sequences['SSR_Arcane'] = {
specID = 62,
lang= "ru",
author = "Flashgreer - wowlazymacros.com",
helpTxt = "2122132",
PreMacro = [[
/targetenemy [noharm][dead]
]],
'/castsequence [nochanneling]Чародейская вспышка,Чародейская вспышка,Чародейская вспышка,Чародейская вспышка,Чародейский обстрел',
'/cast [nochanneling]Чародейские стрелы',
'/castsequence [nochanneling]Наполнение силой, Чародейский обстрел',
'/cast [nochanneling]Руна мощи',
PostMacro = [[
/startattack
/cast [combat]Мощь тайной магии
/cast [combat]Величие разума
]],
}

btw, im translating your macros pack to russian

commented

The way LibBabble-Spell worked was that it had tables like

lib:SetCurrentTranslations {
    ["Abolish Disease"] = "Снятие болезни",
    ["Abolish Poison"] = "Выведение яда",
    ["Abolish Poison Effect"] = "Устранение эффекта яда",
    ["Abyssal Strike"] = "Поражение духом Бездны",
    ["Activate MG Turret"] = "Активация гномской турели",
    ["Adrenaline Rush"] = "Выброс адреналина",
    ["Aftermath"] = "Последствия",
    ["Aggression"] = "Агрессивность",
    ["Agonizing Flames"] = "Пламенная боль",
    ["Aimed Shot"] = "Прицельный выстрел",
    ["Alchemy"] = "Алхимия",
    ["Ambush"] = "Внезапный удар",
commented

@lloskka Thank you so much!

commented

Asked http://forums.wowace.com/showthread.php?p=345227#post345227 for information on LibBabble-Spell status. This would work but it hasnt been updated since 2.4

Maybe with the ability culling it wont be too hard to do.

commented

Currently I've translated all macros to german.
Unfortunately, I must therefore download each new version manually and translate new macros.
But I think it's worth the effort.
If you want the german macros, just say where I should send /upload them.
If desired I can also gladly translate the rest of the addon.

commented

@camelot10 Translating this to Russian gives action 2 but then every time we edit or adjust a sequence it has to be retranslated.

What I am thinking is something like http://www.wowace.com/addons/project-14267/ which has now unfortunately been abandoned. With something like that I could get someone to translate a list of spells to a language like Russian once and then use that list to retranslate every time.

commented

@camelot10 having said that if you complete your sequence pack I will link to it from both wowinterface and curse.

commented

Hi timothy,
if you want i can translate all the macros in Italian.

Btw, i think it would be really easy to precomplile a Database with all the spell ID , because no matter the language you will use, the spell ID will remain always the same, then it will be easyer to make the macro work with the spell id and not with the spell name.

Also if im remember correctly there is a Tooltip API that recall from the game database the tlanslated spell tooltip in the language the user is using.

Nesland

commented

@Blacky101 I would suggest uploading to wither wowinterface or curse and send me a link. I will add that to the list of addons for the mod

@Nesland there is but the problem is getting from "Consecration" to "Consagración" and back again.

commented

i try to explain better, because i'm not a pro on programming

now the macro work like this :
/castsequence Consecration, Consecration

and the tooltip is referring to the spell name , if the spell name is in different language the tooltip won't pop up and the macro won't run.

what i intend to is to have something like that :

spell=26573 -> consecration
/castsequence spell=26573, spell=26573

and in this case the tooltip will always show the relative spell toltip no matther wich language you use and the macro will work in any language , because the spell ID will be always the sameand the macro will always run (until blizzard change the spell ID).

the downside of that is to have a full reference list with all the spell ID for all the related spell and/or skill preloaded into GS.
and i dunno if GS can chain the skill with only the spell ID and not the spell name ( not really good at pure programming.)

If GS can execute the scripts and the macros only referring them with the spell ID, it will take some time to rewrite all of them, but after they will work worldwide no matther the region and/or language the user will play and if that so i can help rewriting all macros changing the spell name with spell ID and i can also try to compile a reference list for all spell needed.

commented

@Nesland

It appears that the best plan is as you have mentioned to store the spell ID's internally rather than the names. The knock on effect is that the macro wont be easily sharable. IE it will work with other GS-E users but wont be backwards compatible with GS anymore.

commented

Ok I have a plan. It is going to take some time but I have a plan. Of super importance to me is being able to go to wowlazymacros or edit the addon packs and be able to explicitly read what a macro is doing. While some mods have an encrypted string the last thing I want is to look at a string like that and hope it will be ok and not cause a problem like the scam chat exploit.

Rather than store than store the spellID I am going to make a better libbabble. The plan for this is as follows.
1 write a small mod that exports the spell name and spellID which we save in a text file. The file will look like:

1="Consecration",
2="Hand of Reckoning"
Etc

But when you run the same mod on another client it will create the same but in Russian or German or French This prevents having to keep translating to every language but leaves the macro readable on a webpage

Currently at startup GS-E creates all the macros once. It would be a relatively minor performance cost at startup to hook these translation files

We would add a lang= line to the sequence with a default of EN. And a global option to use the translated. If the global option is off it will only use sequences that it finds that are in your clients language. If you have all your sequences in FR and have turned say Draiks Bundled off you then don't need the translator.

The editor will have two tabs for export - an en to share and a local version to save in myMacros

TimothyLuke

commented

@ TimothyLuke

That's why i suggest other that store the spell id internally , to also create (as it exist already for the specID) a reference table and then let the users eventually do the translating work.

Or if you want to create a complete addons, that now only work as GS but also totally remplace it, you can do something more faster and even more reliable:

  1. Store all the spell ID internalli and make the GS work with the spell ID.

  2. create a standard reference table with all the concernetd spell ID with the relative spell in ENGLISH.

  3. ask to users here or to volounter or to someone that know the language to translate only the reference table while mantainig the relevant spell ID

  4. link the loagind for the reference table to the client language with the command [GetLocale()] and with this reference table:

The Americas
American English enUS
Latin American Spanish esMX
Brazilian Portuguese ptBR

Europe
German deDE
European English enGB
European Spanish esES
French frFR
Italian itIT
European Portuguese ptPT
Russian ruRU

Korea
Korean koKR

Taiwan
Traditional Chinese zhTW

Southeast Asia,
Australia & New Zealand
Southeast Asia English enSG


I can cover the language,: Italian , French, English, German
all the others can be easly done even if you don't know the language because the game icons will be alwys the same, then is just to copy and paste from the game or from wowhead (the localizated version)

I remain at your disposition and i will glady give you all the help you need.

commented

THe way this theoretically works (note I havent tried this in game yet) is that a /gstr will popup a window with a table of spellID's. This file will become the ENUS zone. Running the same command on a client with a different locale will create an alternative locale equivalent. This will save having to manually translate over 200000 abilities.

commented

Lot of spam on this but things have been progressing. I have killed the 220K ability list down to 85K but this be around 2-3k. The Translator is hooked up but there are too many definitions currently to be effective with.

The language file will use a cached copy if it has on that resembles the following:
language["enUS"] = {
[5]="Death Touch",
[7]="Suicide",
[52989]="Akali's Stun",
}

language["esMX"] = {
[5] = "Toque mortífero",
[7] = "Suicidio",
[52989] = "Aturdimiento de Akali",
}
if it doesnt it will create a temporary one

THere is a language extractor mod that can be used to extract the cached version

commented

I need to edit down the GS-SequenceTranslator/enUS.lua file as it is the master that the others are derived from.

commented

how i can help you on that ?

commented

Hey @lloskka , @Nesland , @camelot10 @Blacky101 !

I have checked in a prototype and It works. I say that with the note that I am testing on a spanish (esMX) client against the beta servers but they say the proof is in teh pudding:

image

Sequences['DB_Arcane'] = {
author="Flashgreer - wowlazymacros.com",
specID=62,
helpTxt = '2122132',
lang="esMX",
PreMacro=[[
/targetenemy [noharm][dead] ]],
"/castsequence [nochanneling] Explosión Arcana, Explosión Arcana, Explosión Arcana, Explosión Arcana, Tromba Arcana, ",
"/cast [nochanneling] Misiles Arcanos",
"/castsequence [nochanneling] Cargado,  Arcane Barrage",
"/cast [nochanneling] Runa de poder",
PostMacro=[[
/cast [combat] Poder Arcano
/cast [combat] Presencia mental
]],
`}

Sequences['DB_Ret'] = {
author="Draik",
specID=70,
helpTxt = 'Retribution Single Target macro - 3311112.',
icon='INV_Sword_2H_AshbringerCorrupt',
lang="esMX",
PreMacro=[[
/targetenemy [noharm][dead] ]],
"/cast Sentencia",
"/cast Golpe de cruzado",
"/cast Cuchilla de justicia",
"/cast [combat] !Consagración",
"/cast [combat] !Cruzada",
"/cast !Despertar de las cenizas",
"/cast Veredicto del templario",
PostMacro=[[
/use [combat] 13
/use [combat] 14
]],
}

The way this works is it loads

  • GS-Core
  • GS-DraikMacros
  • GS-anyotherMacros
  • GS-SequenceEditor
  • GS-SequenceTranslator

There is a general option to turn on the translator and if the translator is present and the option is on, it will run your sequences through a translator and convert them into your local language.

The translator is an optional part that I will release separate to the addon menaing that if you dont need it you dont have to have it.

To do this there is a file called enUS.lua that has a list of spells in it. It then loads in any otehr cached languages (at the moment this is only esMX.lua). If your current Locale is not available it will then translate the enUS.lua file by looking up the spell ids from that table and store their local language equivalent. It will then load your sequences and translate the PreMacro, Sequence Steps (/cast lines) and PostMacro.

The following things are left to do for release:

  • Add output pages for the Sequence Editor to swap a sequence between local and enUS
  • Reduce the time to translate a sequence by culling the number of entries
  • Polish the standalone GSE-LanguageExtractor so that people can understand how to create a language extract for their locale so it can be cached
  • change this function GSTRFindSpellIDByName (list, spell) to a reverse hash list of enUS to significantly improve performance
  • Add Localisation for the mod (eg allow the visable strings like "Sequence Viewer" etc to be translated)

There is a lot of cleanup to go but if you feel game, grab these folders and replace them

  • GS-Core
  • GS-SequenceEditor
  • GS-SequenceTranslator

This way your local sequences will remain in tack and you can roll back to 1.0.6

commented

It also checks the lang="enUS" tag and if it matches your current locale it just adds it without translating it

commented

Ready to test it on 3 different client ( osx, windows 10, and linux) with 4 different language

English, French, Italian, German

commented

From the Code tab up top of this page, choose to download and just grab those three folders out of the zip. There are new sequences in GS-DraikMacros but not a lot.

https://github.com/TimothyLuke/GnomeSequenced-Enhanced/archive/master.zip

commented

The code checked into here now does this. Its almost there:

GS-SequenceTranslator: Entering GSTranslateString with :
/cast Judgment
/cast Crusader Strike
/cast Blade of Justice

/cast [combat]!Consecration
/cast [combat]!Crusade
/cast !Wake of Ashes
/cast Templar's Verdict
enUS esMX
GS-SequenceTranslator: Did not find : Judgme in enUS
GS-SequenceTranslator: Translating Spell ID : 14517 to Golpe de cruzado
GS-SequenceTranslator: Translating Spell ID : 184575 to Cuchilla de justicia
GS-SequenceTranslator: Did not find : [combat]!Co in enUS
GS-SequenceTranslator: Did not find : [combat]!Crusade in enUS
GS-SequenceTranslator: Translating Spell ID : 205273 to Despertar de las cenizas
GS-SequenceTranslator: Translating Spell ID : 85256 to Veredicto del templario
GS-SequenceTranslator: Exiting GSTranslateString with :
/cast Judgme
/cast Golpe de cruzado,
/cast Cuchilla de justicia,

/cast [combat]!Co
/cast [combat]!Crusade
/cast !Despertar de las cenizas,
/cast Veredicto del templario,

commented

Test Parameters:

character tested : 11, one for each class , all 3 spec swapped (4 on druids)
language tested : English, German, French, Italian.
System tested : oSX Leopard, Windows 10, Linux Ubuntu (to see if there was some blockage with translating files)
Client Version : 7.0.3 (version 22293)

Test Results :
the translator works fine with the language tested and with no hangups on translating.
no error on translation and on the dummy target all the macros are working fine as the programmed sequences.

The only downside i noticed and i encountered every time i swapped char o i logged in with a different client is that the loading times are more heavier (due to the translating) and the translated macros are not permanently saved to a file, then every time you do a /reload or you login into the game the translator will do it's work.
The macro in the native language remain registered into the character macro panel even if you change the language , but if you leave the translator active he will always translate on loading causing the loading time be more longer (on my systems from 5 second loading , up to 44) and during the loading , even the alt+tab was not responding.

There is a way perhaps to not bind the translating on loading but rather with a command (like /gstranslate [macroname] to avoid that ?

commented

RE

The only downside i noticed and i encountered > every time i swapped char o i logged in with a
different client is that the loading times are
more heavier (due to the translating) and the
translated macros are not permanently saved to
a file.

I know why this is and I have a lot of work coming to improve this. I just wanted to throw you guys a prototype to see if the theory worked. While there is currently the hit on startup it's not a hit on execution of the sequence.

TimothyLuke

On 28 Jul 2016, at 12:14 AM, Nesland [email protected] wrote:

The only downside i noticed and i encountered every time i swapped char o i logged in with a different client is that the loading times are more heavier (due to the translating) and the translated macros are not permanently saved to a file, then every time you do a /reload or you login into th

commented

When i try to upload the lua file here it say that can't be uploaded in that format, and if i zip it he wont accept either.
i created the lua for the Italian language, if you want i can copy and paste directly the code

EDIT : uploaded as fake PDF, just rename it as .lua and it sould be readable correctly

GSE-LanguageExtractor.pdf

commented

Signifcantly reduced load time. We are still caching 84000 entries where as we only need to cache about 1500-2000. This will be a work in progress but its usable now and the on load time is significantly less.

there is a GSE-LanguageExtractor mod. This mod will create the things i need for the Translator caching other languages. The way to use this is:

  1. set the client to a new language.
  2. completely exit the game
  3. open the c:\path\to\world of warcraft\wtf\yourcurrentworld\savedvariables folder
  4. delete the files GSE-LanguageExtractor.*
  5. Restart the game
  6. disable all mods and enable this.
  7. Login to a character.
  8. wait for the message that X entries translated.
  9. log out of the game
  10. come to this Issue and attach the c:\path\to\world of warcraft\wtf\yourcurrentworld\savedvariables\GSE-LanguageExtractor.lua file to this issue
commented

@Nesland

Do you want to just email it to me. Each file is about 6mb so happy for them to come individually

E [email protected]

On 29 Jul 2016, at 4:01 AM, Nesland [email protected] wrote:

When i try to upload the lua file here it say that can't be uploaded in that format, and if i zip it he wont accept either.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

commented

I tried see skada and recount.
This addons have skills in portuguese... Bud I dont understand not very well luz language.
Addon scale skills useds, and more.... in all languages...
Skada, and recount....

commented

@LNPV

This is via Google Translate:

há um mod GSE-LanguageExtractor . Este mod irá criar as coisas que eu preciso para o tradutor cache outras línguas. A maneira de usar isto é :

  1. definir o cliente para um novo idioma.
    
  2. sair completamente do jogo
    
  3. abrir o caminho C:\a\World of Warcraft pasta\wtf\yourcurrentworld\savedvariables
    
  4. excluir os arquivos GSE-LanguageExtractor . *
    
  5. Reinicie o jogo
    
  6. desativar todos os mods e permitir isso.
    
  7. Entre para um personagem.
    
  8. aguardar a mensagem de que as entradas X traduzido .
    
  9. sair do jogo
    
  10. vir a esta questão e anexar o C:\a\World of Warcraft pasta\wtf\yourcurrentworld\savedvariables\GSE-LanguageExtractor.lua a esta questão
    
commented

I was maked this....
I Can understand english.... bud i dont know write very well. ^^

commented

I have added ptBR into the mod here - @LPNV would you be able to see if this is now working properly for you? Tonight and Tomorrow I will update the sequence editor to be able to show both local and enUS macros

commented

Sended file for : Italian, French , German, Spanish (eu)

downloading language pack for the other ones (like korean and chinese)

commented

@Nesland thank you they are uploading here now

commented

This was just released to Curse and WowInterface

commented

If do u want, I can translate all phrases (entire addon to ptbr) (interface), bud i dont know lua language very well, if do u want indicate or send to me, and I'll translate to u.
The same as DBM, Recount, Skada....

Sorry my english.... is very poor, bud i try help to. :-)

commented

Thats awesome I plan to go through tomorrow and create a list of things to
translate so there is one file to go through.

On Sat, Jul 30, 2016 at 1:11 AM, LNPV [email protected] wrote:

If do u want, I can translate all phrases (entire addon to ptbr)
(interface), bud i dont know lua language very well, if do u want indicate
or send to me, and I'll translate to u.
The same as DBM, Recount, Skada....

Sorry my english.... is very poor, bud i try help to. :-)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#10 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjBFfMKaqebGuHy-x4qPaTzbG6yAvpPks5qah8VgaJpZM4JReGB
.

commented

Same for me, i can Translate into Italian, French and German all the Addons options and interface.

Need only the things to translate

commented

Hello Tim,

i found in the whole line of translating text and macros created one discrepancy.

this skill is not taken in charge when it's translated, dunno if it's missing from somwhere os there are some translating problem.

spell=5171 slice and dice

Rogue Outlaw talent.

commented

Hey Nelsand

I have found another as well that is missed. I found a way to export instead of 86000 string 4000 so will be easier to tell what is missing. This should be put in a day or so.

On 2 Aug 2016, at 10:04 PM, Nesland [email protected] wrote:

Hello Tim,

i found in the whole line of translating text and macros created one discrepancy.

this skill is not taken in charge when it's translated, dunno if it's missing from somwhere os there are some translating problem.

spell=5171 slice and dice

Rogue Outlaw talent.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

commented

Closing this out. Its done There may be one or two missing abilities but I have a way of handling them now.