Skip to content

Commit 094e8f7

Browse files
authored
Feature: New language Japanese (ja-JP) (#3044)
* Feature: New language Japanese (ja-JP) * Docs: #3044
1 parent 6ebc1e9 commit 094e8f7

File tree

7 files changed

+75
-38
lines changed

7 files changed

+75
-38
lines changed

Scripts/Create-FlagFromSVG.ps1

+12
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

+4-3
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

+37-35
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>
Loading

Website/docs/changelog/next-release.md

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Release date: **xx.xx.2025**
1919

2020
## What's new?
2121

22+
- New language Japanese (`ja-JP`) has been added. Thanks to [@coolvitto](https://github.com/coolvitto) [#3044](https://github.com/BornToBeRoot/NETworkManager/pull/3044) [#3030](https://github.com/BornToBeRoot/NETworkManager/pull/3030) [#3035](https://github.com/BornToBeRoot/NETworkManager/pull/3035)
23+
2224
## Improvements
2325

2426
**PowerShell**

Website/docs/commandline-arguments.md

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Start a specific application on startup.
5353
- `DiscoveryProtocol`
5454
- `WakeOnLAN`
5555
- `Whois`
56+
- `IPGeolocation`
5657
- `SubnetCalculator`
5758
- `BitCalculator`
5859
- `Lookup`

Website/docs/settings/language.md

+19
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,25 @@ Language for the user interface of the application.
1212

1313
**Default:** `English` (`en-US`)
1414

15+
**Possible values:**
16+
17+
- `English` (`en-US`)
18+
- `German (Germany)` (`de-DE`)
19+
- `Chinese (China)` (`zh-CN`)
20+
- `Chinese (Taiwan)` (`zh-TW`)
21+
- `Czech (Czech Republic)` (`cs-CZ`)
22+
- `Dutch (Netherlands)` (`nl-NL`)
23+
- `French (France)` (`fr-FR`)
24+
- `Hungarian (Hungary)` (`hu-HU`)
25+
- `Italian (Italy)` (`it-IT`)
26+
- `Japanese (Japan)` (`ja-JP`)
27+
- `Korean (South Korea)` (`ko-KR`)
28+
- `Polish (Poland)` (`pl-PL`)
29+
- `Portuguese (Brazil)` (`pt-BR`)
30+
- `Russian (Russia)` (`ru-RU`)
31+
- `Slovenian (Slovenia)` (`sl-SI`)
32+
- `Spanish (Spain)` (`es-ES`)
33+
1534
:::note
1635

1736
The language is automatically detected based on the system language. If the language is not available, the default language is used. Changes to this value will take effect after restarting the application.

0 commit comments

Comments
 (0)