Skip to content

Add plugin localization support, add Simplified Chinese localization#68

Open
HLSS-Hen wants to merge 2 commits intoN0I0C0K:mainfrom
HLSS-Hen:Add-Localization-Support
Open

Add plugin localization support, add Simplified Chinese localization#68
HLSS-Hen wants to merge 2 commits intoN0I0C0K:mainfrom
HLSS-Hen:Add-Localization-Support

Conversation

@HLSS-Hen
Copy link

@HLSS-Hen HLSS-Hen commented Mar 3, 2025

1.修正了项目和解决方案名 Translater -> Translator
Fixed project and solution names

2.对插件的各种字段做了本地化支持,添加了简中本地化
The various fields of the plug-in do localization support, add the simple localization

添加新的本地化时,需要修改项目文件,参考简中部分:
When adding a new localization, you need to modify the project file, see the brief section

    <Target Name="Movefiles" AfterTargets="Build">
        <ItemGroup>
            <MySourceFiles Include="./plugin.json" />
            <MySourceFiles Include="$(OutputPath)Translator.dll" />
            <MySourceFiles Include="$(OutputPath)Translator.deps.json" />
            **<znCNTransFiles Include="$(OutputPath)zh-CN\*.*" />**
            <ImagesFile Include="$(OutputPath)Images\*.*" />
            <InstallBashFiles Include="./install.bat" />
        </ItemGroup>
        <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="./bin/output_$(Platform)/Translator" />
        **<Copy SourceFiles="@(znCNTransFiles)" DestinationFolder="./bin/output_$(Platform)/Translator/zh-CN" />**
        <Copy SourceFiles="@(ImagesFile)" DestinationFolder="./bin/output_$(Platform)/Translator/Images" />
        <Copy SourceFiles="@(InstallBashFiles)" DestinationFolder="./bin/output_$(Platform)" />
    </Target>

@HLSS-Hen
Copy link
Author

HLSS-Hen commented Mar 3, 2025

Typing error --!

添加新的本地化时,需要修改项目文件,参考简中部分:
When adding a new localization, you need to modify the project file, ref "zn-CN"

<Target Name="Movefiles" AfterTargets="Build">
    <ItemGroup>
        <MySourceFiles Include="./plugin.json" />
        <MySourceFiles Include="$(OutputPath)Translator.dll" />
        <MySourceFiles Include="$(OutputPath)Translator.deps.json" />
        <zhCNTransFiles Include="$(OutputPath)zh-CN\*.*" />
        <ImagesFile Include="$(OutputPath)Images\*.*" />
        <InstallBashFiles Include="./install.bat" />
    </ItemGroup>
    <Copy SourceFiles="@(MySourceFiles)" DestinationFolder="./bin/output_$(Platform)/Translator" />
    <Copy SourceFiles="@(zhCNTransFiles)" DestinationFolder="./bin/output_$(Platform)/Translator/zh-CN" />
    <Copy SourceFiles="@(ImagesFile)" DestinationFolder="./bin/output_$(Platform)/Translator/Images" />
    <Copy SourceFiles="@(InstallBashFiles)" DestinationFolder="./bin/output_$(Platform)" />
</Target>

@N0I0C0K
Copy link
Owner

N0I0C0K commented Mar 3, 2025

感谢你的贡献(一直想做但没时间做)!
请容许我 review 不会很及时,尽力保证在本周内 review 完 🫡

@N0I0C0K N0I0C0K added the enhancement New feature or request label Mar 4, 2025
@N0I0C0K
Copy link
Owner

N0I0C0K commented Apr 22, 2025

十分抱歉!一直忙于其他事情,我尽快 review 好 😶‍🌫️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants