Skip to content

Commit 53dee16

Browse files
committed
Feature: New language Japanese (ja-JP)
1 parent 6ebc1e9 commit 53dee16

File tree

4 files changed

+53
-38
lines changed

4 files changed

+53
-38
lines changed

Scripts/Create-FlagFromSVG.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<#
2+
Convert 4x3 country flags from SVG to PNG using ImageMagick.
3+
4+
Flags source: https://github.com/lipis/flag-icon-css
5+
#>
6+
7+
$ConvertPath = "C:\Tools\ImageMagick-7.1.0-portable-Q16-x64\convert.exe"
8+
9+
$SourcePath = "C:\Temp\jp.svg"
10+
$DestinationPath = "C:\Temp\ja-JP.png"
11+
12+
Start-Process -FilePath $ConvertPath -ArgumentList "-antialias -density 600 -background transparent -resize x48 ""$SourcePath"" ""$DestinationPath""" -NoNewWindow -Wait

Source/NETworkManager.Localization/LocalizationManager.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ private LocalizationManager(string cultureCode = DefaultCultureCode)
5151
/// <summary>
5252
/// List with all <see cref="LocalizationInfo" />s.
5353
/// </summary>
54-
public static List<LocalizationInfo> List => new()
55-
{
54+
public static List<LocalizationInfo> List =>
55+
[
5656
// Official
5757
new LocalizationInfo("English", "English", GetImageUri("en-US"), "en-US", true),
5858
new LocalizationInfo("German (Germany)", "Deutsch", GetImageUri("de-DE"), "de-DE", true),
@@ -65,13 +65,14 @@ private LocalizationManager(string cultureCode = DefaultCultureCode)
6565
new LocalizationInfo("French (France)", "Français", GetImageUri("fr-FR"), "fr-FR"),
6666
new LocalizationInfo("Hungarian (Hungary)", "Magyar", GetImageUri("hu-HU"), "hu-HU"),
6767
new LocalizationInfo("Italian (Italy)", "Italiano", GetImageUri("it-IT"), "it-IT"),
68+
new LocalizationInfo("Japanese (Japan)", "日本語", GetImageUri("ja-JP"), "ja-JP"),
6869
new LocalizationInfo("Korean (Korea)", "한국어", GetImageUri("ko-KR"), "ko-KR"),
6970
new LocalizationInfo("Polish (Poland)", "Język polski", GetImageUri("pl-PL"), "pl-PL"),
7071
new LocalizationInfo("Portuguese (Brazil)", "português brasileiro", GetImageUri("pt-BR"), "pt-BR"),
7172
new LocalizationInfo("Russian (Russia)", "Русский", GetImageUri("ru-RU"), "ru-RU"),
7273
new LocalizationInfo("Slovenian (Slovenia)", "slovenski jezik", GetImageUri("sl-SI"), "sl-SI"),
7374
new LocalizationInfo("Spanish (Spain)", "Español", GetImageUri("es-ES"), "es-ES")
74-
};
75+
];
7576

7677
/// <summary>
7778
/// Variable with the currently used <see cref="LocalizationInfo" />.

Source/NETworkManager.Localization/NETworkManager.Localization.csproj

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,51 +14,53 @@
1414
<NoWarn>1701;1702;CA1712</NoWarn>
1515
</PropertyGroup>
1616
<ItemGroup>
17-
<None Remove="Resources\Flags\cs-CZ.png"/>
18-
<None Remove="Resources\Flags\en-US.png"/>
19-
<None Remove="Resources\Flags\de-DE.png"/>
20-
<None Remove="Resources\Flags\es-ES.png"/>
21-
<None Remove="Resources\Flags\fr-FR.png"/>
22-
<None Remove="Resources\Flags\hu-HU.png"/>
23-
<None Remove="Resources\Flags\it-IT.png"/>
24-
<None Remove="Resources\Flags\ko-KR.png"/>
25-
<None Remove="Resources\Flags\nl-NL.png"/>
26-
<None Remove="Resources\Flags\pl-PL.png"/>
27-
<None Remove="Resources\Flags\pt-BR.png"/>
28-
<None Remove="Resources\Flags\ru-RU.png"/>
29-
<None Remove="Resources\Flags\sl-SI.png"/>
30-
<None Remove="Resources\Flags\zh-CN.png"/>
31-
<None Remove="Resources\Flags\zh-TW.png"/>
17+
<None Remove="Resources\Flags\cs-CZ.png" />
18+
<None Remove="Resources\Flags\en-US.png" />
19+
<None Remove="Resources\Flags\de-DE.png" />
20+
<None Remove="Resources\Flags\es-ES.png" />
21+
<None Remove="Resources\Flags\fr-FR.png" />
22+
<None Remove="Resources\Flags\hu-HU.png" />
23+
<None Remove="Resources\Flags\it-IT.png" />
24+
<None Remove="Resources\Flags\ja-JP.png" />
25+
<None Remove="Resources\Flags\ko-KR.png" />
26+
<None Remove="Resources\Flags\nl-NL.png" />
27+
<None Remove="Resources\Flags\pl-PL.png" />
28+
<None Remove="Resources\Flags\pt-BR.png" />
29+
<None Remove="Resources\Flags\ru-RU.png" />
30+
<None Remove="Resources\Flags\sl-SI.png" />
31+
<None Remove="Resources\Flags\zh-CN.png" />
32+
<None Remove="Resources\Flags\zh-TW.png" />
3233
</ItemGroup>
3334
<ItemGroup>
34-
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs"/>
35+
<Compile Include="..\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
3536
</ItemGroup>
3637
<ItemGroup>
37-
<Resource Include="Resources\Flags\cs-CZ.png"/>
38-
<Resource Include="Resources\Flags\en-US.png"/>
39-
<Resource Include="Resources\Flags\de-DE.png"/>
40-
<Resource Include="Resources\Flags\es-ES.png"/>
41-
<Resource Include="Resources\Flags\fr-FR.png"/>
42-
<Resource Include="Resources\Flags\hu-HU.png"/>
43-
<Resource Include="Resources\Flags\it-IT.png"/>
44-
<Resource Include="Resources\Flags\ko-KR.png"/>
45-
<Resource Include="Resources\Flags\nl-NL.png"/>
46-
<Resource Include="Resources\Flags\pl-PL.png"/>
47-
<Resource Include="Resources\Flags\pt-BR.png"/>
48-
<Resource Include="Resources\Flags\ru-RU.png"/>
49-
<Resource Include="Resources\Flags\sl-SI.png"/>
50-
<Resource Include="Resources\Flags\zh-CN.png"/>
51-
<Resource Include="Resources\Flags\zh-TW.png"/>
38+
<Resource Include="Resources\Flags\cs-CZ.png" />
39+
<Resource Include="Resources\Flags\en-US.png" />
40+
<Resource Include="Resources\Flags\de-DE.png" />
41+
<Resource Include="Resources\Flags\es-ES.png" />
42+
<Resource Include="Resources\Flags\fr-FR.png" />
43+
<Resource Include="Resources\Flags\hu-HU.png" />
44+
<Resource Include="Resources\Flags\it-IT.png" />
45+
<Resource Include="Resources\Flags\ja-JP.png" />
46+
<Resource Include="Resources\Flags\ko-KR.png" />
47+
<Resource Include="Resources\Flags\nl-NL.png" />
48+
<Resource Include="Resources\Flags\pl-PL.png" />
49+
<Resource Include="Resources\Flags\pt-BR.png" />
50+
<Resource Include="Resources\Flags\ru-RU.png" />
51+
<Resource Include="Resources\Flags\sl-SI.png" />
52+
<Resource Include="Resources\Flags\zh-CN.png" />
53+
<Resource Include="Resources\Flags\zh-TW.png" />
5254
</ItemGroup>
5355

5456
<ItemGroup>
55-
<PackageReference Include="MahApps.Metro" Version="2.4.10"/>
57+
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
5658
</ItemGroup>
5759

5860
<ItemGroup>
59-
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj"/>
60-
<ProjectReference Include="..\NETworkManager.Profiles\NETworkManager.Profiles.csproj"/>
61-
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj"/>
61+
<ProjectReference Include="..\NETworkManager.Models\NETworkManager.Models.csproj" />
62+
<ProjectReference Include="..\NETworkManager.Profiles\NETworkManager.Profiles.csproj" />
63+
<ProjectReference Include="..\NETworkManager.Utilities\NETworkManager.Utilities.csproj" />
6264
</ItemGroup>
6365

6466
<ItemGroup>
2.23 KB
Loading

0 commit comments

Comments
 (0)