Fixed a few typos

This commit is contained in:
niksedk 2014-08-04 20:47:33 +02:00
parent ebe79b3150
commit 2094ff2586
3 changed files with 11 additions and 22 deletions

View File

@ -9475,7 +9475,7 @@ namespace Nikse.SubtitleEdit.Forms
if (noOfErrors > 0) if (noOfErrors > 0)
{ {
MessageBox.Show(string.Format("{0} errror(s) occured during extraction of bdsup\r\n\r\n{1}", noOfErrors, lastError)); MessageBox.Show(string.Format("{0} error(s) occured during extraction of bdsup\r\n\r\n{1}", noOfErrors, lastError));
} }
var formSubOcr = new VobSubOcr(); var formSubOcr = new VobSubOcr();
@ -17922,7 +17922,7 @@ namespace Nikse.SubtitleEdit.Forms
{ {
if (p.EndTime.TotalMilliseconds > ms && p.StartTime.TotalMilliseconds < ms) if (p.EndTime.TotalMilliseconds > ms && p.StartTime.TotalMilliseconds < ms)
{ {
// currrent sub // current sub
} }
else if (p.Duration.TotalSeconds < 10 && p.StartTime.TotalMilliseconds > ms) else if (p.Duration.TotalSeconds < 10 && p.StartTime.TotalMilliseconds > ms)
{ {
@ -17945,7 +17945,7 @@ namespace Nikse.SubtitleEdit.Forms
Paragraph p = _subtitle.Paragraphs[i]; Paragraph p = _subtitle.Paragraphs[i];
if (p.EndTime.TotalMilliseconds > ms && p.StartTime.TotalMilliseconds < ms) if (p.EndTime.TotalMilliseconds > ms && p.StartTime.TotalMilliseconds < ms)
{ {
// currrent sub // current sub
} }
else if (p.Duration.TotalSeconds < 10 && p.StartTime.TotalMilliseconds < ms) else if (p.Duration.TotalSeconds < 10 && p.StartTime.TotalMilliseconds < ms)
{ {

View File

@ -1291,7 +1291,7 @@ Fortfahren?</SubtitleAppendPrompt>
<Import>Importiere...</Import> <Import>Importiere...</Import>
<Export>Exportiere...</Export> <Export>Exportiere...</Export>
<ImportRulesTitle>Importiere Korrekturregeln aus...</ImportRulesTitle> <ImportRulesTitle>Importiere Korrekturregeln aus...</ImportRulesTitle>
<ExportRulesTitle>Exportiere Korrekturrregeln nach...</ExportRulesTitle> <ExportRulesTitle>Exportiere Korrekturregeln nach...</ExportRulesTitle>
<Rules>Exportregeln</Rules> <Rules>Exportregeln</Rules>
</MultipleReplace> </MultipleReplace>
<NetworkChat> <NetworkChat>

View File

@ -156,9 +156,13 @@ namespace Nikse.SubtitleEdit.Logic
else else
{ {
string installerPath = GetInstallerPath(); string installerPath = GetInstallerPath();
string pf = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles).TrimEnd(Path.DirectorySeparatorChar); bool hasUninstallFiles = Directory.GetFiles(BaseDirectory, "unins*.*").Length > 0;
bool hasDictionaryFolder = Directory.Exists(Path.Combine(BaseDirectory, "Dictionaries"));
string appDataRoamingPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Subtitle Edit"); string appDataRoamingPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Subtitle Edit");
if (installerPath != null && BaseDirectory.ToLower().StartsWith(installerPath.ToLower().TrimEnd(Path.DirectorySeparatorChar)))
if ((installerPath != null && installerPath.ToLower().TrimEnd(Path.DirectorySeparatorChar) == BaseDirectory.ToLower().TrimEnd(Path.DirectorySeparatorChar)) ||
hasUninstallFiles ||
(!hasDictionaryFolder && Directory.Exists(Path.Combine(appDataRoamingPath, "Dictionaries"))))
{ {
if (Directory.Exists(appDataRoamingPath)) if (Directory.Exists(appDataRoamingPath))
{ {
@ -179,22 +183,7 @@ namespace Nikse.SubtitleEdit.Logic
System.Windows.Forms.Application.ExitThread(); System.Windows.Forms.Application.ExitThread();
} }
} }
} }
else if (BaseDirectory.ToLower().StartsWith(pf.ToLower()) && Environment.OSVersion.Version.Major >= 6 ) // 6 == Vista/Win2008Server/Win7
{ // windows vista and newer does not like programs writing to PF (nor does WinXp with non admin...)
try
{
System.IO.Directory.CreateDirectory(appDataRoamingPath);
System.IO.Directory.CreateDirectory(Path.Combine(appDataRoamingPath, "Dictionaries"));
Instance._dataDir = appDataRoamingPath + Path.DirectorySeparatorChar;
}
catch
{
Instance._dataDir = BaseDirectory;
System.Windows.Forms.MessageBox.Show("Please do not install portable version in 'Program Files' folder.");
System.Windows.Forms.Application.ExitThread();
}
}
else else
{ {
Instance._dataDir = BaseDirectory; Instance._dataDir = BaseDirectory;