Skip to content
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d06afec
feat: support skse translation (#309)
Sieluna Dec 14, 2024
3cb34cb
fix: reorder loading order and improve utils
Sieluna Dec 14, 2024
92928ed
refactor: test more translations
Sieluna Dec 15, 2024
9e8d93f
style: 🎨 apply clang-format changes
Sieluna Dec 15, 2024
529e197
refactor: modified general setting
Sieluna Dec 15, 2024
d7ab57b
Merge branch 'localization' of https://github.com/Sieluna/skyrim-comm…
Sieluna Dec 15, 2024
27dee83
refactor: improve translation by Pentalimbed's advice
Sieluna Dec 15, 2024
aaa5ec2
refactor: small fix and more translations
Sieluna Dec 16, 2024
bdee7ad
feat: create font subset feature
Sieluna Dec 17, 2024
e939838
style: 🎨 apply clang-format changes
Sieluna Dec 17, 2024
8ac690a
feat: dynamic resolve args and better ci
Sieluna Dec 17, 2024
95f0f2c
style: 🎨 apply clang-format changes
Sieluna Dec 17, 2024
5c0aa19
fix: disable few configs and make more translations
Sieluna Dec 17, 2024
c292a71
fix: force build all latin
Sieluna Dec 17, 2024
4915cc8
fix: improve styles and fix string format
Sieluna Dec 18, 2024
5cbdfe9
fix: improve and add missing translations
Sieluna Dec 18, 2024
9a3a116
fix: improve japanese translations
Sieluna Dec 18, 2024
696b6a5
chore: test working-tree-encoding
Sieluna Dec 18, 2024
67b15ad
chore: bake utf8
Sieluna Dec 18, 2024
68827d5
fix: fix typos
Sieluna Dec 18, 2024
835afe2
feat: wip dynamic load font
Sieluna Dec 25, 2024
2abc221
fix: fix few mistakes
Sieluna Dec 25, 2024
ab30724
refactor: load font good
Sieluna Dec 25, 2024
861923e
style: 🎨 apply clang-format changes
Sieluna Dec 25, 2024
509a9ce
refactor: move warning closer to input
Sieluna Dec 25, 2024
e9136b8
style: 🎨 apply clang-format changes
Sieluna Dec 25, 2024
20f8d4d
ci: prepare translation json
Sieluna Dec 25, 2024
74e51e7
ci: wip loaklise integrate
Sieluna Dec 25, 2024
b79d59a
fix: fix a mistake
Sieluna Dec 25, 2024
aa21c67
ci: save cache in branch
Sieluna Dec 25, 2024
9dac59b
fix: try allow pr
Sieluna Dec 25, 2024
95c9f32
ci: force lokalise not create pr
Sieluna Dec 25, 2024
a51ca43
fix: incorrect iso mapping
Sieluna Dec 25, 2024
7e1151e
fix: bad fix
Sieluna Dec 25, 2024
74a5553
fix: none translates path
Sieluna Dec 26, 2024
3526de2
ci: wip drop the fucking action
Sieluna Dec 26, 2024
da69a4d
ci: use esm
Sieluna Dec 26, 2024
4234b04
ci: es module fix
Sieluna Dec 26, 2024
5c09b42
fix: number parse issue
Sieluna Dec 26, 2024
9f7984e
revert: address the issue
Sieluna Dec 26, 2024
2118b5e
fix: to executable
Sieluna Dec 26, 2024
31b82c4
ci: use relative path
Sieluna Dec 26, 2024
7de7b32
Merge remote-tracking branch 'upstream/dev' into localization
Sieluna Jul 14, 2025
60058b8
fix: few small fix
Sieluna Jul 14, 2025
bba85aa
chore: check translation failure
alandtse Jul 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Auto detect text files and perform LF normalization
* text=auto

**/Translations/*.txt text text working-tree-encoding=UTF-16LE-BOM eol=crlf
5 changes: 5 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
with:
submodules: recursive

- uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: "pip"

- uses: ilammy/[email protected]

- uses: lukka/[email protected]
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ build/
bin/
dist/
.vs*/
.idea/
CMakeUserPresets.json
shadertoolsconfig.json
.vscode
.vscode
fonts/
33 changes: 32 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ if(AUTO_PLUGIN_DEPLOYMENT)
copy_shaders.stamp
${DEPLOY_TARGET_HASHES}
)

if(NOT DEFINED ENV{CommunityShadersOutputDir})
message("When using AUTO_PLUGIN_DEPLOYMENT option, you need to set environment variable 'CommunityShadersOutputDir'")
endif()
Expand Down Expand Up @@ -265,3 +265,34 @@ if(AIO_ZIP_TO_DIST)
WORKING_DIRECTORY ${AIO_DIR}
)
endif()

# #######################################################################################################################
# # Generate font subset when translations updated
# #######################################################################################################################

find_package(Python3 COMPONENTS Interpreter)

if (Python3_Interpreter_FOUND)
set(SCRIPT "${CMAKE_SOURCE_DIR}/subset_font.py" CACHE STRING "Path to the Python script")
set(ORIGINAL_FONT "https://github.com/adobe-fonts/source-han-sans/raw/release/Variable/OTC/SourceHanSans-VF.ttf.ttc" CACHE STRING "Original font file URL or path")
set(SUBSET_FONT "${CMAKE_SOURCE_DIR}/package/Interface/CommunityShaders/Fonts/CommunityShaders.ttf" CACHE STRING "Output subset font file path")
set(TRANSLATIONS_DIR "${CMAKE_SOURCE_DIR}/package/Interface/Translations" CACHE STRING "Translations directory")

file(GLOB_RECURSE TRANSLATIONS CONFIGURE_DEPENDS "${TRANSLATIONS_DIR}/*")

add_custom_command(
OUTPUT "${SUBSET_FONT}"
COMMAND Python3::Interpreter "${SCRIPT}"
--input "${ORIGINAL_FONT}"
--output "${SUBSET_FONT}"
--text_dir "${TRANSLATIONS_DIR}"
DEPENDS ${TRANSLATIONS}
COMMENT "Generating subset font based on updated translations."
VERBATIM
)

add_custom_target(GenSubsetFont ALL DEPENDS "${SUBSET_FONT}")
add_dependencies(${PROJECT_NAME} GenSubsetFont)
else()
message(WARNING "Python3 not found: Skipping subset font generation logic.")
endif()
152 changes: 152 additions & 0 deletions package/Interface/Translations/CommunityShaders_chinese.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
; Menu::DrawSettings

$Community Shaders Version Community Shaders {}
$Save Settings 保存设置
$Load Settings 加载设置
$Clear Shader Cache 清除着色器缓存
$Clear Shader Cache Description 着色器缓存存储已编译的着色器,用于运行时替换默认着色器。 清除着色器缓存会导致在游戏需要加载着色器资源时重新编译。 此选项用于开发者热加载着色器。
$Clear Disk Cache 清除磁盘缓存
$Clear Disk Cache Description 磁盘缓存存储已编译的着色器文件,当着色器缓存时会自动创建。 若没有磁盘缓存,或者磁盘缓存已过期或无效,您将在左上角看到“正在编译着色器”。 完成此操作后,除了从磁盘缓存加载时,您将不再看到此消息。 如果您遇到问题,请手动删除磁盘缓存。
$Toggle Error Message 错误信息
$Toggle Error Message Description 隐藏或显示着色器错误消息。 若您的安装已损坏,可能会在游戏中看到错误。 请仔细检查您是否已更新所有功能以及您的加载顺序是否正确。 有关详细信息,请参阅CommunityShaders.log并检查Nexus Mods页面或Discord服务器。
$Feature Disabled Description 启动时已禁用。重新启用后请保存设置并重新启动。
$Feature Loading Description 功能等待重启生效。
$Enable at Boot 启动时启用
$Disable at Boot 启动时禁用
$Enabled 启用
$Disabled 禁用
$Enable 开启
$Disable 关闭
$Feature State Description{}{} 当前状态: {}。 启动时{}功能设置。 需要重启以重新启用。 这与删除 ini 文件相同。 此操作将消除功能对性能的影响。
$Restore Defaults 恢复默认设置
$Restore Defaults Description 将功能设置恢复为默认值。 您仍然需要保存设置以使这些更改生效。
$General 常规
$Advanced 高级
$Display 显示
$Core Features 核心功能
$Features 功能
$Unloaded Features 已上传功能
$Menu Description 请选择左侧的项目。

; Menu::DrawGeneralSettings

$Enable Shaders 开启着色器
$Enable Shaders Description 关闭此选项将禁用所有功能。
$Enable Disk Cache 开启磁盘缓存
$Enable Disk Cache Description 禁用后将无法从磁盘加载或保存着色器缓存。
$Enable Async 开启异步
$Enable Async Description 如果着色器尚未编译则跳过并替换,同时大幅加快编译速度。
$Keybindings 快捷键绑定
$Toggle Keybinding Description 按任意键设置为切换快捷键...
$Toggle Keybinding 切换快捷键:
$Effect Toggle Keybinding Description 按任意键为所有效果设置切换快捷键...
$Effect Toggle Keybinding 效果切换快捷键:
$Skip Compilation Keybinding Description 按任意键设置为跳过编译快捷键...
$Skip Compilation Keybinding 跳过编译快捷键:
$Theme 主题
$Sizes 尺寸
$Global Scale 全局缩放
$Main 主选项
$Window Padding 窗口内边距
$Frame Padding 框架填充
$Item Spacing 项目间距
$Item Inner Spacing 项目内部间距
$Indent Spacing 缩进间距
$Scrollbar Size 滚动条宽度
$Grab Min Size 抓取最小尺寸
$Borders 边框
$Window Border Size 窗口边框宽度
$Child Border Size 子窗口边框宽度
$Popup Border Size 弹出边框宽度
$Frame Border Size 框架边框宽度
$Tab Border Size 标签边框宽度
$Tab Bar Border Size 标签栏边框宽度
$Rounding 圆角
$Window Rounding 窗口圆角
$Child Rounding 子窗口圆角
$Frame Rounding 框架圆角
$Popup Rounding 弹窗圆角
$Scrollbar Rounding 滚动条圆角
$Grab Rounding 拖拽区域圆角
$Tab Rounding 标签圆角
$Tables 表格
$Cell Padding 单元格填充
$Table Angled Headers Angle 表格倾斜标题角度
$Widgets 控件
$Color Button Position 颜色按钮位置
$Color Button Position Option 左\0右\0
$Button Text Align 按钮文本对齐
$Button Text Align Description 当按钮尺寸大于文本内容时应用对齐。
$Selectable Text Align 可选文本对齐
$Selectable Text Align Description 当可选尺寸大于文本内容时应用对齐。
$Separator Text Border Size 分隔符文本边框宽度
$Separator Text Align 分隔符文本对齐
$Separator Text Padding 分隔符文本填充
$Log Slider Deadzone 日志滑块死区
$Docking 停靠
$Docking Splitter Size 停靠分隔符宽度
$Colors 颜色
$Status 状态
$Disabled Text 禁用文本
$Error Text 错误文本
$Restart Needed Text 重启需要文本
$Current Hotkey Text 当前热键文本
$Palette 调色板
$Simple Palette 简单调色板
$Full Palette 完整调色板
$Background 背景
$Text 文本
$Border 边框
$Filter colors 过滤颜色

; Menu::DrawAdvancedSettings

$Dump Shaders 注入着色器
$Dump Shaders Description 启动时注入着色器。此选项用于逆向着色器。
$Log Level 日志等级
$Log Level Description 日志等级。trace最详细的。默认info。
$Shader Defines 着色器定义
$Shader Defines Description 着色器编译的定义。以分号";"分隔。用空格清除。更改后重建着色器。计算着色器需要重新启动才能重新编译。
$Compiler Threads 编译器线程
$Compiler Threads Description 编译器可使用的线程数。线程越多,编译完成的速度越快,但可能会导致系统无响应。
$Background Compiler Threads 后台编译器线程
$Background Compiler Threads Description 游戏时编译器可使用的线程数。如果跳过启动编译,则激活该选项。线程越多,编译完成得越快,但可能会导致系统无响应。
$Test Interval 测试间隔
$Test Interval Description 设置从默认用户配置切换至测试配置等待的秒数。0表示禁用。非0表示启用测试模式。启用会将当前设置保存为测试配置。如果未更改任何设置,则不会产生任何影响。
$Enable File Watcher 开启文件监控
$Enable File Watcher Description 文件更改时自动重新编译着色器,用于开发。
$Dump Ini Settings 注入Ini配置
$Stop Blocking Shaders 停止拦截{}个着色器
$Stop Blocking Shaders Description 停止拦截Community Shaders的着色器。在调试游戏效果遇到错误时候,通过拦截着色器可以更容易确定哪个着色器存在问题时。当处于开发者模式,按PAGEUP和PAGEDOWN,则会启用拦截。指定的着色器将打印到日志文件中。
$Statistics 统计
$Replace Original Shaders 替换原有着色器
$Vertex Shader Description 替换Vertex Shaders。当关闭时,将禁用上述类型的自定义Vertex Shader。供开发人员测试注入着色器是否与原始效果匹配。
$Pixel Shader Description 替换Pixel Shaders. 当关闭时,将禁用上述类型的自定义Pixel Shader。供开发人员测试注入着色器是否与原始效果匹配。
$Compute Shader Description 替换Compute Shaders. 当关闭时,将禁用上述类型的自定义Pixel Shader。供开发人员测试注入着色器是否与原始效果匹配。

; Menu::DrawDisableAtBootSettings

$Disable at Boot 启动时禁用
$Disable at Boot Description 选择要在启动时禁用的功能。这与删除feature.ini文件相同。需要重新启动才能重新启用。
$Special Features 特殊功能

; Menu::DrawDisplaySettings

$Display Feature Description{} {{}}已在启动时禁用。在“高级”->“启动时禁用”菜单中重新启用。
$Display Disabled Description 由于Skyrim Upscaler而禁用显示选项

; Menu::DrawFooter

$Game Version 游戏版本: {} {}
$D3D12 Interop D3D12交互: {}
$Active 开启
$Inactive 关闭

; Menu::DrawOverlay

$Compiling Shaders 正在编译着色器: {}
$Background Compiling Shaders 正在后台编译着色器: {}
$Shader Compilation Info 着色器编译信息
$Skip Compilation 按{}键跳过着色器编译。
$Skip Compilation Description 警告: 未编译的着色器在加载时会导致出现错误效果或导致卡顿。
$Skip Compilation Error Description 错误: {}个着色器编译失败。请查看安装和CommunityShaders.log日志。
152 changes: 152 additions & 0 deletions package/Interface/Translations/CommunityShaders_english.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
; Menu::DrawSettings

$Community Shaders Version Community Shaders {}
$Save Settings Save Settings
$Load Settings Load Settings
$Clear Shader Cache Clear Shader Cache
$Clear Shader Cache Description The Shader Cache is the collection of compiled shaders which replace the vanilla shaders at runtime. Clearing the shader cache will mean that shaders are recompiled only when the game re-encounters them. This is only needed for hot-loading shaders for development purposes.
$Clear Disk Cache Clear Disk Cache
$Clear Disk Cache Description The Disk Cache is a collection of compiled shaders on disk, which are automatically created when shaders are added to the Shader Cache. If you do not have a Disk Cache, or it is outdated or invalid, you will see "Compiling Shaders" in the upper-left corner. After this has completed you will no longer see this message apart from when loading from the Disk Cache. Only delete the Disk Cache manually if you are encountering issues.
$Toggle Error Message Toggle Error Message
$Toggle Error Message Description Hide or show the shader failure message. Your installation is broken and will likely see errors in game. Please double check you have updated all features and that your load order is correct. See CommunityShaders.log for details and check the Nexus Mods page or Discord server.
$Feature Disabled Description Disabled at boot. Reenable, save settings, and restart.
$Feature Loading Description Feature pending restart.
$Enable at Boot Enable at Boot
$Disable at Boot Disable at Boot
$Enabled Enabled
$Disabled Disabled
$Enable Enable
$Disable Disable
$Feature State Description{}{} Current State: {}. {} the feature settings at boot. Restart will be required to reenable. This is the same as deleting the ini file. This should remove any performance impact for the feature.
$Restore Defaults Restore Defaults
$Restore Defaults Description Restores the feature's settings back to their default values. You will still need to Save Settings to make these changes permanent.
$General General
$Advanced Advanced
$Display Display
$Core Features Core Features
$Features Features
$Unloaded Features Unloaded Features
$Menu Description Please select an item on the left.

; Menu::DrawGeneralSettings

$Enable Shaders Enable Shaders
$Enable Shaders Description Disabling this effectively disables all features.
$Enable Disk Cache Enable Disk Cache
$Enable Disk Cache Description Disabling this stops shaders from being loaded from disk, as well as stops shaders from being saved to it.
$Enable Async Enable Async
$Enable Async Description Skips a shader being replaced if it hasn't been compiled yet. Also makes compilation blazingly fast!
$Keybindings Keybindings
$Toggle Keybinding Description Press any key to set as toggle key...
$Toggle Keybinding Toggle Key:
$Effect Toggle Keybinding Description Press any key to set as a toggle key for all effects...
$Effect Toggle Keybinding Effect Toggle Key:
$Skip Compilation Keybinding Description Press any key to set as Skip Compilation Key...
$Skip Compilation Keybinding Skip Compilation Key:
$Theme Theme
$Sizes Sizes
$Global Scale Global Scale
$Main Main
$Window Padding Window Padding
$Frame Padding Frame Padding
$Item Spacing Item Spacing
$Item Inner Spacing Item Inner Spacing
$Indent Spacing Indent Spacing
$Scrollbar Size Scrollbar Size
$Grab Min Size Grab Min Size
$Borders Borders
$Window Border Size Window Border Size
$Child Border Size Child Border Size
$Popup Border Size Popup Border Size
$Frame Border Size Frame Border Size
$Tab Border Size Tab Border Size
$Tab Bar Border Size Tab Bar Border Size
$Rounding Rounding
$Window Rounding Window Rounding
$Child Rounding Child Rounding
$Frame Rounding Frame Rounding
$Popup Rounding Popup Rounding
$Scrollbar Rounding Scrollbar Rounding
$Grab Rounding Grab Rounding
$Tab Rounding Tab Rounding
$Tables Tables
$Cell Padding Cell Padding
$Table Angled Headers Angle Table Angled Headers Angle
$Widgets Widgets
$Color Button Position Color Button Position
$Color Button Position Option Left\0Right\0
$Button Text Align Button Text Align
$Button Text Align Description Alignment applies when a button is larger than its text content.
$Selectable Text Align Selectable Text Align
$Selectable Text Align Description Alignment applies when a selectable is larger than its text content.
$Separator Text Border Size Separator Text Border Size
$Separator Text Align Separator Text Align
$Separator Text Padding Separator Text Padding
$Log Slider Deadzone Log Slider Deadzone
$Docking Docking
$Docking Splitter Size Docking Splitter Size
$Colors Colors
$Status Status
$Disabled Text Disabled Text
$Error Text Error Text
$Restart Needed Text Restart Needed Text
$Current Hotkey Text Current Hotkey Text
$Palette Palette
$Simple Palette Simple Palette
$Full Palette Full Palette
$Background Background
$Text Text
$Border Border
$Filter colors Filter colors

; Menu::DrawAdvancedSettings

$Dump Shaders Dump Shaders
$Dump Shaders Description Dump shaders at startup. This should be used only when reversing shaders. Normal users don't need this.
$Log Level Log Level
$Log Level Description Log level. Trace is most verbose. Default is info.
$Shader Defines Shader Defines
$Shader Defines Description Defines for Shader Compiler. Semicolon ";" separated. Clear with space. Rebuild shaders after making change. Compute Shaders require a restart to recompile.
$Compiler Threads Compiler Threads
$Compiler Threads Description Number of threads to use to compile shaders. The more threads the faster compilation will finish but may make the system unresponsive.
$Background Compiler Threads Background Compiler Threads
$Background Compiler Threads Description Number of threads to use to compile shaders while playing game. This is activated if the startup compilation is skipped. The more threads the faster compilation will finish but may make the system unresponsive.
$Test Interval Test Interval
$Test Interval Description Sets number of seconds before toggling between default USER and TEST config. 0 disables. Non-zero will enable testing mode. Enabling will save current settings as TEST config. This has no impact if no settings are changed.
$Enable File Watcher Enable File Watcher
$Enable File Watcher Description Automatically recompile shaders on file change. Intended for developing.
$Dump Ini Settings Dump Ini Settings
$Stop Blocking Shaders Stop Blocking {} Shaders
$Stop Blocking Shaders Description Stop blocking Community Shaders shader. Blocking is helpful when debugging shader errors in game to determine which shader has issues. Blocking is enabled if in developer mode and pressing PAGEUP and PAGEDOWN. Specific shader will be printed to logfile.
$Statistics Statistics
$Replace Original Shaders Replace Original Shaders
$Vertex Shader Description Replace Vertex Shaders. When false, will disable the custom Vertex Shaders for the types above. For developers to test whether CS shaders match vanilla behavior.
$Pixel Shader Description Replace Pixel Shaders. When false, will disable the custom Pixel Shaders for the types above. For developers to test whether CS shaders match vanilla behavior.
$Compute Shader Description Replace Compute Shaders. When false, will disable the custom Compute Shaders for the types above. For developers to test whether CS shaders match vanilla behavior.

; Menu::DrawDisableAtBootSettings

$Disable at Boot Disable at Boot
$Disable at Boot Description Select features to disable at boot. This is the same as deleting a feature.ini file. Restart will be required to reenable.
$Special Features Special Features

; Menu::DrawDisplaySettings

$Display Feature Description{} {{}} has been disabled at boot. Reenable in the Advanced -> Disable at Boot Menu.
$Display Disabled Description Display options disabled due to Skyrim Upscaler

; Menu::DrawFooter

$Game Version Game Version: {} {}
$D3D12 Interop D3D12 Interop: {}
$Active Active
$Inactive Inactive

; Menu::DrawOverlay

$Compiling Shaders Compiling Shaders: {}
$Background Compiling Shaders Background Compiling Shaders: {}
$Shader Compilation Info Shader Compilation Info
$Skip Compilation Press {} to proceed without completing shader compilation.
$Skip Compilation Description WARNING: Uncompiled shaders will have visual errors or cause stuttering when loading.
$Skip Compilation Error Description ERROR: {} shaders failed to compile. Check installation and CommunityShaders.log
Loading
Loading