Skip to content

Commit 7aa75aa

Browse files
authored
Merge pull request #39 from MidraLab/develop
v0.0.5
2 parents a5a02da + aa81d1c commit 7aa75aa

File tree

254 files changed

+180553
-193658
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+180553
-193658
lines changed

.editorconfig

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
2+
[*]
3+
charset = utf-8-bom
4+
end_of_line = crlf
5+
trim_trailing_whitespace = false
6+
insert_final_newline = false
7+
indent_style = space
8+
indent_size = 4
9+
10+
# Microsoft .NET properties
11+
csharp_new_line_before_catch = false
12+
csharp_new_line_before_else = false
13+
csharp_new_line_before_finally = false
14+
csharp_new_line_before_members_in_object_initializers = false
15+
csharp_preferred_modifier_order = public, private, protected, internal, file, new, static, abstract, virtual, sealed, readonly, override, extern, unsafe, volatile, async, required:suggestion
16+
csharp_style_namespace_declarations = block_scoped:suggestion
17+
csharp_style_prefer_utf8_string_literals = true:suggestion
18+
csharp_style_var_elsewhere = true:suggestion
19+
csharp_style_var_for_built_in_types = true:suggestion
20+
csharp_style_var_when_type_is_apparent = true:suggestion
21+
dotnet_naming_rule.unity_serialized_field_rule.import_to_resharper = True
22+
dotnet_naming_rule.unity_serialized_field_rule.resharper_description = Unity serialized field
23+
dotnet_naming_rule.unity_serialized_field_rule.resharper_guid = 5f0fdb63-c892-4d2c-9324-15c80b22a7ef
24+
dotnet_naming_rule.unity_serialized_field_rule.severity = warning
25+
dotnet_naming_rule.unity_serialized_field_rule.style = lower_camel_case_style
26+
dotnet_naming_rule.unity_serialized_field_rule.symbols = unity_serialized_field_symbols
27+
dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
28+
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_accessibilities = *
29+
dotnet_naming_symbols.unity_serialized_field_symbols.applicable_kinds =
30+
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_applicable_kinds = unity_serialised_field
31+
dotnet_naming_symbols.unity_serialized_field_symbols.resharper_required_modifiers = instance
32+
dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
33+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
34+
dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
35+
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
36+
dotnet_style_predefined_type_for_member_access = true:suggestion
37+
dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
38+
39+
# ReSharper properties
40+
resharper_apply_auto_detected_rules = false
41+
resharper_autodetect_indent_settings = true
42+
resharper_braces_for_dowhile = required_for_multiline
43+
resharper_braces_for_foreach = required
44+
resharper_braces_for_ifelse = required
45+
resharper_braces_for_using = required_for_multiline_statement
46+
resharper_formatter_off_tag = @formatter:off
47+
resharper_formatter_on_tag = @formatter:on
48+
resharper_formatter_tags_enabled = true
49+
resharper_indent_preprocessor_directives = normal
50+
resharper_place_simple_anonymousmethod_on_single_line = false
51+
resharper_place_simple_case_statement_on_same_line = true
52+
resharper_place_simple_embedded_statement_on_same_line = false
53+
resharper_show_autodetect_configure_formatting_tip = false
54+
resharper_use_indent_from_vs = false
55+
resharper_wrap_for_stmt_header_style = wrap_if_long
56+
57+
# ReSharper inspection severities
58+
resharper_arrange_namespace_body_highlighting = hint
59+
resharper_arrange_redundant_parentheses_highlighting = hint
60+
resharper_arrange_this_qualifier_highlighting = none
61+
resharper_arrange_type_member_modifiers_highlighting = hint
62+
resharper_arrange_type_modifiers_highlighting = hint
63+
resharper_built_in_type_reference_style_for_member_access_highlighting = hint
64+
resharper_built_in_type_reference_style_highlighting = hint
65+
resharper_check_namespace_highlighting = none
66+
resharper_c_sharp_build_cs_invalid_module_name_highlighting = none
67+
resharper_enforce_do_while_statement_braces_highlighting = hint
68+
resharper_enforce_fixed_statement_braces_highlighting = hint
69+
resharper_enforce_foreach_statement_braces_highlighting = warning
70+
resharper_enforce_for_statement_braces_highlighting = hint
71+
resharper_enforce_if_statement_braces_highlighting = hint
72+
resharper_enforce_lock_statement_braces_highlighting = hint
73+
resharper_enforce_using_statement_braces_highlighting = hint
74+
resharper_enforce_while_statement_braces_highlighting = hint
75+
resharper_mvc_action_not_resolved_highlighting = warning
76+
resharper_mvc_area_not_resolved_highlighting = warning
77+
resharper_mvc_controller_not_resolved_highlighting = warning
78+
resharper_mvc_masterpage_not_resolved_highlighting = warning
79+
resharper_mvc_partial_view_not_resolved_highlighting = warning
80+
resharper_mvc_template_not_resolved_highlighting = warning
81+
resharper_mvc_view_component_not_resolved_highlighting = warning
82+
resharper_mvc_view_component_view_not_resolved_highlighting = warning
83+
resharper_mvc_view_not_resolved_highlighting = warning
84+
resharper_razor_assembly_not_resolved_highlighting = warning
85+
resharper_shift_expression_right_operand_not_equal_real_count_highlighting = none
86+
resharper_suggest_var_or_type_built_in_types_highlighting = hint
87+
resharper_suggest_var_or_type_elsewhere_highlighting = hint
88+
resharper_suggest_var_or_type_simple_types_highlighting = hint
89+
resharper_web_config_module_not_resolved_highlighting = warning
90+
resharper_web_config_type_not_resolved_highlighting = warning
91+
resharper_web_config_wrong_module_highlighting = warning
92+
93+
[{*.har,*.json,*.jsonc,*.postman_collection,*.postman_collection.json,*.postman_environment,*.postman_environment.json}]
94+
indent_style = space
95+
indent_size = 2
96+
97+
[{*.yaml,*.yml}]
98+
indent_style = space
99+
indent_size = 2
100+
101+
[*.asmdef]
102+
indent_style = space
103+
indent_size = 2
104+
105+
[*.asmref]
106+
indent_style = space
107+
indent_size = 2
108+
109+
[*.inputactions]
110+
indent_style = space
111+
indent_size = 2
112+
113+
[*.{appxmanifest,asax,ascx,aspx,axaml,blockshader,build,c,c++,c++m,cc,ccm,cginc,compute,cp,cpp,cppm,cs,cshtml,cu,cuh,cxx,cxxm,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,h++,hh,hlsl,hlsli,hlslinc,hp,hpp,hxx,icc,inc,inl,ino,ipp,ixx,master,ml,mli,mpp,mq4,mq5,mqh,mxx,nuspec,paml,razor,resw,resx,shader,shaderFoundry,skin,tcc,tpp,urtshader,usf,ush,uxml,vb,xaml,xamlx,xoml,xsd}]
114+
indent_style = space
115+
indent_size = 4
116+
tab_width = 4

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Bug Report
3+
about: Create a report to help us improve
4+
title: "[BUG] "
5+
labels: bug
6+
assignees: ''
7+
---
8+
9+
## バグの説明
10+
11+
バグの詳細を説明してください。何が期待され、実際には何が起こったのかを記述してください。
12+
13+
## 再現手順
14+
15+
1. どのようにバグを再現しましたか?(例: "設定 -> オプション -> 使用する")
16+
2. 同じ手順を行ったときに、何を見ましたか?
17+
18+
## 期待する結果
19+
20+
何を期待していたかを記述してください。
21+
22+
## スクリーンショット
23+
24+
可能であれば、問題のスクリーンショットを添付してください。
25+
26+
## 環境
27+
28+
- OS: [例: Windows, macOS]
29+
- Unityのバージョン: [例: 6000.0.31f1]
30+
- その他の依存関係:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: Feature Request
3+
about: Suggest an idea for this project
4+
title: "[FEATURE] "
5+
labels: enhancement
6+
assignees: ''
7+
---
8+
9+
## 機能の説明
10+
11+
この機能によって達成したいことを簡潔に説明してください。どのようなサポートが必要ですか?
12+
13+
## 使用例
14+
15+
どのようにこの機能が使用されるかの例を提供してください。
16+
17+
## 追加のコンテキスト
18+
19+
他の情報、関連するリンク、期待する結果のビジュアルなどがあれば追加してください。
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Pull Request
3+
about: Submit a pull request for review
4+
title: "[PR] "
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
## 概要
10+
11+
このプルリクエストで何を解決したのか、どのように貢献するのかを説明します。
12+
13+
## 変更内容
14+
15+
以下の点を詳しく説明してください:
16+
17+
- [ ] 変更した内容を簡潔にリストアップ
18+
- [ ] 新しい機能、修正されたバグ、その他の重要な変更について説明
19+
20+
## 関連するIssue
21+
22+
このPRに関連するIssueがあれば、リンクをここに記述してください (例: #123)。
23+
24+
## 検証手順
25+
26+
この変更をテストする手順を提供してください。
27+
28+
## その他のコンテキスト
29+
30+
追加の情報があればここに記述してください。

.github/scripts/translate_readme.py

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import openai
1+
from openai import OpenAI
22
import os
33

4+
client = OpenAI(api_key=os.environ["OPENAI_API_KEY"])
5+
46
def translate_text(text, target_language):
5-
openai.api_key = os.environ["OPENAI_API_KEY"]
6-
completion = openai.ChatCompletion.create(
7-
model="gpt-4o-mini",
7+
completion = client.chat.completions.create(
8+
model="gpt-4o-mini", # 使用するモデルの指定
89
messages=[
910
{"role": "system", "content": "You are a helpful assistant."},
1011
{"role": "user", "content": f"Translate the following text to {target_language}: {text}"}
1112
]
1213
)
13-
return completion.choices[0].message['content']
14+
# メッセージのコンテンツに直接アクセスする
15+
return completion.choices[0].message.content
1416

1517
def main():
1618
# Read the original README
@@ -27,5 +29,15 @@ def main():
2729
with open('README_CN.md', 'w', encoding='utf-8') as file:
2830
file.write(translated_cn)
2931

32+
# Translate to Spanish
33+
translated_es = translate_text(original_text, 'Spanish')
34+
with open('README_ES.md', 'w', encoding='utf-8') as file:
35+
file.write(translated_es)
36+
37+
# Translate to French
38+
translated_fr = translate_text(original_text, 'French')
39+
with open('README_FR.md', 'w', encoding='utf-8') as file:
40+
file.write(translated_fr)
41+
3042
if __name__ == "__main__":
3143
main()
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Check branch for PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
check_branch:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check PR branch
13+
run: |
14+
echo "The source branch for this PR is: ${{ github.head_ref }}"
15+
if [[ "${{ github.head_ref }}" != "develop" ]]; then
16+
echo "Warning: This PR is from the '${{ github.head_ref }}' branch. Please ensure this is intended."
17+
exit 1 # 失敗ステータスを返してPRをマージ不可にする
18+
else
19+
echo "This PR is from the correct branch (develop)."
20+
fi

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Run build
2+
23
on:
34
workflow_dispatch: {}
45
push:
@@ -10,7 +11,21 @@ on:
1011
types: [opened, synchronize, reopened]
1112

1213
jobs:
14+
check-branch:
15+
runs-on: ubuntu-latest
16+
if: github.event_name == 'pull_request' # PRイベントの場合にのみ実行
17+
steps:
18+
- name: Check PR branch
19+
run: |
20+
echo "The source branch for this PR is: ${{ github.head_ref }}"
21+
if [[ "${{ github.head_ref }}" == "develop" ]]; then
22+
echo "This PR is from the 'develop' branch. Proceeding with build."
23+
else
24+
echo "This PR is from the '${{ github.head_ref }}' branch. Non-develop branches are allowed."
25+
fi
26+
1327
build:
28+
needs: check-branch # check-branch ジョブの成功が必要
1429
name: Run builds for Windows, Mac
1530
strategy:
1631
fail-fast: false

.github/workflows/translate_readme.yml

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,57 @@ name: Translate README
22

33
on:
44
pull_request:
5+
branches:
6+
- develop
57
paths:
68
- README.md
79

810
jobs:
911
translate:
1012
runs-on: ubuntu-latest
1113
steps:
12-
- name: Checkout repository
13-
uses: actions/checkout@v2
14-
15-
- name: Set up Python
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: '3.x'
19-
20-
- name: Install OpenAI library
21-
run: pip install openai
22-
23-
- name: Run translation script
24-
env:
25-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
26-
run: python .github/scripts/translate_readme.py
27-
28-
- name: Commit changes
29-
run: |
30-
git config --local user.email "[email protected]"
31-
git config --local user.name "GitHub Action"
32-
git add README_EN.md README_CN.md
33-
git commit -m "Update translations" || echo "No changes to commit"
34-
git push
14+
- name: Checkout repository
15+
uses: actions/[email protected]
16+
17+
- name: Set up Python
18+
uses: actions/[email protected]
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install OpenAI library
23+
run: pip install openai
24+
25+
- name: Run translation script
26+
env:
27+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
28+
run: python .github/scripts/translate_readme.py
29+
30+
- name: Commit changes
31+
run: |
32+
git config --local user.email "[email protected]"
33+
git config --local user.name "GitHub Action"
34+
35+
# 変更をステージしてコミット
36+
git add README_EN.md README_CN.md README_ES.md README_FR.md
37+
if git commit -m "Update translations"; then
38+
echo "Changes committed successfully."
39+
40+
# Pullでリモートの最新の変更を取り込み、リベース
41+
if git pull --rebase origin ${{ github.head_ref }}; then
42+
echo "Successfully rebased."
43+
else
44+
echo "Rebase failed. Please review the errors."
45+
exit 1 # エラーが発生した場合、処理を中止
46+
fi
47+
48+
# スタッシュが必要かを確認
49+
if git stash list | grep -q "stash@{0}"; then
50+
# スタッシュが存在する場合はポップする
51+
git stash pop
52+
fi
53+
54+
# 最後にプッシュ
55+
git push origin HEAD:${{ github.head_ref }}
56+
else
57+
echo "No changes to commit"
58+
fi

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,5 @@ sysinfo.txt
156156
# End of https://www.toptal.com/developers/gitignore/api/unity,rider
157157

158158
uDesktopMascot.zip
159-
uDesktopMascotBuild/*
159+
uDesktopMascotBuild/*
160+
.vscode/*

Assets/AddressableAssetsData/link.xml.meta

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)