Skip to content

Commit

Permalink
ver1824*
Browse files Browse the repository at this point in the history
  • Loading branch information
xerysherry committed May 5, 2019
1 parent 1e3430f commit c71a285
Show file tree
Hide file tree
Showing 53 changed files with 2,829 additions and 551 deletions.
44 changes: 44 additions & 0 deletions Assets/Editor/MultiLanguageExport.cs
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());
}
}
13 changes: 13 additions & 0 deletions Assets/Editor/MultiLanguageExport.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions Assets/Resources/Lang.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 36 additions & 0 deletions Assets/Resources/Lang/default.txt
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
9 changes: 9 additions & 0 deletions Assets/Resources/Lang/default.txt.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Assets/Resources/Lang/en_us.txt
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?
9 changes: 9 additions & 0 deletions Assets/Resources/Lang/en_us.txt.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Assets/Resources/Lang/jp.txt
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]=ゲームを終了しますか?
9 changes: 9 additions & 0 deletions Assets/Resources/Lang/jp.txt.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions Assets/Resources/Lang/zh_cn.txt
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]=是否退出游戏?
9 changes: 9 additions & 0 deletions Assets/Resources/Lang/zh_cn.txt.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Assets/Resources/Prefab/FirstWindow.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: uEmu<color=red>e</color><color=green>r</color><color=blue>a</color>
m_Text: "\u6E38\u620F\u5217\u8868"
--- !u!114 &114700731858044910
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -722,6 +722,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fe6de2d7c9cca4548b81ffbb37325288, type: 3}
m_Name:
m_EditorClassIdentifier:
titlebar: {fileID: 114698434613624444}
--- !u!114 &114956849330662536
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
Loading

0 comments on commit c71a285

Please sign in to comment.