Skip to content

Commit

Permalink
translation using NGettext.Wpf
Browse files Browse the repository at this point in the history
  • Loading branch information
stax76 committed Dec 8, 2023
1 parent 8997a2e commit 5dd3716
Show file tree
Hide file tree
Showing 73 changed files with 2,769 additions and 17,467 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,3 @@ $RECYCLE.BIN/

# Windows shortcuts
*.lnk

lang/cs-files.txt
lang/template.pot
lang/util.ps1
9 changes: 9 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

[main]
host = https://app.transifex.com

[o:stax76:p:mpvnet:r:mpvnet]
file_filter = lang/po/<lang>.po
source_file = lang/source.pot
source_lang = en
type = PO
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
🎞 mpv.net
==========

mpv.net is a modern desktop media player for Windows based on the popular [mpv](https://mpv.io) player.
mpv.net is a media player for Windows based on the [mpv](https://mpv.io) player.

mpv.net is designed to be mpv compatible, almost all mpv features are available,
this means the official [mpv manual](https://mpv.io/manual/master/) applies to mpv.net.
Expand Down Expand Up @@ -63,7 +63,7 @@ Table of contents
Features that mpv and mpv.net have in common
--------------------------------------------

- Lua and JavaScript Scripting ([awesome-mpv lists available user scripts](https://github.com/stax76/awesome-mpv))
- Lua and JavaScript Scripting ([awesome-mpv lists a large collection of available user scripts](https://github.com/stax76/awesome-mpv))
- Simple config files that are easy to read and edit
- JSON IPC to control the player with a external programs
- On Screen Controller (OSC, play control buttons) with modern flat design
Expand All @@ -79,7 +79,7 @@ Features that mpv and mpv.net have in common
- Build-in media streaming (requires yt-dlp being installed)
- External audio and subtitle files can be loaded manually or automatically
- Screenshot feature
- Watch later feature to save the video position
- Internationalization using gettext and transifex


Features exclusive to mpv.net
Expand Down
9 changes: 5 additions & 4 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,11 @@
- Improved support for third party osc scripts like uosc.
- Support of the mpv property `focused`.
- Various improvements and fixes in the input bindings editor.
- Automated nightly portable builds (thx to dyphire)
- Various new or changed default bindings
- libmpv zhongfly 2023-11-03

- Automated nightly portable builds (thx to dyphire).
- Various new or changed default bindings.
- Context menu and message boxes are available in the languages German,
it can be enabled with the new option `language`.
- libmpv zhongfly 2023-11-03.

# v6.0.3.2 Beta (2022-10-14)

Expand Down
11 changes: 8 additions & 3 deletions docs/manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,11 @@ Enable this only when a developer asks for it. Default: no

### UI

#### --language=\<value\>

User interface display language.
mpv.net must be restarted after a change.

#### --dark-mode=\<value\>

Enables a dark theme.
Expand Down Expand Up @@ -1011,7 +1016,7 @@ Cycles the aspect ratio using the following command:
[video-aspect property](https://mpv.io/manual/master/#command-interface-video-aspect)


### Audio > Cycle/Next
### Audio > Next

This uses a mpv.net command that shows better info then the mpv preset
and also has the advantage of not showing no audio.
Expand Down Expand Up @@ -1120,7 +1125,7 @@ Increases the subtitle font size using the following command:

Increases the volume using the following command:

`add volume 10`
`add volume 2`

[add command](https://mpv.io/manual/master/#command-interface-add-%3Cname%3E-[%3Cvalue%3E])

Expand All @@ -1131,7 +1136,7 @@ Increases the volume using the following command:

Decreases the volume using the following command:

`add volume -10`
`add volume -2`

[add command](https://mpv.io/manual/master/#command-interface-add-%3Cname%3E-[%3Cvalue%3E])

Expand Down
33 changes: 33 additions & 0 deletions lang/create-mo-files.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

$PoFiles = Get-ChildItem $PSScriptRoot/po
$ExeFolder = "$PSScriptRoot/../src/MpvNet.Windows/bin/Debug"

function CreateFolder
{
param($path)

if (-not (Test-Path $path))
{
mkdir $path
}

if (-not (Test-Path $path))
{
throw
}
}

foreach ($it in $PoFiles)
{
$folder = "$ExeFolder/Locale/$($it.BaseName)/LC_MESSAGES"
CreateFolder $folder
$moPath = Resolve-Path $folder/mpvnet.mo
msgfmt --output-file=$moPath $it.FullName

if ($LASTEXITCODE -ne 0)
{
throw
}

$moPath
}
112 changes: 112 additions & 0 deletions lang/cs-files.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
D:\Projects\CS\mpv.net\src\MpvNet\App.cs
D:\Projects\CS\mpv.net\src\MpvNet\AppInfo.cs
D:\Projects\CS\mpv.net\src\MpvNet\Binding.cs
D:\Projects\CS\mpv.net\src\MpvNet\Chapter.cs
D:\Projects\CS\mpv.net\src\MpvNet\Command.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionLoader.cs
D:\Projects\CS\mpv.net\src\MpvNet\FileTypes.cs
D:\Projects\CS\mpv.net\src\MpvNet\Folder.cs
D:\Projects\CS\mpv.net\src\MpvNet\Global.cs
D:\Projects\CS\mpv.net\src\MpvNet\GlobalUsings.cs
D:\Projects\CS\mpv.net\src\MpvNet\InputConf.cs
D:\Projects\CS\mpv.net\src\MpvNet\InputHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\MediaTrack.cs
D:\Projects\CS\mpv.net\src\MpvNet\MpvClient.cs
D:\Projects\CS\mpv.net\src\MpvNet\Player.cs
D:\Projects\CS\mpv.net\src\MpvNet\Settings.cs
D:\Projects\CS\mpv.net\src\MpvNet\Terminal.cs
D:\Projects\CS\mpv.net\src\MpvNet\Translator.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionMethod\ObjectExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionMethod\PathStringExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet\ExtensionMethod\StringExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\FileHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\MpvHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\ProcessHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\StringHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\Help\TaskHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet\MVVM\Messages.cs
D:\Projects\CS\mpv.net\src\MpvNet\Native\LibMpv.cs
D:\Projects\CS\mpv.net\src\MpvNet\Native\MediaInfo.cs
D:\Projects\CS\mpv.net\src\MpvNet\Native\StringLogicalComparer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Extension\ExampleExtension\ExampleExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Conf.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\FileAssociation.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\GlobalUsings.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\GuiCommand.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Program.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Settings.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\StringPair.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Help\RegistryHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Help\WinMpvHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Native\StockIcon.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Native\Taskbar.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Native\WinApi.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\Properties\Resources.Designer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\CommandPalette.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\CommandPaletteItem.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\GlobalHotkey.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\Theme.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\UI\TreeNode.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\MainForm.Designer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WinForms\SnapManager.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\BindingProxy.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ConfWindow.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\InputWindow.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ISettingControl.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\LearnWindow.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MenuHelp.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Msg.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\WpfApplication.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\WpfTranslator.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\CommandPaletteControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\HyperlinkEx.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\OptionSettingControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\SearchControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Controls\StringSettingControl.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\ScrollViewer.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\SimplePanel.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\BorderElement.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\IconElement.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\MenuTopLineAttach.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Controls\Attach\ScrollViewerAttach.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Data\ValueBoxes.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\AnimationHelper.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\RegexPatterns.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Converter\BorderCircularConverter.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Extension\StringExtension.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Helper\ScreenHelper.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Helper\VisualHelper.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\InteropMethods.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\InteropValues.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\BitmapHandle.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\CommonHandles.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\HandleCollector.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\HandyControl\Tools\Interop\Handle\WpfSafeHandle.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MessageBoxEx.xaml.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExCheckBoxData.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExDelegate.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExStatic.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxExtendedFunctionality.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgBoxUrl.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\MsgBox\MsgEnum.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ViewModels\AboutViewModel.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ViewModels\NodeViewModel.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\ViewModels\ViewModelBase.cs
D:\Projects\CS\mpv.net\src\MpvNet.Windows\WPF\Views\AboutWindow.xaml.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\ChangeCultureCommand.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\CompositionRoot.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\CultureEventArgs.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\CultureTracker.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\GettextExtension.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\GettextFormatConverterExtension.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\IWeakCultureObserver.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Localizer.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\NGettextWpfDependencyResolver.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\TrackCurrentCultureBehavior.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Translation.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Common\GettextStringFormatConverter.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\EnumTranslation\EnumLocalizer.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\EnumTranslation\EnumMsgIdAttribute.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\EnumTranslation\LocalizeEnumConverter.cs
D:\Projects\CS\mpv.net\src\NGettext.Wpf\Properties\AssemblyInfo.cs
Loading

0 comments on commit 5dd3716

Please sign in to comment.