Skip to content
Permalink
Browse files

[Localization] Added support for German and Spanish

  • Loading branch information
xen2 committed Feb 27, 2019
1 parent d145c85 commit f1d652d85d39dfb0e971e7a76aa31962872abca6
@@ -803,6 +803,8 @@
<PostBuildEvent>Path=$(RoslynTargetsPath);$(Path)
IF EXIST "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale fr "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ja "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale es "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale de "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ru "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" --verbose</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -9,5 +9,7 @@ public enum SupportedLanguage
French,
Japanese,
Russian,
German,
Spanish,
}
}
@@ -431,6 +431,8 @@
<PostBuildEvent>Path=$(RoslynTargetsPath);$(Path)
IF EXIST "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale fr "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ja "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale es "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale de "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ru "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" --verbose</PostBuildEvent>
</PropertyGroup>

@@ -91,6 +91,8 @@
<PostBuildEvent>Path=$(MSBuildBinPath)\Roslyn;$(Path)
IF EXIST "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale fr "$(SolutionDir)..\sources\localization\ja\$(TargetName).fr.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ja "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale es "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale de "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ru "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" --verbose</PostBuildEvent>
</PropertyGroup>
</Project>
@@ -389,6 +389,12 @@ private static void InitializeLanguageSettings()
case SupportedLanguage.Russian:
TranslationManager.Instance.CurrentLanguage = new CultureInfo("ru-RU");
break;
case SupportedLanguage.German:
TranslationManager.Instance.CurrentLanguage = new CultureInfo("de-DE");
break;
case SupportedLanguage.Spanish:
TranslationManager.Instance.CurrentLanguage = new CultureInfo("es-ES");
break;
default:
throw new ArgumentOutOfRangeException();
}
@@ -234,6 +234,8 @@
<PostBuildEvent>Path=$(RoslynTargetsPath);$(Path)
IF EXIST "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale fr "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ja "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale es "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale de "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ru "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" --verbose</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
@@ -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 ru nb_NO) DO (
FOR %%A IN (ja fr es de ru) DO (
%MSGMERGE% -U %%A\%%B.%%A.po %%B.pot
)
)
@@ -80,6 +80,8 @@
<PostBuildEvent>Path=$(RoslynTargetsPath);$(Path)
IF EXIST "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale fr "$(SolutionDir)..\sources\localization\fr\$(TargetName).fr.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ja "$(SolutionDir)..\sources\localization\ja\$(TargetName).ja.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale es "$(SolutionDir)..\sources\localization\es\$(TargetName).es.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale de "$(SolutionDir)..\sources\localization\de\$(TargetName).de.po" --verbose
IF EXIST "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" "$(SolutionDir)..\deps\Gettext.Net\GNU.Gettext.Msgfmt.exe" --lib-dir "$(SolutionDir)..\deps\Gettext.Net" --resource $(TargetName) -d "$(TargetDir)." --locale ru "$(SolutionDir)..\sources\localization\ru\$(TargetName).ru.po" --verbose</PostBuildEvent>
</PropertyGroup>

0 comments on commit f1d652d

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