Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Live translations
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-downing committed Mar 19, 2016
1 parent 632a15d commit a052de9
Showing 1 changed file with 177 additions and 1 deletion.
178 changes: 177 additions & 1 deletion src/model/live.go
Expand Up @@ -7,22 +7,198 @@ import (

type signal struct{}

var liveEntriesLit []string = []string{
"Acrobatics",
"Aegis Level",
"Alchemist Level",
"Appraise",
"Arcanist Level",
"Archivist Level",
"Ardent Level",
"Artificer Level",
"Athletics",
"Autohypnosis",
"Balance",
"Barbarian Level",
"Bard Level",
"Battle Dancer Level",
"Beguiler Level",
"Binder Level",
"Bloodrager Level",
"Bluff",
"Brawler Level",
"Cavalier Level",
"Cleric Level",
"Climb",
"Concentration",
"Control Shape",
"Crusader Level",
"Cryptic Level",
"Death Master Level",
"Decipher Script",
"Diplomacy",
"Disable Device",
"Disarm Traps",
"Disguise",
"Divine Mind Level",
"Dragon Shaman Level",
"Dragonfire Adept Level",
"Dread Level",
"Dread Necromancer Level",
"Druid Level",
"Duskblade Level",
"Eidolon Level",
"Escape Artist",
"Factotum Level",
"Favoured Soul Level",
"Fighter Level",
"Finesse",
"Fly",
"Forgery",
"Gather Information",
"Gunslinger Level",
"Handle Animal",
"Heal",
"Hexblade Level",
"Hide",
"High Guard Level",
"Hunter Level",
"Iaijutsu Focus",
"Imperial Man-at-arms Level",
"Incarnate Level",
"Influence",
"Inquisitor Level",
"Intimidate",
"Investigator Level",
"Jester Level",
"Jump",
"Khalid Asad Level",
"Knowledge (aeronautics)",
"Knowledge (arcana)",
"Knowledge (dungeoneering)",
"Knowledge (engineering)",
"Knowledge (geography)",
"Knowledge (history)",
"Knowledge (local)",
"Knowledge (nature)",
"Knowledge (nobility)",
"Knowledge (planes)",
"Knowledge (psionics)",
"Knowledge (religion)",
"Linguistics",
"Listen",
"Locate Traps",
"Lurk Level",
"Magus Level",
"Marksman Level",
"Martial Adept Level",
"Martial Lore",
"Monk Level",
"Mountebank Level",
"Move Silently",
"Mythic Level",
"Nature",
"Ninja Level",
"Open Lock",
"Oracle Level",
"Paladin Level",
"Panther Warrior Level",
"Perception",
"Perform (act)",
"Perform (comedy)",
"Perform (dance)",
"Perform (keyboard)",
"Perform (oratory)",
"Perform (percussion)",
"Perform (string)",
"Perform (wind)",
"Perform (sing)",
"Performance",
"Prepared Level",
"Prestige Level",
"Priest Level",
"Psicraft",
"Psion Level",
"Psychic Warrior Level",
"Ranger Level",
"Religion",
"Ride",
"Rogue Level",
"Samurai Level",
"Savant Level",
"Scout Level",
"Scry",
"Search",
"Sense Motive",
"Sha'ir Level",
"Shadowcaster Level",
"Shaman Level",
"Shugenja Level",
"Skald Level",
"Slayer Level",
"Sleight of Hand",
"Society",
"Sorcerer Level",
"Soulborn Level",
"Soulknife Level",
"Spellcaster Level",
"Spellcraft",
"Spellthief Level",
"Spirit Shaman Level",
"Spontaneous Level",
"Spot",
"Stealth",
"Summoner Level",
"Survival",
"Swashbuckler Level",
"Swim",
"Swordsage Level",
"Tactician Level",
"Totemist Level",
"Track",
"Truenamer Level",
"Truespeak",
"Tumble",
"Urban Druid Level",
"Use Magic Device",
"Use Rope",
"Vitalist Level",
"Warblade Level",
"Warlock Level",
"Warmage Level",
"Warpriest Level",
"Wild Empathy",
"Wilder Level",
"Witch Hunter Level",
"Witch Level",
"Wizard Level",
"Wu Jen Level",
"Wyrdcaster Level",
}

func liveEntries() []*StackedEntry {
// scan for classes, skills etc
strings := make(map[string]signal, 512)
for _, game := range []string{"pathfinder", "dnd35"} {
gameData := ReadGameData(game)
if gameData != nil {
// All skills
// string += gameData skills | { ^ displayName }
for _, skill := range gameData.Skills {
strings[skill.SkillName()] = signal{}
}

// All classes
// strings += gameData class | { ^ displayName }
for _, class := range gameData.Classes {
strings[class.Name+" Level"] = signal{}
}
}
}
// bring in the manual list as well, just to make sure
for _, str := range liveEntriesLit {
strings[str] = signal{}
}

entries := make([]*Entry, 0, len(strings))
for str, _ := range strings {
Expand Down Expand Up @@ -56,7 +232,7 @@ func GetLiveTranslations() []byte {
}
}
}
// fmt.Println(" -", language, "-", len(languageTranslations), "translations")
fmt.Println(" -", language, "-", len(languageTranslations), "translations")

if len(languageTranslations) > 0 {
liveTranslations.Languages = append(liveTranslations.Languages, LiveTranslationsLanguage{
Expand Down

0 comments on commit a052de9

Please sign in to comment.