mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 14:32:35 +01:00
GT should now remember last used target language - thx Verteller :)
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1097 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
150064be48
commit
8458e2e9f8
@ -123,7 +123,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
FillComboWithLanguages(comboBoxTo);
|
||||
i = 0;
|
||||
string uiCultureTL = System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName.ToLower();
|
||||
string uiCultureTL = Configuration.Settings.Tools.GoogleTranslateLastTargetLanguage;
|
||||
if (uiCultureTL == defaultFromLanguage)
|
||||
{
|
||||
foreach (string s in Utilities.GetDictionaryLanguages())
|
||||
@ -229,6 +229,8 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
buttonTranslate.Enabled = true;
|
||||
buttonOK.Enabled = true;
|
||||
buttonCancel.Enabled = true;
|
||||
|
||||
Configuration.Settings.Tools.GoogleTranslateLastTargetLanguage = (comboBoxTo.SelectedItem as ComboBoxItem).Value;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,6 +84,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
public string Interjections { get; set; }
|
||||
public string MicrosoftBingApiId { get; set; }
|
||||
public string GoogleApiKey { get; set; }
|
||||
public string GoogleTranslateLastTargetLanguage { get; set; }
|
||||
public bool ListViewSyntaxColorDurationSmall { get; set; }
|
||||
public bool ListViewSyntaxColorDurationBig { get; set; }
|
||||
public bool ListViewSyntaxColorOverlap { get; set; }
|
||||
@ -104,6 +105,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
Interjections = "Ah;Ahh;Ahhh;Eh;Ehh;Ehhh;Hm;Hmm;Hmmm;Phew;Gah;Oh;Ohh;Ohhh;Ow;Oww;Owww;Ugh;Ughh;Uh;Uhh;Uhhh;Whew";
|
||||
MicrosoftBingApiId = "C2C2E9A508E6748F0494D68DFD92FAA1FF9B0BA4";
|
||||
GoogleApiKey = "ABQIAAAA4j5cWwa3lDH0RkZceh7PjBTDmNAghl5kWSyuukQ0wtoJG8nFBxRPlalq-gAvbeCXMCkmrysqjXV1Gw";
|
||||
GoogleTranslateLastTargetLanguage = "en";
|
||||
SpellCheckOneLetterWords = true;
|
||||
ListViewSyntaxColorDurationSmall = true;
|
||||
ListViewSyntaxColorDurationBig = true;
|
||||
@ -1037,6 +1039,9 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
subNode = node.SelectSingleNode("GoogleApiKey");
|
||||
if (subNode != null)
|
||||
settings.Tools.GoogleApiKey = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("GoogleTranslateLastTargetLanguage");
|
||||
if (subNode != null)
|
||||
settings.Tools.GoogleTranslateLastTargetLanguage = subNode.InnerText;
|
||||
subNode = node.SelectSingleNode("ListViewSyntaxColorDurationSmall");
|
||||
if (subNode != null)
|
||||
settings.Tools.ListViewSyntaxColorDurationSmall = Convert.ToBoolean(subNode.InnerText);
|
||||
@ -1679,6 +1684,7 @@ namespace Nikse.SubtitleEdit.Logic
|
||||
textWriter.WriteElementString("Interjections", settings.Tools.Interjections);
|
||||
textWriter.WriteElementString("MicrosoftBingApiId", settings.Tools.MicrosoftBingApiId);
|
||||
textWriter.WriteElementString("GoogleApiKey", settings.Tools.GoogleApiKey);
|
||||
textWriter.WriteElementString("GoogleTranslateLastTargetLanguage", settings.Tools.GoogleTranslateLastTargetLanguage);
|
||||
textWriter.WriteElementString("ListViewSyntaxColorDurationSmall", settings.Tools.ListViewSyntaxColorDurationSmall.ToString());
|
||||
textWriter.WriteElementString("ListViewSyntaxColorDurationBig", settings.Tools.ListViewSyntaxColorDurationBig.ToString());
|
||||
textWriter.WriteElementString("ListViewSyntaxColorLongLines", settings.Tools.ListViewSyntaxColorLongLines.ToString());
|
||||
|
Loading…
Reference in New Issue
Block a user