Skip to content
Permalink
Browse files

[Localization] Added support for Chinese (Simplified)

  • Loading branch information
xen2 committed Mar 5, 2019
1 parent def9b2d commit 5edc9a513c6c1128e6817825cc0bc2d113669204
@@ -4,12 +4,15 @@ namespace Xenko.Core.Assets.Editor
{
public enum SupportedLanguage
{
[Display("Default")]
MachineDefault = 0,
English,
French,
Japanese,
Russian,
German,
Spanish,
[Display("Chinese (Simplified)")]
ChineseSimplified,
}
}
@@ -395,6 +395,9 @@ private static void InitializeLanguageSettings()
case SupportedLanguage.Spanish:
TranslationManager.Instance.CurrentLanguage = new CultureInfo("es-ES");
break;
case SupportedLanguage.ChineseSimplified:
TranslationManager.Instance.CurrentLanguage = new CultureInfo("zh-Hans");
break;
default:
throw new ArgumentOutOfRangeException();
}
@@ -19,7 +19,7 @@ rem Xenko.GameStudio.pot

rem Update po files
FOR %%B IN (Xenko.Core.Presentation Xenko.Assets.Presentation Xenko.Core.Assets.Editor Xenko.GameStudio) DO (
FOR %%A IN (ja fr es de ru) DO (
FOR %%A IN (ja fr es de ru zh_HANS-CN) DO (
%MSGMERGE% -U %%A\%%B.%%A.po %%B.pot
)
)
@@ -169,13 +169,21 @@
<ItemGroup>
<!-- Current list of languages to try to generate -->
<XenkoTraductions Include="fr;ja;es;de;ru"/>
<XenkoTraductions Include="zh-Hans">
<Source>zh_HANS-CN</Source>
</XenkoTraductions>

<_XenkoTraductions Include="@(XenkoTraductions)">
<Source Condition="%(XenkoTraductions.Source) == ''">%(XenkoTraductions.Identity)</Source>
</_XenkoTraductions>
</ItemGroup>
<Exec Condition="Exists('$(SolutionDir)..\sources\localization\%(XenkoTraductions.Identity)\$(TargetName).%(XenkoTraductions.Identity).po')" Command="Path=$(RoslynTargetsPath);$(Path)
&quot;$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe&quot; --lib-dir &quot;$(SolutionDir)..\deps\Gettext.Net&quot; --resource $(TargetName) -d &quot;$(TargetDir).&quot; --locale %(XenkoTraductions.Identity) &quot;$(MSBuildThisFileDirectory)..\localization\%(XenkoTraductions.Identity)\$(TargetName).%(XenkoTraductions.Identity).po&quot; --verbose" />
<Message Importance="High" Text="Generating traduction for %(_XenkoTraductions.Identity) %(_XenkoTraductions.SourceFolder)"/>
<Exec Condition="Exists('$(SolutionDir)..\sources\localization\%(_XenkoTraductions.Source)\$(TargetName).%(_XenkoTraductions.Source).po')" Command="Path=$(RoslynTargetsPath);$(Path)
&quot;$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe&quot; --lib-dir &quot;$(SolutionDir)..\deps\Gettext.Net&quot; --resource $(TargetName) -d &quot;$(TargetDir).&quot; --locale %(_XenkoTraductions.Identity) &quot;$(MSBuildThisFileDirectory)..\localization\%(_XenkoTraductions.Source)\$(TargetName).%(_XenkoTraductions.Source).po&quot; --verbose" />
<ItemGroup>
<SatelliteDllsProjectOutputGroupOutputIntermediate Include="$(OutDir)%(XenkoTraductions.Identity)\$(TargetName).Messages.resources.dll" Condition="Exists('$(OutDir)%(XenkoTraductions.Identity)\$(TargetName).Messages.resources.dll')">
<TargetPath>%(XenkoTraductions.Identity)\$(TargetName).Messages.resources.dll</TargetPath>
<Culture>%(XenkoTraductions.Identity)</Culture>
<SatelliteDllsProjectOutputGroupOutputIntermediate Include="$(OutDir)%(_XenkoTraductions.Identity)\$(TargetName).Messages.resources.dll" Condition="Exists('$(OutDir)%(_XenkoTraductions.Identity)\$(TargetName).Messages.resources.dll')">
<TargetPath>%(_XenkoTraductions.Identity)\$(TargetName).Messages.resources.dll</TargetPath>
<Culture>%(_XenkoTraductions.Identity)</Culture>
</SatelliteDllsProjectOutputGroupOutputIntermediate>
</ItemGroup>
</Target>

0 comments on commit 5edc9a5

Please sign in to comment.
You can’t perform that action at this time.