-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,4 +10,5 @@ sub packages and modules | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
locale <locale/__init__> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
locale | ||
====== | ||
|
||
.. automodule:: wotlkdoc.locale | ||
:members: | ||
|
||
sub packages and modules | ||
------------------------ | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
gspread-pandas | ||
loc | ||
pandas_mate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from loc import Locale, LocDict | ||
import pandas as pd | ||
from pathlib_mate import PathCls as Path | ||
|
||
TAB = "\t" | ||
DATA_DIR = Path(Path(__file__).change(new_basename="data")) | ||
|
||
|
||
def read_loc_dict(file): | ||
df = pd.read_csv(Path(DATA_DIR, file).abspath, sep=TAB) | ||
ld = LocDict(data=df.to_dict(orient="list")) | ||
return ld | ||
|
||
|
||
ld_wotlk = read_loc_dict("wotlk-dict.txt") | ||
|
||
|
||
def trim_space(): | ||
for p in DATA_DIR.select_by_ext(".txt"): | ||
df = pd.read_csv(p.abspath, sep=TAB) | ||
df = df.applymap(str.strip) | ||
df.to_csv(p.abspath, index=False, sep=TAB) | ||
|
||
|
||
if __name__ == "__main__": | ||
trim_space() | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
zh-CN en-US | ||
经典旧世 Vanilla | ||
燃烧的远征 TBC | ||
巫妖王之怒 WLK | ||
战士 Warrior | ||
圣骑士 Paladin | ||
死亡骑士 Death Knight | ||
猎人 Hunter | ||
萨满 Shaman | ||
盗贼 Rogue | ||
德鲁伊 Druid | ||
法师 Mage | ||
术士 Warlock | ||
牧师 Presis | ||
锻造 Blacksmithing | ||
制皮 Leatherworking | ||
裁缝 Tailoring | ||
采药 Herbalsim | ||
炼金 Alchemy | ||
采矿 Mining | ||
剥皮 Skinning | ||
附魔 Enchanting | ||
工程学 Engineering | ||
珠宝加工 Jewelcrafting | ||
铭文 Inscription | ||
火焰 Fire | ||
冰霜 Frost | ||
奥术 Arcane | ||
自然 Nature | ||
暗影 Shadow | ||
神圣 Holy | ||
联盟 Alliance | ||
部落 Horde | ||
小队副本 Dungeon | ||
团队副本 Raid | ||
职业 Class | ||
职业技能 Class Skill | ||
职业技能训练师 Class Skill Trainer | ||
商业技能 Trade Skill | ||
商业技能训练师 Trade Skill Trainer | ||
任务 Quest | ||
职业任务 Class Quest | ||
普通 Common | ||
优秀 Uncommon | ||
精良 Rare | ||
史诗 Epic | ||
传奇 Legendary |