added localization strings for settings.

This commit is contained in:
morkt 2018-01-12 19:56:25 +04:00
parent 3e6645a336
commit c3f4343558
21 changed files with 243 additions and 21 deletions

View File

@ -72,14 +72,9 @@ namespace GameRes.Formats.Majiro
Settings = new[] { OverlayFrames, ApplyMask };
}
LocalResourceSetting OverlayFrames = new LocalResourceSetting {
Name = "RCTOverlayFrames",
Text = "Automatically combine incremental frames",
};
LocalResourceSetting ApplyMask = new LocalResourceSetting {
Name = "RCTApplyMask",
Text = "Load transparency data from RC8 bitmap",
};
LocalResourceSetting OverlayFrames = new LocalResourceSetting ("RCTOverlayFrames");
LocalResourceSetting ApplyMask = new LocalResourceSetting ("RCTApplyMask");
public const int BaseRecursionLimit = 8;
public static Dictionary<string, string> KnownKeys = new Dictionary<string, string>();

View File

@ -4,6 +4,7 @@
//
using System.ComponentModel.Composition;
using GameRes.Formats.Strings;
namespace GameRes.Formats
{
@ -13,6 +14,14 @@ namespace GameRes.Formats
get { return Properties.Settings.Default[Name]; }
set { Properties.Settings.Default[Name] = value; }
}
public LocalResourceSetting () { }
public LocalResourceSetting (string name)
{
Name = name;
Text = arcStrings.ResourceManager.GetString (name, arcStrings.Culture);
}
}
[Export(typeof(ISettingsManager))]

View File

@ -660,6 +660,15 @@ namespace GameRes.Formats.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Load transparency data from RC8 bitmap.
/// </summary>
public static string RCTApplyMask {
get {
return ResourceManager.GetString("RCTApplyMask", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Choose title or enter a password.
/// </summary>
@ -669,6 +678,15 @@ namespace GameRes.Formats.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Automatically combine incremental frames.
/// </summary>
public static string RCTOverlayFrames {
get {
return ResourceManager.GetString("RCTOverlayFrames", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Ren&apos;Py game engine archive.
/// </summary>

View File

@ -383,4 +383,12 @@
<value>아카이브가 암호화된 스크립트를 포함함.
암호체계를 고르거나 암호를 입력하세요.</value>
</data>
<data name="RCTApplyMask" xml:space="preserve">
<value>Load transparency data from RC8 bitmap</value>
<comment>translation pending</comment>
</data>
<data name="RCTOverlayFrames" xml:space="preserve">
<value>Automatically combine incremental frames</value>
<comment>translation pending</comment>
</data>
</root>

View File

@ -386,4 +386,10 @@ Choose appropriate encryption scheme.</value>
<value>Archive contains encrypted scripts.
Choose encryption scheme or enter a passphrase.</value>
</data>
<data name="RCTApplyMask" xml:space="preserve">
<value>Load transparency data from RC8 bitmap</value>
</data>
<data name="RCTOverlayFrames" xml:space="preserve">
<value>Automatically combine incremental frames</value>
</data>
</root>

View File

@ -291,9 +291,15 @@
<data name="QLIEDefaultScheme" xml:space="preserve">
<value>"Старый" метод шифрования</value>
</data>
<data name="RCTApplyMask" xml:space="preserve">
<value>Подгружать прозрачность из одноимённого RC8 файла</value>
</data>
<data name="RCTChoose" xml:space="preserve">
<value>Выберите наименование или введите пароль</value>
</data>
<data name="RCTOverlayFrames" xml:space="preserve">
<value>Автоматически объединять мозаичные изображения</value>
</data>
<data name="RPALabelKey" xml:space="preserve">
<value>32-битный ключ</value>
</data>

View File

@ -384,4 +384,12 @@
<value>压缩文件包含已加密的脚本。
请选择加密方式或输入密码。</value>
</data>
<data name="RCTApplyMask" xml:space="preserve">
<value>Load transparency data from RC8 bitmap</value>
<comment>translation pending</comment>
</data>
<data name="RCTOverlayFrames" xml:space="preserve">
<value>Automatically combine incremental frames</value>
<comment>translation pending</comment>
</data>
</root>

View File

@ -135,7 +135,7 @@
<MenuItem Header="{x:Static s:guiStrings.MenuExit}" Command="{x:Static local:Commands.Exit}" InputGestureText="Ctrl+Q"/>
</MenuItem>
<MenuItem Header="{x:Static s:guiStrings.MenuView}">
<MenuItem Header="Preferences" InputGestureText="Ctrl+P"
<MenuItem Header="{x:Static s:guiStrings.MenuPreferences}" InputGestureText="Ctrl+P"
Command="{x:Static local:Commands.Preferences}"/>
<Separator/>
<MenuItem Header="{x:Static s:guiStrings.MenuFitWindow}" InputGestureText="Ctrl+H"

View File

@ -25,10 +25,10 @@ IN THE SOFTWARE.
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:GARbro.GUI.Strings"
xmlns:local="clr-namespace:GARbro.GUI"
Title="Settings" ShowInTaskbar="False" ResizeMode="NoResize"
Title="{x:Static s:guiStrings.TextPreferences}" ShowInTaskbar="False" ResizeMode="NoResize"
FocusManager.FocusedElement="{Binding ElementName=SectionsPane}"
Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
Height="400" Width="400" WindowStartupLocation="CenterOwner">
Height="400" Width="500" WindowStartupLocation="CenterOwner">
<Window.Resources>
<LinearGradientBrush x:Key="SectionTitleBackground" StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#FFA0A0FF" Offset="0"/>
@ -155,7 +155,7 @@ IN THE SOFTWARE.
<StackPanel DockPanel.Dock="Bottom" Margin="0,10,0,0" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<Button Width="75" Height="25" Margin="0,0,10,0" Content="{x:Static s:guiStrings.ButtonOK}" IsDefault="True" Click="Button_ClickOk"/>
<Button Width="75" Height="25" Margin="0,0,10,0" Content="{x:Static s:guiStrings.ButtonCancel}" IsCancel="True"/>
<Button Width="75" Height="25" Margin="0" Content="Apply" Click="Button_ClickApply" IsEnabled="{Binding HasChanges}"/>
<Button Width="75" Height="25" Margin="0" Content="{x:Static s:guiStrings.ButtonApply}" Click="Button_ClickApply" IsEnabled="{Binding HasChanges}"/>
</StackPanel>
<TreeView x:Name="SectionsPane" DockPanel.Dock="Left" Padding="4" ItemsSource="{Binding Root}"
TreeViewItem.Selected="OnSectionChanged">

View File

@ -31,6 +31,7 @@ using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Input;
using GameRes;
using GARbro.GUI.Strings;
namespace GARbro.GUI
{
@ -85,7 +86,7 @@ namespace GARbro.GUI
{
SettingsSectionView[] list = {
new SettingsSectionView {
Label = "Formats",
Label = guiStrings.TextFormats,
Children = EnumerateFormatsSettings(),
Panel = (UIElement)this.Resources["FormatsPanel"]
},
@ -124,7 +125,7 @@ namespace GARbro.GUI
{
var section = new SettingsSectionView {
Label = format.Tag,
SectionTitle = "Formats :: "+format.Tag,
SectionTitle = guiStrings.TextFormats+" :: "+format.Tag,
Panel = pane
};
list.Add (section);

View File

@ -69,6 +69,15 @@ namespace GARbro.GUI.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Apply.
/// </summary>
public static string ButtonApply {
get {
return ResourceManager.GetString("ButtonApply", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Cancel.
/// </summary>
@ -546,6 +555,15 @@ namespace GARbro.GUI.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to _Preferences.
/// </summary>
public static string MenuPreferences {
get {
return ResourceManager.GetString("MenuPreferences", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Recent files.
/// </summary>
@ -1165,6 +1183,15 @@ namespace GARbro.GUI.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Formats.
/// </summary>
public static string TextFormats {
get {
return ResourceManager.GetString("TextFormats", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Multimedia conversion error.
/// </summary>
@ -1192,6 +1219,15 @@ namespace GARbro.GUI.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Preferences.
/// </summary>
public static string TextPreferences {
get {
return ResourceManager.GetString("TextPreferences", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Save as.
/// </summary>

View File

@ -529,4 +529,36 @@
<data name="TextVisitPage" xml:space="preserve">
<value>다운로드 페이지 방문</value>
</data>
<data name="ButtonApply" xml:space="preserve">
<value>Apply</value>
<comment>translation pending</comment>
</data>
<data name="MenuPreferences" xml:space="preserve">
<value>Preferences</value>
<comment>translation pending</comment>
</data>
<data name="TextFormats" xml:space="preserve">
<value>Formats</value>
<comment>translation pending</comment>
</data>
<data name="TextPreferences" xml:space="preserve">
<value>Preferences</value>
<comment>translation pending</comment>
</data>
<data name="Type_archive" xml:space="preserve">
<value>archive</value>
<comment>translation pending</comment>
</data>
<data name="Type_audio" xml:space="preserve">
<value>audio</value>
<comment>translation pending</comment>
</data>
<data name="Type_image" xml:space="preserve">
<value>image</value>
<comment>translation pending</comment>
</data>
<data name="Type_script" xml:space="preserve">
<value>script</value>
<comment>translation pending</comment>
</data>
</root>

View File

@ -533,4 +533,16 @@ Overwrite?</value>
<data name="MsgDownloadFailed" xml:space="preserve">
<value>Update download failed.</value>
</data>
<data name="ButtonApply" xml:space="preserve">
<value>Apply</value>
</data>
<data name="MenuPreferences" xml:space="preserve">
<value>_Preferences</value>
</data>
<data name="TextFormats" xml:space="preserve">
<value>Formats</value>
</data>
<data name="TextPreferences" xml:space="preserve">
<value>Preferences</value>
</data>
</root>

View File

@ -554,4 +554,16 @@
<data name="TextVisitPage" xml:space="preserve">
<value>Перейти на страницу загрузки</value>
</data>
<data name="ButtonApply" xml:space="preserve">
<value>Применить</value>
</data>
<data name="MenuPreferences" xml:space="preserve">
<value>Настройки</value>
</data>
<data name="TextFormats" xml:space="preserve">
<value>Форматы</value>
</data>
<data name="TextPreferences" xml:space="preserve">
<value>Настройки</value>
</data>
</root>

View File

@ -530,4 +530,36 @@
<data name="TextVisitPage" xml:space="preserve">
<value>访问下载页面</value>
</data>
<data name="ButtonApply" xml:space="preserve">
<value>Apply</value>
<comment>translation pending</comment>
</data>
<data name="MenuPreferences" xml:space="preserve">
<value>Preferences</value>
<comment>translation pending</comment>
</data>
<data name="TextFormats" xml:space="preserve">
<value>Formats</value>
<comment>translation pending</comment>
</data>
<data name="TextPreferences" xml:space="preserve">
<value>Preferences</value>
<comment>translation pending</comment>
</data>
<data name="Type_archive" xml:space="preserve">
<value>archive</value>
<comment>translation pending</comment>
</data>
<data name="Type_audio" xml:space="preserve">
<value>audio</value>
<comment>translation pending</comment>
</data>
<data name="Type_image" xml:space="preserve">
<value>image</value>
<comment>translation pending</comment>
</data>
<data name="Type_script" xml:space="preserve">
<value>script</value>
<comment>translation pending</comment>
</data>
</root>

View File

@ -26,11 +26,12 @@
using System.IO;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using System.Windows.Media.Imaging;
using GameRes.Utility;
using System.Windows.Media;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using GameRes.Strings;
using GameRes.Utility;
namespace GameRes
{
@ -65,8 +66,8 @@ namespace GameRes
LocalResourceSetting EnableExtensions = new LocalResourceSetting {
Name = "BMPEnableExtensions",
Text = "Enable BMP format extensions",
Description = "Enables various extensions, such as transparency support.",
Text = garStrings.BMPExtensionsText,
Description = garStrings.BMPExtensionsDesc,
};
public override ImageData Read (IBinaryStream file, ImageMetaData info)

View File

@ -60,6 +60,24 @@ namespace GameRes.Strings {
}
}
/// <summary>
/// Looks up a localized string similar to Enables various extensions, such as transparency support..
/// </summary>
public static string BMPExtensionsDesc {
get {
return ResourceManager.GetString("BMPExtensionsDesc", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Enable BMP format extensions.
/// </summary>
public static string BMPExtensionsText {
get {
return ResourceManager.GetString("BMPExtensionsText", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to File is empty.
/// </summary>

View File

@ -117,6 +117,14 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BMPExtensionsDesc" xml:space="preserve">
<value>Enables various extensions, such as transparency support.</value>
<comment>translation pending</comment>
</data>
<data name="BMPExtensionsText" xml:space="preserve">
<value>Enable BMP format extensions</value>
<comment>translation pending</comment>
</data>
<data name="MsgFileIsEmpty" xml:space="preserve">
<value>파일이 비어있습니다</value>
</data>

View File

@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BMPExtensionsDesc" xml:space="preserve">
<value>Enables various extensions, such as transparency support.</value>
</data>
<data name="BMPExtensionsText" xml:space="preserve">
<value>Enable BMP format extensions</value>
</data>
<data name="MsgFileIsEmpty" xml:space="preserve">
<value>File is empty</value>
</data>

View File

@ -117,6 +117,12 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BMPExtensionsDesc" xml:space="preserve">
<value>Включает разные расширния, такие как поддержка прозрачности.</value>
</data>
<data name="BMPExtensionsText" xml:space="preserve">
<value>Включить расширения формата BMP</value>
</data>
<data name="MsgFileIsEmpty" xml:space="preserve">
<value>Файл пуст</value>
</data>

View File

@ -117,6 +117,14 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BMPExtensionsDesc" xml:space="preserve">
<value>Enables various extensions, such as transparency support.</value>
<comment>translation pending</comment>
</data>
<data name="BMPExtensionsText" xml:space="preserve">
<value>Enable BMP format extensions</value>
<comment>translation pending</comment>
</data>
<data name="MsgFileIsEmpty" xml:space="preserve">
<value>文件为空。</value>
</data>