Skip to content

Commit f0154bd

Browse files
committed
fix(Localization): update Chinese comments for clarity and consistency
1 parent c57d944 commit f0154bd

602 files changed

Lines changed: 6709 additions & 6041 deletions

File tree

Some content is hidden

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

Audio/AudioAdaptiveMusicDirector.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace STS2RitsuLib.Audio
44
{
55
/// <summary>
66
/// Coordinates adaptive room/combat/victory music playback in response to game lifecycle transitions.
7-
/// 中文说明:Coordinates adaptive room/combat/victory music playback in response to game lifecycle transitions.
7+
/// 根据游戏生命周期转换,协调自适应房间/战斗/胜利音乐播放。
88
/// </summary>
99
public sealed class AudioAdaptiveMusicDirector : IDisposable
1010
{
@@ -33,13 +33,13 @@ private AudioAdaptiveMusicDirector()
3333

3434
/// <summary>
3535
/// Shared singleton director.
36-
/// 中文说明:Shared singleton director.
36+
/// 共享的单例 director
3737
/// </summary>
3838
public static AudioAdaptiveMusicDirector Shared { get; } = new();
3939

4040
/// <summary>
4141
/// Disposes framework lifecycle subscriptions owned by this director.
42-
/// Disposes framework lifecycle subscriptions owned 通过 this director.
42+
/// 释放此 director 拥有的框架生命周期订阅。
4343
/// </summary>
4444
public void Dispose()
4545
{
@@ -54,7 +54,7 @@ public void Dispose()
5454

5555
/// <summary>
5656
/// Starts following the supplied adaptive music plan and returns a handle for later shutdown.
57-
/// Starts following the supplied adaptive music plan 和 返回 a handle 用于 later shutdown.
57+
/// 开始跟随提供的自适应音乐计划,并返回用于稍后关闭的句柄。
5858
/// </summary>
5959
public AudioAdaptiveMusicHandle Attach(AudioAdaptiveMusicPlan plan)
6060
{
@@ -66,7 +66,7 @@ public AudioAdaptiveMusicHandle Attach(AudioAdaptiveMusicPlan plan)
6666

6767
/// <summary>
6868
/// Removes a previously attached adaptive music handle from lifecycle tracking.
69-
/// Removes a previously attached adaptive music handle 从 lifecycle tracking.
69+
/// 从生命周期跟踪中移除先前附加的自适应音乐句柄。
7070
/// </summary>
7171
public void Detach(AudioAdaptiveMusicHandle handle)
7272
{

Audio/AudioAdaptiveMusicHandle.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace STS2RitsuLib.Audio
22
{
33
/// <summary>
44
/// Represents an active adaptive music binding that can switch tracks and restore vanilla state when stopped.
5-
/// Represents an active adaptive music binding that can switch tracks 和 restore 原版 state 当 stopped.
5+
/// 表示一个活动的自适应音乐绑定,可切换曲目,并在停止时恢复原版状态。
66
/// </summary>
77
public sealed class AudioAdaptiveMusicHandle : IDisposable
88
{
@@ -17,7 +17,7 @@ internal AudioAdaptiveMusicHandle(AudioAdaptiveMusicPlan plan)
1717

1818
/// <summary>
1919
/// Stops adaptive playback and unregisters this handle from the shared director.
20-
/// Stops adaptive playback 和 unregisters this handle 从 the shared director.
20+
/// 停止自适应播放,并从共享 director 注销此句柄。
2121
/// </summary>
2222
public void Dispose()
2323
{
@@ -42,7 +42,7 @@ internal void RefreshVolume(float volume)
4242

4343
/// <summary>
4444
/// Stops the current adaptive override and optionally restores vanilla run music.
45-
/// Stops the current adaptive override 和 可选ly restores 原版 跑局 music.
45+
/// 停止当前自适应覆盖,并可选择恢复原版跑局音乐。
4646
/// </summary>
4747
public void Stop(bool restoreVanillaMusic = true)
4848
{

Audio/AudioAdaptiveMusicPlan.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,61 @@ namespace STS2RitsuLib.Audio
22
{
33
/// <summary>
44
/// Declares room/combat/victory music sources that should follow the game's lifecycle transitions.
5-
/// 中文说明:Declares room/combat/victory music sources that should follow the game's lifecycle transitions.
5+
/// 声明应跟随游戏生命周期转换的房间/战斗/胜利音乐源。
66
/// </summary>
77
public sealed class AudioAdaptiveMusicPlan
88
{
99
/// <summary>
1010
/// Music source to use while the player is in a room outside combat.
11-
/// Music source to 使用 while the player is in a room outside combat.
11+
/// 玩家处于非战斗房间时使用的音乐源。
1212
/// </summary>
1313
public AudioSource? RoomSource { get; init; }
1414

1515
/// <summary>
1616
/// Music source to use while combat is active.
17-
/// Music source to 使用 while combat is active.
17+
/// 战斗进行时使用的音乐源。
1818
/// </summary>
1919
public AudioSource? CombatSource { get; init; }
2020

2121
/// <summary>
2222
/// Music source to use after combat victory, when provided.
23-
/// Music source to 使用 之后 combat victory, 当 provided.
23+
/// 提供后,在战斗胜利后使用的音乐源。
2424
/// </summary>
2525
public AudioSource? VictorySource { get; init; }
2626

2727
/// <summary>
2828
/// Restores vanilla run music when the adaptive handle is stopped.
29-
/// Restores 原版 跑局 music 当 the adaptive handle is stopped.
29+
/// 自适应句柄停止时恢复原版跑局音乐。
3030
/// </summary>
3131
public bool RestoreVanillaMusicOnStop { get; init; } = true;
3232

3333
/// <summary>
3434
/// Restores vanilla run music after combat ends instead of returning to the room override.
35-
/// Restores 原版 跑局 music 之后 combat ends instead of 返回ing to the room override.
35+
/// 战斗结束后恢复原版跑局音乐,而不是返回房间覆盖。
3636
/// </summary>
3737
public bool RestoreVanillaMusicOnCombatEnd { get; init; } = true;
3838

3939
/// <summary>
4040
/// Refreshes vanilla room track and ambience when entering a room with no room override.
41-
/// Refreshes 原版 room track 和 ambience 当 entering a room 带有 no room override.
41+
/// 进入没有房间覆盖的房间时刷新原版房间曲目和环境音。
4242
/// </summary>
4343
public bool RefreshVanillaRoomStateOnRoomEnter { get; init; } = true;
4444

4545
/// <summary>
4646
/// Playback options applied when starting room music.
47-
/// Playback options applied 当 starting room music.
47+
/// 启动房间音乐时应用的播放选项。
4848
/// </summary>
4949
public AudioPlaybackOptions RoomOptions { get; init; } = new() { Scope = AudioLifecycleScope.Room };
5050

5151
/// <summary>
5252
/// Playback options applied when starting combat music.
53-
/// Playback options applied 当 starting combat music.
53+
/// 启动战斗音乐时应用的播放选项。
5454
/// </summary>
5555
public AudioPlaybackOptions CombatOptions { get; init; } = new() { Scope = AudioLifecycleScope.Combat };
5656

5757
/// <summary>
5858
/// Playback options applied when starting victory music.
59-
/// Playback options applied 当 starting victory music.
59+
/// 启动胜利音乐时应用的播放选项。
6060
/// </summary>
6161
public AudioPlaybackOptions VictoryOptions { get; init; } = new() { Scope = AudioLifecycleScope.Combat };
6262
}

Audio/AudioAdaptivePlans.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ namespace STS2RitsuLib.Audio
22
{
33
/// <summary>
44
/// Convenience builders for common adaptive music override patterns.
5-
/// Convenience builders 用于 common adaptive music override patterns.
5+
/// 常见自适应音乐覆盖模式的便捷构建器。
66
/// </summary>
77
public static class AudioAdaptivePlans
88
{
99
/// <summary>
1010
/// Builds a plan that overrides combat music and optionally room and victory transitions.
11-
/// Builds a plan that overrides combat music 和 可选ly room 和 victory transitions.
11+
/// 构建覆盖战斗音乐,并可选择处理房间和胜利转换的计划。
1212
/// </summary>
1313
public static AudioAdaptiveMusicPlan CombatOverride(
1414
AudioSource combatSource,
@@ -31,9 +31,8 @@ public static AudioAdaptiveMusicPlan CombatOverride(
3131

3232
/// <summary>
3333
/// Builds a plan that supplies room and combat overrides for the full run without restoring vanilla music after
34-
/// Builds a plan that supplies room 和 combat overrides 用于 the full 跑局 带有out restoring 原版 music 之后
3534
/// combat.
36-
/// 中文说明:combat.
35+
/// 构建在整个跑局中提供房间和战斗覆盖,且战斗后不恢复原版音乐的计划。
3736
/// </summary>
3837
public static AudioAdaptiveMusicPlan FullRunOverride(
3938
AudioSource roomSource,

Audio/AudioChannelMode.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ namespace STS2RitsuLib.Audio
22
{
33
/// <summary>
44
/// How a named channel should behave when new playback arrives.
5-
/// How a named channel should behave 当 new playback arrives.
5+
/// 命名通道在新播放到达时应如何处理。
66
/// </summary>
77
public enum AudioChannelMode
88
{
99
/// <summary>
1010
/// Keep the existing playback and ignore the new request.
11-
/// Keep the existing playback 和 ignore the new request.
11+
/// 保留现有播放并忽略新请求。
1212
/// </summary>
1313
KeepExisting = 0,
1414

1515
/// <summary>
1616
/// Stop the existing playback and replace it with the new one.
17-
/// Stop the existing playback 和 replace it 带有 the new one.
17+
/// 停止现有播放并用新播放替换。
1818
/// </summary>
1919
ReplaceExisting = 1,
2020
}

Audio/AudioChannelRegistry.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace STS2RitsuLib.Audio
55
{
66
/// <summary>
77
/// Tracks named channels and tagged playback groups for higher-level replacement and bulk stop semantics.
8-
/// Tracks named channels 和 tagged playback groups 用于 higher-level replacement 和 bulk stop semantics.
8+
/// 跟踪命名通道和带标签的播放组,用于更高层的替换和批量停止语义。
99
/// </summary>
1010
public sealed class AudioChannelRegistry
1111
{
@@ -20,13 +20,13 @@ private AudioChannelRegistry()
2020

2121
/// <summary>
2222
/// Shared singleton registry.
23-
/// Shared singleton 注册表.
23+
/// 共享的单例注册表。
2424
/// </summary>
2525
public static AudioChannelRegistry Shared { get; } = new();
2626

2727
/// <summary>
2828
/// Claims a named channel for a handle, optionally replacing the currently attached playback.
29-
/// Claims a named channel 用于 a handle, 可选ly replacing the currently attached playback.
29+
/// 为句柄占用命名通道,并可选择替换当前附加的播放。
3030
/// </summary>
3131
public bool TryClaimChannel(string channel, IAudioHandle handle, AudioChannelMode mode, bool allowFadeOut)
3232
{
@@ -55,7 +55,7 @@ public bool TryClaimChannel(string channel, IAudioHandle handle, AudioChannelMod
5555

5656
/// <summary>
5757
/// Removes a handle from any named channel it currently owns.
58-
/// Removes a handle 从 any named channel it currently owns.
58+
/// 从句柄当前拥有的任何命名通道中移除该句柄。
5959
/// </summary>
6060
public void ReleaseChannel(IAudioHandle handle)
6161
{
@@ -66,7 +66,7 @@ public void ReleaseChannel(IAudioHandle handle)
6666

6767
/// <summary>
6868
/// Attaches a handle to a tag group for later bulk stop operations.
69-
/// Attaches a handle to a tag group 用于 later bulk stop operations.
69+
/// 将句柄附加到标签组,以便稍后执行批量停止操作。
7070
/// </summary>
7171
public void AttachTag(string tag, IAudioHandle handle)
7272
{
@@ -76,7 +76,7 @@ public void AttachTag(string tag, IAudioHandle handle)
7676

7777
/// <summary>
7878
/// Removes a handle from all tracked channels and tag groups.
79-
/// Removes a handle 从 all tracked channels 和 tag groups.
79+
/// 从所有已跟踪通道和标签组中移除句柄。
8080
/// </summary>
8181
public void Detach(IAudioHandle handle)
8282
{
@@ -87,7 +87,7 @@ public void Detach(IAudioHandle handle)
8787

8888
/// <summary>
8989
/// Stops and releases every handle attached to a tag group.
90-
/// Stops 和 releases every handle attached to a tag group.
90+
/// 停止并释放附加到标签组的每个句柄。
9191
/// </summary>
9292
public bool StopTag(string tag, bool allowFadeOut = true)
9393
{
@@ -108,7 +108,7 @@ public bool StopTag(string tag, bool allowFadeOut = true)
108108

109109
/// <summary>
110110
/// Stops and releases the handle currently attached to a named channel.
111-
/// Stops 和 releases the handle currently attached to a named channel.
111+
/// 停止并释放当前附加到命名通道的句柄。
112112
/// </summary>
113113
public bool StopChannel(string channel, bool allowFadeOut = true)
114114
{

Audio/AudioEventHandle.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ namespace STS2RitsuLib.Audio
44
{
55
/// <summary>
66
/// Typed handle for FMOD Studio event instances.
7-
/// Typed handle 用于 FMOD Studio 事件 instances.
7+
/// FMOD Studio 事件实例的类型化句柄。
88
/// </summary>
99
public sealed class AudioEventHandle : AudioHandleBase
1010
{
1111
/// <summary>
1212
/// Initializes a typed handle for an FMOD Studio event instance.
13-
/// 初始化 a typed handle for an FMOD Studio event instance
13+
/// FMOD Studio 事件实例初始化类型化句柄
1414
/// </summary>
1515
public AudioEventHandle(AudioSource source, AudioLifecycleScope scope, GodotObject? rawInstance)
1616
: base(source, scope, rawInstance)

Audio/AudioFileHandle.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ namespace STS2RitsuLib.Audio
44
{
55
/// <summary>
66
/// Typed handle for loose file and streaming-backed audio instances.
7-
/// Typed handle 用于 loose file 和 streaming-backed audio instances.
7+
/// 松散文件和流式音频实例的类型化句柄。
88
/// </summary>
99
public sealed class AudioFileHandle : AudioHandleBase
1010
{
1111
/// <summary>
1212
/// Initializes a typed handle for a loose file or streaming audio instance.
13-
/// 初始化 a typed handle for a loose file or streaming audio instance
13+
/// 为松散文件或流式音频实例初始化类型化句柄
1414
/// </summary>
1515
public AudioFileHandle(AudioSource source, AudioLifecycleScope scope, GodotObject? rawInstance)
1616
: base(source, scope, rawInstance)

Audio/AudioLifecycleRegistry.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace STS2RitsuLib.Audio
44
{
55
/// <summary>
66
/// Central registry that stops scoped handles when framework lifecycle events fire.
7-
/// Central 注册表 that stops scoped handles 当 framework lifecycle 事件s fire.
7+
/// 中央注册表,在框架生命周期事件触发时停止带作用域的句柄。
88
/// </summary>
99
public sealed class AudioLifecycleRegistry : IDisposable
1010
{
@@ -30,13 +30,13 @@ private AudioLifecycleRegistry()
3030

3131
/// <summary>
3232
/// Shared singleton registry.
33-
/// Shared singleton 注册表.
33+
/// 共享的单例注册表。
3434
/// </summary>
3535
public static AudioLifecycleRegistry Shared { get; } = new();
3636

3737
/// <summary>
3838
/// Disposes framework lifecycle subscriptions owned by this registry.
39-
/// Disposes framework lifecycle subscriptions owned 通过 this 注册表.
39+
/// 释放此注册表拥有的框架生命周期订阅。
4040
/// </summary>
4141
public void Dispose()
4242
{
@@ -47,7 +47,7 @@ public void Dispose()
4747

4848
/// <summary>
4949
/// Attaches a handle to either a manual token or a built-in scope.
50-
/// Attaches a handle to either a manual token 或 a built-in scope.
50+
/// 将句柄附加到手动 token 或内置作用域。
5151
/// </summary>
5252
public void Attach(IAudioHandle handle, AudioPlaybackOptions? options)
5353
{
@@ -65,7 +65,7 @@ public void Attach(IAudioHandle handle, AudioPlaybackOptions? options)
6565

6666
/// <summary>
6767
/// Removes a handle from all tracked scopes and tokens.
68-
/// Removes a handle 从 all tracked scopes 和 tokens.
68+
/// 从所有已跟踪作用域和 token 中移除句柄。
6969
/// </summary>
7070
public void Detach(IAudioHandle handle)
7171
{
@@ -78,7 +78,7 @@ public void Detach(IAudioHandle handle)
7878

7979
/// <summary>
8080
/// Stops and releases every handle attached to a built-in scope.
81-
/// Stops 和 releases every handle attached to a built-in scope.
81+
/// 停止并释放附加到内置作用域的每个句柄。
8282
/// </summary>
8383
public bool StopScope(AudioLifecycleScope scope, bool allowFadeOut = true)
8484
{
@@ -99,7 +99,7 @@ public bool StopScope(AudioLifecycleScope scope, bool allowFadeOut = true)
9999

100100
/// <summary>
101101
/// Stops and releases every handle attached to a manual token.
102-
/// Stops 和 releases every handle attached to a manual token.
102+
/// 停止并释放附加到手动 token 的每个句柄。
103103
/// </summary>
104104
public bool StopScope(AudioScopeToken token, bool allowFadeOut = true)
105105
{

Audio/AudioLifecycleScope.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,37 @@ namespace STS2RitsuLib.Audio
22
{
33
/// <summary>
44
/// Built-in lifecycle buckets for automatic audio cleanup.
5-
/// Built-in lifecycle buckets 用于 automatic audio cleanup.
5+
/// 用于自动音频清理的内置生命周期分组。
66
/// </summary>
77
public enum AudioLifecycleScope
88
{
99
/// <summary>
1010
/// Caller-managed only.
11-
/// 中文说明:Caller-managed only.
11+
/// 仅由调用方管理。
1212
/// </summary>
1313
Manual = 0,
1414

1515
/// <summary>
1616
/// Stops when combat ends.
17-
/// Stops 当 combat ends.
17+
/// 战斗结束时停止。
1818
/// </summary>
1919
Combat = 1,
2020

2121
/// <summary>
2222
/// Stops when the current room is exited.
23-
/// Stops 当 the current room is exited.
23+
/// 离开当前房间时停止。
2424
/// </summary>
2525
Room = 2,
2626

2727
/// <summary>
2828
/// Stops when the run ends.
29-
/// Stops 当 the 跑局 ends.
29+
/// 跑局结束时停止。
3030
/// </summary>
3131
Run = 3,
3232

3333
/// <summary>
3434
/// Reserved for screen-scoped flows.
35-
/// Reserved 用于 screen-scoped flows.
35+
/// 保留给屏幕作用域流程。
3636
/// </summary>
3737
Screen = 4,
3838
}

0 commit comments

Comments
 (0)