-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Text; | ||
using UnityEngine; | ||
using UnityEditor; | ||
|
||
public static class MultiLanguageExport | ||
{ | ||
static string GetPath(Transform t) | ||
{ | ||
var p = t.name; | ||
while(t.parent != null) | ||
{ | ||
t = t.parent; | ||
p = string.Concat(t.name, ".", p); | ||
} | ||
return p; | ||
} | ||
|
||
[MenuItem("Tools/MultiLanguageExport", false, 100)] | ||
public static void Show() | ||
{ | ||
var dir = Application.dataPath + "/Resources/Lang/default.txt"; | ||
var scene = UnityEngine.SceneManagement.SceneManager.GetActiveScene(); | ||
|
||
var objs = scene.GetRootGameObjects(); | ||
var texts = new List<UnityEngine.UI.Text>(); | ||
for(int i = 0; i < objs.Length; ++i) | ||
{ | ||
Debug.Log(objs[i].name); | ||
texts.AddRange(objs[i].GetComponentsInChildren<UnityEngine.UI.Text>(true)); | ||
} | ||
|
||
var sb = new StringBuilder(); | ||
sb.AppendLine(";Default Language"); | ||
for(int i = 0; i < texts.Count; ++i) | ||
{ | ||
var t = texts[i]; | ||
sb.AppendLine(string.Format("{0}={1}", GetPath(t.transform), t.text)); | ||
} | ||
File.WriteAllText(dir, sb.ToString()); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
;Default Language | ||
Options.Template.template_button.Text=BUTTON | ||
Options.Buttons.inputpad.inputfield.Text= | ||
Options.Buttons.scalepad.scaler.Handle Slide Area.Handle.Text=1x | ||
Options.Buttons.inprocess.char1=少 | ||
Options.Buttons.inprocess.char2=女 | ||
Options.Buttons.inprocess.char3=祈 | ||
Options.Buttons.inprocess.char4=祷 | ||
Options.Buttons.inprocess.char5=中 | ||
Options.Buttons.inprocess.char6=。 | ||
Options.Buttons.inprocess.char7=。 | ||
Options.Buttons.inprocess.char8=。 | ||
Options.MsgBox.border.titlebar.title= | ||
Options.MsgBox.border.content= | ||
Options.MenuPad.Menu1.resolution.Text=设置分辨率 | ||
Options.MenuPad.Menu1.language.Text=语言选择 | ||
Options.MenuPad.Menu1.exit.Text=退出游戏 | ||
Options.MenuPad.Menu2.back.Text=回到选单 | ||
Options.MenuPad.Menu2.savelog.Text=保存日志 | ||
Options.MenuPad.Menu2.gototitle.Text=回到标题 | ||
Options.MenuPad.Menu2.restart.Text=重新加载 | ||
Options.MenuPad.Menu2.exit.Text=退出游戏 | ||
Options.Resolution.Pad.1080p.Text=1080p | ||
Options.Resolution.Pad.900p.Text= 900p | ||
Options.Resolution.Pad.720p.Text= 720p | ||
Options.Resolution.Pad.540p.Text= 540p | ||
Options.LanguageBox.border.titlebar.title=语言选择 | ||
Options.LanguageBox.border.zh_cn.Text=简体中文 | ||
Options.LanguageBox.border.jp.Text=日本語 | ||
Options.LanguageBox.border.en_us.Text=English | ||
FirstWindow.Titlebar.title=游戏列表 | ||
FirstWindow.Item.name=Itemname | ||
FirstWindow.Item.path=Directory | ||
FirstWindow.author=https://github.com/xerysherry/uEmuera | ||
FirstWindow.version=0.00 | ||
EmueraMain.Template.template_text=uEmuera |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
;EN-US | ||
Options.MenuPad.Menu1.resolution.Text=Resolution | ||
Options.MenuPad.Menu1.language.Text=Language | ||
Options.MenuPad.Menu1.exit.Text=Exit | ||
Options.MenuPad.Menu2.back.Text=Back To Menu | ||
Options.MenuPad.Menu2.savelog.Text=Save Log | ||
Options.MenuPad.Menu2.gototitle.Text=Back To Title | ||
Options.MenuPad.Menu2.restart.Text=Reload | ||
Options.MenuPad.Menu2.exit.Text=Exit | ||
Options.LanguageBox.border.titlebar.title=Choose Language | ||
FirstWindow.Titlebar.title=Game List | ||
<Menu1>=200 | ||
<Menu2>=240 | ||
[Wait]=Wait | ||
[WaitContent]=Wait Processing Finish! | ||
[ReloadGame]=Reload Game | ||
[ReloadGameContent]=Will reload game. Are you sure? | ||
[BackMenu]=Back To Menu | ||
[BackMenuContent]=Will back to menu. Are you sure? | ||
[BackTitle]=Back To title | ||
[BackTitleContent]=Will back to title. Are you sure? | ||
[SaveLog]=Save Log | ||
[SavePath]=Log Path | ||
[Failure]=Failure | ||
[Exit]=Exit | ||
[ExitContent]=Will exit. Are you sure? |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
;JP | ||
Options.MenuPad.Menu1.resolution.Text=解像度を設定します | ||
Options.MenuPad.Menu1.language.Text=言語の選択 | ||
Options.MenuPad.Menu1.exit.Text=ゲームを終了します | ||
Options.MenuPad.Menu2.back.Text=メニューに戻る | ||
Options.MenuPad.Menu2.savelog.Text=ログを保存する | ||
Options.MenuPad.Menu2.gototitle.Text=タイトルに戻る | ||
Options.MenuPad.Menu2.restart.Text=再読み込み | ||
Options.MenuPad.Menu2.exit.Text=ゲームを終了する | ||
Options.LanguageBox.border.titlebar.title=言語の選択 | ||
FirstWindow.Titlebar.title=ゲームリスト | ||
<Menu1>=310 | ||
<Menu2>=280 | ||
[Wait]=待機中 | ||
[WaitContent]=コアが終了するのを待ってください。 | ||
[ReloadGame]=ゲームをリロードします | ||
[ReloadGameContent]=ゲームをリロードしますか? | ||
[BackMenu]=メニューに戻る | ||
[BackMenuContent]=メニューに戻りますか? | ||
[BackTitle]=タイトルに戻る | ||
[BackTitleContent]=タイトルに戻りますか? | ||
[SaveLog]=ログを保存 | ||
[SavePath]=ログパス | ||
[Failure]=失敗 | ||
[Exit]=ゲームを終了します | ||
[ExitContent]=ゲームを終了しますか? |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
;ZH-CN | ||
Options.MenuPad.Menu1.resolution.Text=设置分辨率 | ||
Options.MenuPad.Menu1.language.Text=语言选择 | ||
Options.MenuPad.Menu1.exit.Text=退出游戏 | ||
Options.MenuPad.Menu2.back.Text=回到选单 | ||
Options.MenuPad.Menu2.savelog.Text=保存日志 | ||
Options.MenuPad.Menu2.gototitle.Text=回到标题 | ||
Options.MenuPad.Menu2.restart.Text=重新加载 | ||
Options.MenuPad.Menu2.exit.Text=退出游戏 | ||
Options.LanguageBox.border.titlebar.title=语言选择 | ||
FirstWindow.Titlebar.title=游戏列表 | ||
<Menu1>=200 | ||
<Menu2>=200 | ||
[Wait]=等待 | ||
[WaitContent]=请等待核心完成! | ||
[ReloadGame]=重新加载游戏 | ||
[ReloadGameContent]=是否重新加载游戏? | ||
[BackMenu]=回到选单 | ||
[BackMenuContent]=是否回到选单? | ||
[BackTitle]=回到标题 | ||
[BackTitleContent]=是否回到标题? | ||
[SaveLog]=保存日志 | ||
[SavePath]=日志路径 | ||
[Failure]=失败 | ||
[Exit]=退出游戏 | ||
[ExitContent]=是否退出游戏? |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.